original_code
stringclasses 565
values | transformation
stringclasses 24
values | transformed_code
stringlengths 35
955
| label
int64 0
1
| groups
int64 1
971
| dataset
stringclasses 1
value |
---|---|---|---|---|---|
def check_greater(test_tup1, test_tup2):
res = all(x < y for x, y in zip(test_tup1, test_tup2))
return (res)
|
transformation_dissimilar_code_injection_3
|
def heap_queue_largest(nums,n):
import heapq as hq
largest_nums = hq.nlargest(n, nums)
return largest_nums
| 0 | 692 |
mbpp
|
def check_greater(test_tup1, test_tup2):
res = all(x < y for x, y in zip(test_tup1, test_tup2))
return (res)
|
transformation_dissimilar_code_injection_4
|
def count_ways(n):
A = [0] * (n + 1)
B = [0] * (n + 1)
A[0] = 1
A[1] = 0
B[0] = 0
B[1] = 1
for i in range(2, n+1):
A[i] = A[i - 2] + 2 * B[i - 1]
B[i] = A[i - 1] + B[i - 2]
return A[n]
| 0 | 692 |
mbpp
|
def equilibrium_index(arr):
total_sum = sum(arr)
left_sum=0
for i, num in enumerate(arr):
total_sum -= num
if left_sum == total_sum:
return i
left_sum += num
return -1
|
transformation_dead_code_insert
|
def equilibrium_index(arr):
total_sum = sum(arr)
left_sum = 0
for i, num in enumerate(arr):
for _i_3 in range(0):
return -1
total_sum -= num
if left_sum == total_sum:
return i
left_sum += num
return -1
| 1 | 698 |
mbpp
|
def equilibrium_index(arr):
total_sum = sum(arr)
left_sum=0
for i, num in enumerate(arr):
total_sum -= num
if left_sum == total_sum:
return i
left_sum += num
return -1
|
transformation_for_while_loop
|
def equilibrium_index(arr):
total_sum = sum(arr)
left_sum = 0
for i, num in enumerate(arr):
total_sum -= num
if left_sum == total_sum:
return i
left_sum += num
return -1
| 1 | 698 |
mbpp
|
def equilibrium_index(arr):
total_sum = sum(arr)
left_sum=0
for i, num in enumerate(arr):
total_sum -= num
if left_sum == total_sum:
return i
left_sum += num
return -1
|
transformation_operand_swap
|
def equilibrium_index(arr):
total_sum = sum(arr)
left_sum = 0
for i, num in enumerate(arr):
total_sum -= num
if total_sum == left_sum:
return i
left_sum += num
return -1
| 1 | 698 |
mbpp
|
def equilibrium_index(arr):
total_sum = sum(arr)
left_sum=0
for i, num in enumerate(arr):
total_sum -= num
if left_sum == total_sum:
return i
left_sum += num
return -1
|
transformation_rename_variable_cb
|
def equilibrium_index(arr):
num2 = sum(arr)
left_sum = 0
for i, num in enumerate(arr):
num2 -= num
if left_sum == num2:
return i
left_sum += num
return -1
| 1 | 698 |
mbpp
|
def equilibrium_index(arr):
total_sum = sum(arr)
left_sum=0
for i, num in enumerate(arr):
total_sum -= num
if left_sum == total_sum:
return i
left_sum += num
return -1
|
transformation_rename_variable_naive
|
def equilibrium_index(arr):
total_sum = sum(arr)
VAR_0 = 0
for i, num in enumerate(arr):
total_sum -= num
if VAR_0 == total_sum:
return i
VAR_0 += num
return -1
| 1 | 698 |
mbpp
|
def equilibrium_index(arr):
total_sum = sum(arr)
left_sum=0
for i, num in enumerate(arr):
total_sum -= num
if left_sum == total_sum:
return i
left_sum += num
return -1
|
transformation_rename_variable_rn
|
def equilibrium_index(Lbr):
total_sum = sum(Lbr)
left_sum = 0
for i, num in enumerate(Lbr):
total_sum -= num
if left_sum == total_sum:
return i
left_sum += num
return -1
| 1 | 698 |
mbpp
|
def equilibrium_index(arr):
total_sum = sum(arr)
left_sum=0
for i, num in enumerate(arr):
total_sum -= num
if left_sum == total_sum:
return i
left_sum += num
return -1
|
transformation_add_sub_variable
|
def equilibrium_index(arr):
total_sum = sum(arr)
left_sum=0
for i, num in enumerate(arr):
total_sum -= num
if left_sum == total_sum:
return i
left_sum -= num
return -1
| 0 | 698 |
mbpp
|
def equilibrium_index(arr):
total_sum = sum(arr)
left_sum=0
for i, num in enumerate(arr):
total_sum -= num
if left_sum == total_sum:
return i
left_sum += num
return -1
|
transformation_sub_add_variable
|
def equilibrium_index(arr):
total_sum = sum(arr)
left_sum=0
for i, num in enumerate(arr):
total_sum += num
if left_sum == total_sum:
return i
left_sum += num
return -1
| 0 | 698 |
mbpp
|
def equilibrium_index(arr):
total_sum = sum(arr)
left_sum=0
for i, num in enumerate(arr):
total_sum -= num
if left_sum == total_sum:
return i
left_sum += num
return -1
|
transformation_equalto_exclamation_variable
|
def equilibrium_index(arr):
total_sum = sum(arr)
left_sum=0
for i, num in enumerate(arr):
total_sum -= num
if left_sum != total_sum:
return i
left_sum += num
return -1
| 0 | 698 |
mbpp
|
def equilibrium_index(arr):
total_sum = sum(arr)
left_sum=0
for i, num in enumerate(arr):
total_sum -= num
if left_sum == total_sum:
return i
left_sum += num
return -1
|
transformation_dissimilar_code_injection_0
|
def min_cost(cost, m, n):
R = 3
C = 3
tc = [[0 for x in range(C)] for x in range(R)]
tc[0][0] = cost[0][0]
for i in range(1, m+1):
tc[i][0] = tc[i-1][0] + cost[i][0]
for j in range(1, n+1):
tc[0][j] = tc[0][j-1] + cost[0][j]
for i in range(1, m+1):
for j in range(1, n+1):
tc[i][j] = min(tc[i-1][j-1], tc[i-1][j], tc[i][j-1]) + cost[i][j]
return tc[m][n]
| 0 | 698 |
mbpp
|
def equilibrium_index(arr):
total_sum = sum(arr)
left_sum=0
for i, num in enumerate(arr):
total_sum -= num
if left_sum == total_sum:
return i
left_sum += num
return -1
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 698 |
mbpp
|
def equilibrium_index(arr):
total_sum = sum(arr)
left_sum=0
for i, num in enumerate(arr):
total_sum -= num
if left_sum == total_sum:
return i
left_sum += num
return -1
|
transformation_dissimilar_code_injection_2
|
def is_not_prime(n):
import math
result = False
for i in range(2,int(math.sqrt(n)) + 1):
if n % i == 0:
result = True
return result
| 0 | 698 |
mbpp
|
def equilibrium_index(arr):
total_sum = sum(arr)
left_sum=0
for i, num in enumerate(arr):
total_sum -= num
if left_sum == total_sum:
return i
left_sum += num
return -1
|
transformation_dissimilar_code_injection_3
|
def heap_queue_largest(nums,n):
import heapq as hq
largest_nums = hq.nlargest(n, nums)
return largest_nums
| 0 | 698 |
mbpp
|
def equilibrium_index(arr):
total_sum = sum(arr)
left_sum=0
for i, num in enumerate(arr):
total_sum -= num
if left_sum == total_sum:
return i
left_sum += num
return -1
|
transformation_dissimilar_code_injection_4
|
def count_ways(n):
A = [0] * (n + 1)
B = [0] * (n + 1)
A[0] = 1
A[1] = 0
B[0] = 0
B[1] = 1
for i in range(2, n+1):
A[i] = A[i - 2] + 2 * B[i - 1]
B[i] = A[i - 1] + B[i - 2]
return A[n]
| 0 | 698 |
mbpp
|
def removals(arr, n, k):
def find_ind(key, i, n,
k, arr):
ind = -1
start = i + 1
end = n - 1;
while (start < end):
mid = int(start +
(end - start) / 2)
if (arr[mid] - key <= k):
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i,
n, k, arr)
if (j != -1):
ans = min(ans, n -
(j - i + 1))
return ans
|
transformation_dead_code_insert
|
def removals(arr, n, k):
def find_ind(key, i, n, k, arr):
ind = -1
start = i + 1
end = n - 1
while start < end:
_i_6 = 0
if _i_6 < _i_6:
j = find_ind(arr[i], i, n, k, arr)
mid = int(start + (end - start) / 2)
if arr[mid] - key <= k:
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i, n, k, arr)
if j != -1:
ans = min(ans, n - (j - i + 1))
return ans
| 1 | 699 |
mbpp
|
def removals(arr, n, k):
def find_ind(key, i, n,
k, arr):
ind = -1
start = i + 1
end = n - 1;
while (start < end):
mid = int(start +
(end - start) / 2)
if (arr[mid] - key <= k):
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i,
n, k, arr)
if (j != -1):
ans = min(ans, n -
(j - i + 1))
return ans
|
transformation_for_while_loop
|
def removals(arr, n, k):
def find_ind(key, i, n, k, arr):
ind = -1
start = i + 1
end = n - 1
while start < end:
mid = int(start + (end - start) / 2)
if arr[mid] - key <= k:
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
i = 0
while i < n:
j = find_ind(arr[i], i, n, k, arr)
if j != -1:
ans = min(ans, n - (j - i + 1))
i += 1
return ans
| 1 | 699 |
mbpp
|
def removals(arr, n, k):
def find_ind(key, i, n,
k, arr):
ind = -1
start = i + 1
end = n - 1;
while (start < end):
mid = int(start +
(end - start) / 2)
if (arr[mid] - key <= k):
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i,
n, k, arr)
if (j != -1):
ans = min(ans, n -
(j - i + 1))
return ans
|
transformation_operand_swap
|
def removals(arr, n, k):
def find_ind(key, i, n, k, arr):
ind = -1
start = i + 1
end = n - 1
while end > start:
mid = int(start + (end - start) / 2)
if arr[mid] - key <= k:
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i, n, k, arr)
if j != -1:
ans = min(ans, n - (j - i + 1))
return ans
| 1 | 699 |
mbpp
|
def removals(arr, n, k):
def find_ind(key, i, n,
k, arr):
ind = -1
start = i + 1
end = n - 1;
while (start < end):
mid = int(start +
(end - start) / 2)
if (arr[mid] - key <= k):
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i,
n, k, arr)
if (j != -1):
ans = min(ans, n -
(j - i + 1))
return ans
|
transformation_rename_variable_cb
|
def removals(arr, i2, k):
def find_ind(key, i, i2, k, arr):
ind = -1
start = i + 1
end = i2 - 1
while start < end:
mid = int(start + (end - start) / 2)
if arr[mid] - key <= k:
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = i2 - 1
arr.sort()
for i in range(0, i2):
j = find_ind(arr[i], i, i2, k, arr)
if j != -1:
ans = min(ans, i2 - (j - i + 1))
return ans
| 1 | 699 |
mbpp
|
def removals(arr, n, k):
def find_ind(key, i, n,
k, arr):
ind = -1
start = i + 1
end = n - 1;
while (start < end):
mid = int(start +
(end - start) / 2)
if (arr[mid] - key <= k):
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i,
n, k, arr)
if (j != -1):
ans = min(ans, n -
(j - i + 1))
return ans
|
transformation_rename_variable_naive
|
def removals(arr, VAR_0, k):
def find_ind(key, i, VAR_0, k, arr):
ind = -1
start = i + 1
end = VAR_0 - 1
while start < end:
mid = int(start + (end - start) / 2)
if arr[mid] - key <= k:
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = VAR_0 - 1
arr.sort()
for i in range(0, VAR_0):
j = find_ind(arr[i], i, VAR_0, k, arr)
if j != -1:
ans = min(ans, VAR_0 - (j - i + 1))
return ans
| 1 | 699 |
mbpp
|
def removals(arr, n, k):
def find_ind(key, i, n,
k, arr):
ind = -1
start = i + 1
end = n - 1;
while (start < end):
mid = int(start +
(end - start) / 2)
if (arr[mid] - key <= k):
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i,
n, k, arr)
if (j != -1):
ans = min(ans, n -
(j - i + 1))
return ans
|
transformation_rename_variable_rn
|
def removals(arr, x, k):
def find_ind(key, i, x, k, arr):
ind = -1
start = i + 1
end = x - 1
while start < end:
mid = int(start + (end - start) / 2)
if arr[mid] - key <= k:
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = x - 1
arr.sort()
for i in range(0, x):
j = find_ind(arr[i], i, x, k, arr)
if j != -1:
ans = min(ans, x - (j - i + 1))
return ans
| 1 | 699 |
mbpp
|
def removals(arr, n, k):
def find_ind(key, i, n,
k, arr):
ind = -1
start = i + 1
end = n - 1;
while (start < end):
mid = int(start +
(end - start) / 2)
if (arr[mid] - key <= k):
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i,
n, k, arr)
if (j != -1):
ans = min(ans, n -
(j - i + 1))
return ans
|
transformation_add_sub_variable
|
def removals(arr, n, k):
def find_ind(key, i, n,
k, arr):
ind = -1
start = i - 1
end = n - 1;
while (start < end):
mid = int(start +
(end - start) / 2)
if (arr[mid] - key <= k):
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i,
n, k, arr)
if (j != -1):
ans = min(ans, n -
(j - i + 1))
return ans
| 0 | 699 |
mbpp
|
def removals(arr, n, k):
def find_ind(key, i, n,
k, arr):
ind = -1
start = i + 1
end = n - 1;
while (start < end):
mid = int(start +
(end - start) / 2)
if (arr[mid] - key <= k):
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i,
n, k, arr)
if (j != -1):
ans = min(ans, n -
(j - i + 1))
return ans
|
transformation_sub_add_variable
|
def removals(arr, n, k):
def find_ind(key, i, n,
k, arr):
ind = +1
start = i + 1
end = n - 1;
while (start < end):
mid = int(start +
(end - start) / 2)
if (arr[mid] - key <= k):
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i,
n, k, arr)
if (j != -1):
ans = min(ans, n -
(j - i + 1))
return ans
| 0 | 699 |
mbpp
|
def removals(arr, n, k):
def find_ind(key, i, n,
k, arr):
ind = -1
start = i + 1
end = n - 1;
while (start < end):
mid = int(start +
(end - start) / 2)
if (arr[mid] - key <= k):
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i,
n, k, arr)
if (j != -1):
ans = min(ans, n -
(j - i + 1))
return ans
|
transformation_div_mul_variable
|
def removals(arr, n, k):
def find_ind(key, i, n,
k, arr):
ind = -1
start = i + 1
end = n - 1;
while (start < end):
mid = int(start +
(end - start) * 2)
if (arr[mid] - key <= k):
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i,
n, k, arr)
if (j != -1):
ans = min(ans, n -
(j - i + 1))
return ans
| 0 | 699 |
mbpp
|
def removals(arr, n, k):
def find_ind(key, i, n,
k, arr):
ind = -1
start = i + 1
end = n - 1;
while (start < end):
mid = int(start +
(end - start) / 2)
if (arr[mid] - key <= k):
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i,
n, k, arr)
if (j != -1):
ans = min(ans, n -
(j - i + 1))
return ans
|
transformation_lesser_greater_variable
|
def removals(arr, n, k):
def find_ind(key, i, n,
k, arr):
ind = -1
start = i + 1
end = n - 1;
while (start > end):
mid = int(start +
(end - start) / 2)
if (arr[mid] - key <= k):
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i,
n, k, arr)
if (j != -1):
ans = min(ans, n -
(j - i + 1))
return ans
| 0 | 699 |
mbpp
|
def removals(arr, n, k):
def find_ind(key, i, n,
k, arr):
ind = -1
start = i + 1
end = n - 1;
while (start < end):
mid = int(start +
(end - start) / 2)
if (arr[mid] - key <= k):
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i,
n, k, arr)
if (j != -1):
ans = min(ans, n -
(j - i + 1))
return ans
|
transformation_exclamation_equalto_variable
|
def removals(arr, n, k):
def find_ind(key, i, n,
k, arr):
ind = -1
start = i + 1
end = n - 1;
while (start < end):
mid = int(start +
(end - start) / 2)
if (arr[mid] - key <= k):
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i,
n, k, arr)
if (j == -1):
ans = min(ans, n -
(j - i + 1))
return ans
| 0 | 699 |
mbpp
|
def removals(arr, n, k):
def find_ind(key, i, n,
k, arr):
ind = -1
start = i + 1
end = n - 1;
while (start < end):
mid = int(start +
(end - start) / 2)
if (arr[mid] - key <= k):
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i,
n, k, arr)
if (j != -1):
ans = min(ans, n -
(j - i + 1))
return ans
|
transformation_dissimilar_code_injection_0
|
def min_cost(cost, m, n):
R = 3
C = 3
tc = [[0 for x in range(C)] for x in range(R)]
tc[0][0] = cost[0][0]
for i in range(1, m+1):
tc[i][0] = tc[i-1][0] + cost[i][0]
for j in range(1, n+1):
tc[0][j] = tc[0][j-1] + cost[0][j]
for i in range(1, m+1):
for j in range(1, n+1):
tc[i][j] = min(tc[i-1][j-1], tc[i-1][j], tc[i][j-1]) + cost[i][j]
return tc[m][n]
| 0 | 699 |
mbpp
|
def removals(arr, n, k):
def find_ind(key, i, n,
k, arr):
ind = -1
start = i + 1
end = n - 1;
while (start < end):
mid = int(start +
(end - start) / 2)
if (arr[mid] - key <= k):
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i,
n, k, arr)
if (j != -1):
ans = min(ans, n -
(j - i + 1))
return ans
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 699 |
mbpp
|
def removals(arr, n, k):
def find_ind(key, i, n,
k, arr):
ind = -1
start = i + 1
end = n - 1;
while (start < end):
mid = int(start +
(end - start) / 2)
if (arr[mid] - key <= k):
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i,
n, k, arr)
if (j != -1):
ans = min(ans, n -
(j - i + 1))
return ans
|
transformation_dissimilar_code_injection_2
|
def is_not_prime(n):
import math
result = False
for i in range(2,int(math.sqrt(n)) + 1):
if n % i == 0:
result = True
return result
| 0 | 699 |
mbpp
|
def removals(arr, n, k):
def find_ind(key, i, n,
k, arr):
ind = -1
start = i + 1
end = n - 1;
while (start < end):
mid = int(start +
(end - start) / 2)
if (arr[mid] - key <= k):
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i,
n, k, arr)
if (j != -1):
ans = min(ans, n -
(j - i + 1))
return ans
|
transformation_dissimilar_code_injection_3
|
def heap_queue_largest(nums,n):
import heapq as hq
largest_nums = hq.nlargest(n, nums)
return largest_nums
| 0 | 699 |
mbpp
|
def removals(arr, n, k):
def find_ind(key, i, n,
k, arr):
ind = -1
start = i + 1
end = n - 1;
while (start < end):
mid = int(start +
(end - start) / 2)
if (arr[mid] - key <= k):
ind = mid
start = mid + 1
else:
end = mid
return ind
ans = n - 1
arr.sort()
for i in range(0, n):
j = find_ind(arr[i], i,
n, k, arr)
if (j != -1):
ans = min(ans, n -
(j - i + 1))
return ans
|
transformation_dissimilar_code_injection_4
|
def count_ways(n):
A = [0] * (n + 1)
B = [0] * (n + 1)
A[0] = 1
A[1] = 0
B[0] = 0
B[1] = 1
for i in range(2, n+1):
A[i] = A[i - 2] + 2 * B[i - 1]
B[i] = A[i - 1] + B[i - 2]
return A[n]
| 0 | 699 |
mbpp
|
def is_key_present(d,x):
if x in d:
return True
else:
return False
|
transformation_dead_code_insert
|
def is_key_present(d, x):
if x in d:
for _i_5 in range(0):
return True
return True
else:
return False
| 1 | 700 |
mbpp
|
def is_key_present(d,x):
if x in d:
return True
else:
return False
|
transformation_for_while_loop
|
def is_key_present(d, x):
if x in d:
return True
else:
return False
| 1 | 700 |
mbpp
|
def is_key_present(d,x):
if x in d:
return True
else:
return False
|
transformation_operand_swap
|
def is_key_present(d, x):
if x in d:
return True
else:
return False
| 1 | 700 |
mbpp
|
def is_key_present(d,x):
if x in d:
return True
else:
return False
|
transformation_rename_variable_cb
|
def is_key_present(d, key):
if key in d:
return True
else:
return False
| 1 | 700 |
mbpp
|
def is_key_present(d,x):
if x in d:
return True
else:
return False
|
transformation_rename_variable_naive
|
def is_key_present(d, VAR_0):
if VAR_0 in d:
return True
else:
return False
| 1 | 700 |
mbpp
|
def is_key_present(d,x):
if x in d:
return True
else:
return False
|
transformation_rename_variable_rn
|
def is_key_present(d, f):
if f in d:
return True
else:
return False
| 1 | 700 |
mbpp
|
def is_key_present(d,x):
if x in d:
return True
else:
return False
|
transformation_true_false_variable
|
def is_key_present(d,x):
if x in d:
return False
else:
return False
| 0 | 700 |
mbpp
|
def is_key_present(d,x):
if x in d:
return True
else:
return False
|
transformation_false_true_variable
|
def is_key_present(d,x):
if x in d:
return True
else:
return True
| 0 | 700 |
mbpp
|
def is_key_present(d,x):
if x in d:
return True
else:
return False
|
transformation_dissimilar_code_injection_0
|
def min_cost(cost, m, n):
R = 3
C = 3
tc = [[0 for x in range(C)] for x in range(R)]
tc[0][0] = cost[0][0]
for i in range(1, m+1):
tc[i][0] = tc[i-1][0] + cost[i][0]
for j in range(1, n+1):
tc[0][j] = tc[0][j-1] + cost[0][j]
for i in range(1, m+1):
for j in range(1, n+1):
tc[i][j] = min(tc[i-1][j-1], tc[i-1][j], tc[i][j-1]) + cost[i][j]
return tc[m][n]
| 0 | 700 |
mbpp
|
def is_key_present(d,x):
if x in d:
return True
else:
return False
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 700 |
mbpp
|
def is_key_present(d,x):
if x in d:
return True
else:
return False
|
transformation_dissimilar_code_injection_2
|
def is_not_prime(n):
import math
result = False
for i in range(2,int(math.sqrt(n)) + 1):
if n % i == 0:
result = True
return result
| 0 | 700 |
mbpp
|
def is_key_present(d,x):
if x in d:
return True
else:
return False
|
transformation_dissimilar_code_injection_3
|
def heap_queue_largest(nums,n):
import heapq as hq
largest_nums = hq.nlargest(n, nums)
return largest_nums
| 0 | 700 |
mbpp
|
def is_key_present(d,x):
if x in d:
return True
else:
return False
|
transformation_dissimilar_code_injection_4
|
def count_ways(n):
A = [0] * (n + 1)
B = [0] * (n + 1)
A[0] = 1
A[1] = 0
B[0] = 0
B[1] = 1
for i in range(2, n+1):
A[i] = A[i - 2] + 2 * B[i - 1]
B[i] = A[i - 1] + B[i - 2]
return A[n]
| 0 | 700 |
mbpp
|
def harmonic_sum(n):
if n < 2:
return 1
else:
return 1 / n + (harmonic_sum(n - 1))
|
transformation_dead_code_insert
|
def harmonic_sum(n):
if n < 2:
_i_6 = 0
while _i_6 < _i_6:
return 1
return 1
else:
return 1 / n + (harmonic_sum(n - 1))
| 1 | 701 |
mbpp
|
def harmonic_sum(n):
if n < 2:
return 1
else:
return 1 / n + (harmonic_sum(n - 1))
|
transformation_for_while_loop
|
def harmonic_sum(n):
if n < 2:
return 1
else:
return 1 / n + (harmonic_sum(n - 1))
| 1 | 701 |
mbpp
|
def harmonic_sum(n):
if n < 2:
return 1
else:
return 1 / n + (harmonic_sum(n - 1))
|
transformation_operand_swap
|
def harmonic_sum(n):
if 2 > n:
return 1
else:
return 1 / n + (harmonic_sum(n - 1))
| 1 | 701 |
mbpp
|
def harmonic_sum(n):
if n < 2:
return 1
else:
return 1 / n + (harmonic_sum(n - 1))
|
transformation_rename_variable_cb
|
def harmonic_sum(i):
if i < 2:
return 1
else:
return 1 / i + (harmonic_sum(i - 1))
| 1 | 701 |
mbpp
|
def harmonic_sum(n):
if n < 2:
return 1
else:
return 1 / n + (harmonic_sum(n - 1))
|
transformation_rename_variable_naive
|
def harmonic_sum(VAR_0):
if VAR_0 < 2:
return 1
else:
return 1 / VAR_0 + (harmonic_sum(VAR_0 - 1))
| 1 | 701 |
mbpp
|
def harmonic_sum(n):
if n < 2:
return 1
else:
return 1 / n + (harmonic_sum(n - 1))
|
transformation_rename_variable_rn
|
def harmonic_sum(M):
if M < 2:
return 1
else:
return 1 / M + (harmonic_sum(M - 1))
| 1 | 701 |
mbpp
|
def harmonic_sum(n):
if n < 2:
return 1
else:
return 1 / n + (harmonic_sum(n - 1))
|
transformation_add_sub_variable
|
def harmonic_sum(n):
if n < 2:
return 1
else:
return 1 / n - (harmonic_sum(n - 1))
| 0 | 701 |
mbpp
|
def harmonic_sum(n):
if n < 2:
return 1
else:
return 1 / n + (harmonic_sum(n - 1))
|
transformation_sub_add_variable
|
def harmonic_sum(n):
if n < 2:
return 1
else:
return 1 / n + (harmonic_sum(n + 1))
| 0 | 701 |
mbpp
|
def harmonic_sum(n):
if n < 2:
return 1
else:
return 1 / n + (harmonic_sum(n - 1))
|
transformation_div_mul_variable
|
def harmonic_sum(n):
if n < 2:
return 1
else:
return 1 * n + (harmonic_sum(n - 1))
| 0 | 701 |
mbpp
|
def harmonic_sum(n):
if n < 2:
return 1
else:
return 1 / n + (harmonic_sum(n - 1))
|
transformation_lesser_greater_variable
|
def harmonic_sum(n):
if n > 2:
return 1
else:
return 1 / n + (harmonic_sum(n - 1))
| 0 | 701 |
mbpp
|
def harmonic_sum(n):
if n < 2:
return 1
else:
return 1 / n + (harmonic_sum(n - 1))
|
transformation_dissimilar_code_injection_0
|
def min_cost(cost, m, n):
R = 3
C = 3
tc = [[0 for x in range(C)] for x in range(R)]
tc[0][0] = cost[0][0]
for i in range(1, m+1):
tc[i][0] = tc[i-1][0] + cost[i][0]
for j in range(1, n+1):
tc[0][j] = tc[0][j-1] + cost[0][j]
for i in range(1, m+1):
for j in range(1, n+1):
tc[i][j] = min(tc[i-1][j-1], tc[i-1][j], tc[i][j-1]) + cost[i][j]
return tc[m][n]
| 0 | 701 |
mbpp
|
def harmonic_sum(n):
if n < 2:
return 1
else:
return 1 / n + (harmonic_sum(n - 1))
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 701 |
mbpp
|
def harmonic_sum(n):
if n < 2:
return 1
else:
return 1 / n + (harmonic_sum(n - 1))
|
transformation_dissimilar_code_injection_2
|
def is_not_prime(n):
import math
result = False
for i in range(2,int(math.sqrt(n)) + 1):
if n % i == 0:
result = True
return result
| 0 | 701 |
mbpp
|
def harmonic_sum(n):
if n < 2:
return 1
else:
return 1 / n + (harmonic_sum(n - 1))
|
transformation_dissimilar_code_injection_3
|
def heap_queue_largest(nums,n):
import heapq as hq
largest_nums = hq.nlargest(n, nums)
return largest_nums
| 0 | 701 |
mbpp
|
def harmonic_sum(n):
if n < 2:
return 1
else:
return 1 / n + (harmonic_sum(n - 1))
|
transformation_dissimilar_code_injection_4
|
def count_ways(n):
A = [0] * (n + 1)
B = [0] * (n + 1)
A[0] = 1
A[1] = 0
B[0] = 0
B[1] = 1
for i in range(2, n+1):
A[i] = A[i - 2] + 2 * B[i - 1]
B[i] = A[i - 1] + B[i - 2]
return A[n]
| 0 | 701 |
mbpp
|
def sort_sublists(list1):
list1.sort()
list1.sort(key=len)
return list1
|
transformation_dead_code_insert
|
def sort_sublists(list1):
list1.sort()
while False:
list1.sort()
list1.sort(key=len)
return list1
| 1 | 702 |
mbpp
|
def sort_sublists(list1):
list1.sort()
list1.sort(key=len)
return list1
|
transformation_for_while_loop
|
def sort_sublists(list1):
list1.sort()
list1.sort(key=len)
return list1
| 1 | 702 |
mbpp
|
def sort_sublists(list1):
list1.sort()
list1.sort(key=len)
return list1
|
transformation_operand_swap
|
def sort_sublists(list1):
list1.sort()
list1.sort(key=len)
return list1
| 1 | 702 |
mbpp
|
def sort_sublists(list1):
list1.sort()
list1.sort(key=len)
return list1
|
transformation_rename_variable_cb
|
def sort_sublists(l):
l.sort()
l.sort(key=len)
return l
| 1 | 702 |
mbpp
|
def sort_sublists(list1):
list1.sort()
list1.sort(key=len)
return list1
|
transformation_rename_variable_naive
|
def sort_sublists(VAR_0):
VAR_0.sort()
VAR_0.sort(key=len)
return VAR_0
| 1 | 702 |
mbpp
|
def sort_sublists(list1):
list1.sort()
list1.sort(key=len)
return list1
|
transformation_rename_variable_rn
|
def sort_sublists(ORTJl):
ORTJl.sort()
ORTJl.sort(key=len)
return ORTJl
| 1 | 702 |
mbpp
|
def sort_sublists(list1):
list1.sort()
list1.sort(key=len)
return list1
|
transformation_dissimilar_code_injection_0
|
def min_cost(cost, m, n):
R = 3
C = 3
tc = [[0 for x in range(C)] for x in range(R)]
tc[0][0] = cost[0][0]
for i in range(1, m+1):
tc[i][0] = tc[i-1][0] + cost[i][0]
for j in range(1, n+1):
tc[0][j] = tc[0][j-1] + cost[0][j]
for i in range(1, m+1):
for j in range(1, n+1):
tc[i][j] = min(tc[i-1][j-1], tc[i-1][j], tc[i][j-1]) + cost[i][j]
return tc[m][n]
| 0 | 702 |
mbpp
|
def sort_sublists(list1):
list1.sort()
list1.sort(key=len)
return list1
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 702 |
mbpp
|
def sort_sublists(list1):
list1.sort()
list1.sort(key=len)
return list1
|
transformation_dissimilar_code_injection_2
|
def is_not_prime(n):
import math
result = False
for i in range(2,int(math.sqrt(n)) + 1):
if n % i == 0:
result = True
return result
| 0 | 702 |
mbpp
|
def sort_sublists(list1):
list1.sort()
list1.sort(key=len)
return list1
|
transformation_dissimilar_code_injection_3
|
def heap_queue_largest(nums,n):
import heapq as hq
largest_nums = hq.nlargest(n, nums)
return largest_nums
| 0 | 702 |
mbpp
|
def sort_sublists(list1):
list1.sort()
list1.sort(key=len)
return list1
|
transformation_dissimilar_code_injection_4
|
def count_ways(n):
A = [0] * (n + 1)
B = [0] * (n + 1)
A[0] = 1
A[1] = 0
B[0] = 0
B[1] = 1
for i in range(2, n+1):
A[i] = A[i - 2] + 2 * B[i - 1]
B[i] = A[i - 1] + B[i - 2]
return A[n]
| 0 | 702 |
mbpp
|
def is_subset(arr1, m, arr2, n):
hashset = set()
for i in range(0, m):
hashset.add(arr1[i])
for i in range(0, n):
if arr2[i] in hashset:
continue
else:
return False
return True
|
transformation_dead_code_insert
|
def is_subset(arr1, m, arr2, n):
hashset = set()
for i in range(0, m):
hashset.add(arr1[i])
while False:
return False
for i in range(0, n):
if arr2[i] in hashset:
continue
else:
return False
return True
| 1 | 703 |
mbpp
|
def is_subset(arr1, m, arr2, n):
hashset = set()
for i in range(0, m):
hashset.add(arr1[i])
for i in range(0, n):
if arr2[i] in hashset:
continue
else:
return False
return True
|
transformation_for_while_loop
|
def is_subset(arr1, m, arr2, n):
hashset = set()
i = 0
while i < m:
hashset.add(arr1[i])
i += 1
for i in range(0, n):
if arr2[i] in hashset:
continue
else:
return False
return True
| 1 | 703 |
mbpp
|
def is_subset(arr1, m, arr2, n):
hashset = set()
for i in range(0, m):
hashset.add(arr1[i])
for i in range(0, n):
if arr2[i] in hashset:
continue
else:
return False
return True
|
transformation_operand_swap
|
def is_subset(arr1, m, arr2, n):
hashset = set()
for i in range(0, m):
hashset.add(arr1[i])
for i in range(0, n):
if arr2[i] in hashset:
continue
else:
return False
return True
| 1 | 703 |
mbpp
|
def is_subset(arr1, m, arr2, n):
hashset = set()
for i in range(0, m):
hashset.add(arr1[i])
for i in range(0, n):
if arr2[i] in hashset:
continue
else:
return False
return True
|
transformation_rename_variable_cb
|
def is_subset(arr1, m, arr2, n):
hashset = set()
for i2 in range(0, m):
hashset.add(arr1[i2])
for i2 in range(0, n):
if arr2[i2] in hashset:
continue
else:
return False
return True
| 1 | 703 |
mbpp
|
def is_subset(arr1, m, arr2, n):
hashset = set()
for i in range(0, m):
hashset.add(arr1[i])
for i in range(0, n):
if arr2[i] in hashset:
continue
else:
return False
return True
|
transformation_rename_variable_naive
|
def is_subset(arr1, m, arr2, n):
hashset = set()
for VAR_0 in range(0, m):
hashset.add(arr1[VAR_0])
for VAR_0 in range(0, n):
if arr2[VAR_0] in hashset:
continue
else:
return False
return True
| 1 | 703 |
mbpp
|
def is_subset(arr1, m, arr2, n):
hashset = set()
for i in range(0, m):
hashset.add(arr1[i])
for i in range(0, n):
if arr2[i] in hashset:
continue
else:
return False
return True
|
transformation_rename_variable_rn
|
def is_subset(arr1, m, arr2, n):
hashset = set()
for y in range(0, m):
hashset.add(arr1[y])
for y in range(0, n):
if arr2[y] in hashset:
continue
else:
return False
return True
| 1 | 703 |
mbpp
|
def is_subset(arr1, m, arr2, n):
hashset = set()
for i in range(0, m):
hashset.add(arr1[i])
for i in range(0, n):
if arr2[i] in hashset:
continue
else:
return False
return True
|
transformation_true_false_variable
|
def is_subset(arr1, m, arr2, n):
hashset = set()
for i in range(0, m):
hashset.add(arr1[i])
for i in range(0, n):
if arr2[i] in hashset:
continue
else:
return False
return False
| 0 | 703 |
mbpp
|
def is_subset(arr1, m, arr2, n):
hashset = set()
for i in range(0, m):
hashset.add(arr1[i])
for i in range(0, n):
if arr2[i] in hashset:
continue
else:
return False
return True
|
transformation_false_true_variable
|
def is_subset(arr1, m, arr2, n):
hashset = set()
for i in range(0, m):
hashset.add(arr1[i])
for i in range(0, n):
if arr2[i] in hashset:
continue
else:
return True
return True
| 0 | 703 |
mbpp
|
def is_subset(arr1, m, arr2, n):
hashset = set()
for i in range(0, m):
hashset.add(arr1[i])
for i in range(0, n):
if arr2[i] in hashset:
continue
else:
return False
return True
|
transformation_dissimilar_code_injection_0
|
def min_cost(cost, m, n):
R = 3
C = 3
tc = [[0 for x in range(C)] for x in range(R)]
tc[0][0] = cost[0][0]
for i in range(1, m+1):
tc[i][0] = tc[i-1][0] + cost[i][0]
for j in range(1, n+1):
tc[0][j] = tc[0][j-1] + cost[0][j]
for i in range(1, m+1):
for j in range(1, n+1):
tc[i][j] = min(tc[i-1][j-1], tc[i-1][j], tc[i][j-1]) + cost[i][j]
return tc[m][n]
| 0 | 703 |
mbpp
|
def is_subset(arr1, m, arr2, n):
hashset = set()
for i in range(0, m):
hashset.add(arr1[i])
for i in range(0, n):
if arr2[i] in hashset:
continue
else:
return False
return True
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 703 |
mbpp
|
def is_subset(arr1, m, arr2, n):
hashset = set()
for i in range(0, m):
hashset.add(arr1[i])
for i in range(0, n):
if arr2[i] in hashset:
continue
else:
return False
return True
|
transformation_dissimilar_code_injection_2
|
def is_not_prime(n):
import math
result = False
for i in range(2,int(math.sqrt(n)) + 1):
if n % i == 0:
result = True
return result
| 0 | 703 |
mbpp
|
def is_subset(arr1, m, arr2, n):
hashset = set()
for i in range(0, m):
hashset.add(arr1[i])
for i in range(0, n):
if arr2[i] in hashset:
continue
else:
return False
return True
|
transformation_dissimilar_code_injection_3
|
def heap_queue_largest(nums,n):
import heapq as hq
largest_nums = hq.nlargest(n, nums)
return largest_nums
| 0 | 703 |
mbpp
|
def is_subset(arr1, m, arr2, n):
hashset = set()
for i in range(0, m):
hashset.add(arr1[i])
for i in range(0, n):
if arr2[i] in hashset:
continue
else:
return False
return True
|
transformation_dissimilar_code_injection_4
|
def count_ways(n):
A = [0] * (n + 1)
B = [0] * (n + 1)
A[0] = 1
A[1] = 0
B[0] = 0
B[1] = 1
for i in range(2, n+1):
A[i] = A[i - 2] + 2 * B[i - 1]
B[i] = A[i - 1] + B[i - 2]
return A[n]
| 0 | 703 |
mbpp
|
def Convert(string):
li = list(string.split(" "))
return li
|
transformation_dead_code_insert
|
def Convert(string):
if False:
return li
li = list(string.split(" "))
return li
| 1 | 705 |
mbpp
|
def Convert(string):
li = list(string.split(" "))
return li
|
transformation_dissimilar_code_injection_0
|
def min_cost(cost, m, n):
R = 3
C = 3
tc = [[0 for x in range(C)] for x in range(R)]
tc[0][0] = cost[0][0]
for i in range(1, m+1):
tc[i][0] = tc[i-1][0] + cost[i][0]
for j in range(1, n+1):
tc[0][j] = tc[0][j-1] + cost[0][j]
for i in range(1, m+1):
for j in range(1, n+1):
tc[i][j] = min(tc[i-1][j-1], tc[i-1][j], tc[i][j-1]) + cost[i][j]
return tc[m][n]
| 0 | 705 |
mbpp
|
def Convert(string):
li = list(string.split(" "))
return li
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 705 |
mbpp
|
def Convert(string):
li = list(string.split(" "))
return li
|
transformation_dissimilar_code_injection_2
|
def is_not_prime(n):
import math
result = False
for i in range(2,int(math.sqrt(n)) + 1):
if n % i == 0:
result = True
return result
| 0 | 705 |
mbpp
|
def Convert(string):
li = list(string.split(" "))
return li
|
transformation_dissimilar_code_injection_3
|
def heap_queue_largest(nums,n):
import heapq as hq
largest_nums = hq.nlargest(n, nums)
return largest_nums
| 0 | 705 |
mbpp
|
def Convert(string):
li = list(string.split(" "))
return li
|
transformation_dissimilar_code_injection_4
|
def count_ways(n):
A = [0] * (n + 1)
B = [0] * (n + 1)
A[0] = 1
A[1] = 0
B[0] = 0
B[1] = 1
for i in range(2, n+1):
A[i] = A[i - 2] + 2 * B[i - 1]
B[i] = A[i - 1] + B[i - 2]
return A[n]
| 0 | 705 |
mbpp
|
def remove_duplicate(list1):
import itertools
list.sort(list1)
remove_duplicate = list(list1 for list1,_ in itertools.groupby(list1))
return remove_duplicate
|
transformation_dead_code_insert
|
def remove_duplicate(list1):
import itertools
_i_1 = 0
if _i_1 > _i_1:
remove_duplicate = list(list1 for list1, _ in itertools.groupby(list1))
list.sort(list1)
remove_duplicate = list(list1 for list1, _ in itertools.groupby(list1))
return remove_duplicate
| 1 | 709 |
mbpp
|
def remove_duplicate(list1):
import itertools
list.sort(list1)
remove_duplicate = list(list1 for list1,_ in itertools.groupby(list1))
return remove_duplicate
|
transformation_for_while_loop
|
def remove_duplicate(list1):
import itertools
list.sort(list1)
remove_duplicate = list(list1 for list1, _ in itertools.groupby(list1))
return remove_duplicate
| 1 | 709 |
mbpp
|
def remove_duplicate(list1):
import itertools
list.sort(list1)
remove_duplicate = list(list1 for list1,_ in itertools.groupby(list1))
return remove_duplicate
|
transformation_operand_swap
|
def remove_duplicate(list1):
import itertools
list.sort(list1)
remove_duplicate = list(list1 for list1, _ in itertools.groupby(list1))
return remove_duplicate
| 1 | 709 |
mbpp
|
def remove_duplicate(list1):
import itertools
list.sort(list1)
remove_duplicate = list(list1 for list1,_ in itertools.groupby(list1))
return remove_duplicate
|
transformation_rename_variable_cb
|
def remove_duplicate(sort2):
import itertools
list.sort(sort2)
remove_duplicate = list(sort2 for sort2, _ in itertools.groupby(sort2))
return remove_duplicate
| 1 | 709 |
mbpp
|
def remove_duplicate(list1):
import itertools
list.sort(list1)
remove_duplicate = list(list1 for list1,_ in itertools.groupby(list1))
return remove_duplicate
|
transformation_rename_variable_naive
|
def remove_duplicate(VAR_0):
import itertools
list.sort(VAR_0)
remove_duplicate = list(VAR_0 for VAR_0, _ in itertools.groupby(VAR_0))
return remove_duplicate
| 1 | 709 |
mbpp
|
def remove_duplicate(list1):
import itertools
list.sort(list1)
remove_duplicate = list(list1 for list1,_ in itertools.groupby(list1))
return remove_duplicate
|
transformation_rename_variable_rn
|
def remove_duplicate(zV04F):
import itertools
list.sort(zV04F)
remove_duplicate = list(zV04F for zV04F, _ in itertools.groupby(zV04F))
return remove_duplicate
| 1 | 709 |
mbpp
|
def remove_duplicate(list1):
import itertools
list.sort(list1)
remove_duplicate = list(list1 for list1,_ in itertools.groupby(list1))
return remove_duplicate
|
transformation_dissimilar_code_injection_0
|
def min_cost(cost, m, n):
R = 3
C = 3
tc = [[0 for x in range(C)] for x in range(R)]
tc[0][0] = cost[0][0]
for i in range(1, m+1):
tc[i][0] = tc[i-1][0] + cost[i][0]
for j in range(1, n+1):
tc[0][j] = tc[0][j-1] + cost[0][j]
for i in range(1, m+1):
for j in range(1, n+1):
tc[i][j] = min(tc[i-1][j-1], tc[i-1][j], tc[i][j-1]) + cost[i][j]
return tc[m][n]
| 0 | 709 |
mbpp
|
def remove_duplicate(list1):
import itertools
list.sort(list1)
remove_duplicate = list(list1 for list1,_ in itertools.groupby(list1))
return remove_duplicate
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 709 |
mbpp
|
def remove_duplicate(list1):
import itertools
list.sort(list1)
remove_duplicate = list(list1 for list1,_ in itertools.groupby(list1))
return remove_duplicate
|
transformation_dissimilar_code_injection_2
|
def is_not_prime(n):
import math
result = False
for i in range(2,int(math.sqrt(n)) + 1):
if n % i == 0:
result = True
return result
| 0 | 709 |
mbpp
|
def remove_duplicate(list1):
import itertools
list.sort(list1)
remove_duplicate = list(list1 for list1,_ in itertools.groupby(list1))
return remove_duplicate
|
transformation_dissimilar_code_injection_3
|
def heap_queue_largest(nums,n):
import heapq as hq
largest_nums = hq.nlargest(n, nums)
return largest_nums
| 0 | 709 |
mbpp
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.