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 add_tuple(test_list, test_tup):
test_list += test_tup
return (test_list)
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 747 |
mbpp
|
def add_tuple(test_list, test_tup):
test_list += test_tup
return (test_list)
|
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 | 747 |
mbpp
|
def add_tuple(test_list, test_tup):
test_list += test_tup
return (test_list)
|
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 | 747 |
mbpp
|
def add_tuple(test_list, test_tup):
test_list += test_tup
return (test_list)
|
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 | 747 |
mbpp
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
|
transformation_dead_code_insert
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
_i_4 = 0
while _i_4 > _i_4:
right_child = (2 * i + 2 == len(arr)) or (
arr[i] <= arr[2 * i + 2] and check_min_heap(arr, 2 * i + 2)
)
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (
arr[i] <= arr[2 * i + 2] and check_min_heap(arr, 2 * i + 2)
)
return left_child and right_child
| 1 | 748 |
mbpp
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
|
transformation_for_while_loop
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (
arr[i] <= arr[2 * i + 2] and check_min_heap(arr, 2 * i + 2)
)
return left_child and right_child
| 1 | 748 |
mbpp
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
|
transformation_operand_swap
|
def check_min_heap(arr, i):
if len(arr) < 2 * i + 2:
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (
arr[i] <= arr[2 * i + 2] and check_min_heap(arr, 2 * i + 2)
)
return left_child and right_child
| 1 | 748 |
mbpp
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
|
transformation_rename_variable_cb
|
def check_min_heap(arr, n):
if 2 * n + 2 > len(arr):
return True
left_child = (arr[n] <= arr[2 * n + 1]) and check_min_heap(arr, 2 * n + 1)
right_child = (2 * n + 2 == len(arr)) or (
arr[n] <= arr[2 * n + 2] and check_min_heap(arr, 2 * n + 2)
)
return left_child and right_child
| 1 | 748 |
mbpp
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
|
transformation_rename_variable_naive
|
def check_min_heap(VAR_0, i):
if 2 * i + 2 > len(VAR_0):
return True
left_child = (VAR_0[i] <= VAR_0[2 * i + 1]) and check_min_heap(VAR_0, 2 * i + 1)
right_child = (2 * i + 2 == len(VAR_0)) or (
VAR_0[i] <= VAR_0[2 * i + 2] and check_min_heap(VAR_0, 2 * i + 2)
)
return left_child and right_child
| 1 | 748 |
mbpp
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
|
transformation_rename_variable_rn
|
def check_min_heap(q3K, i):
if 2 * i + 2 > len(q3K):
return True
left_child = (q3K[i] <= q3K[2 * i + 1]) and check_min_heap(q3K, 2 * i + 1)
right_child = (2 * i + 2 == len(q3K)) or (
q3K[i] <= q3K[2 * i + 2] and check_min_heap(q3K, 2 * i + 2)
)
return left_child and right_child
| 1 | 748 |
mbpp
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
|
transformation_add_sub_variable
|
def check_min_heap(arr, i):
if 2 * i - 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
| 0 | 748 |
mbpp
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
|
transformation_mul_div_variable
|
def check_min_heap(arr, i):
if 2 / i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
| 0 | 748 |
mbpp
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
|
transformation_lesser_greater_variable
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] >= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
| 0 | 748 |
mbpp
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
|
transformation_greater_lesser_variable
|
def check_min_heap(arr, i):
if 2 * i + 2 < len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
| 0 | 748 |
mbpp
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
|
transformation_equalto_exclamation_variable
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 != len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
| 0 | 748 |
mbpp
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
|
transformation_true_false_variable
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return False
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
| 0 | 748 |
mbpp
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
|
transformation_and_or_variable
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) or check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
| 0 | 748 |
mbpp
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
|
transformation_or_and_variable
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) and (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
| 0 | 748 |
mbpp
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
|
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 | 748 |
mbpp
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 748 |
mbpp
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
|
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 | 748 |
mbpp
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
|
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 | 748 |
mbpp
|
def check_min_heap(arr, i):
if 2 * i + 2 > len(arr):
return True
left_child = (arr[i] <= arr[2 * i + 1]) and check_min_heap(arr, 2 * i + 1)
right_child = (2 * i + 2 == len(arr)) or (arr[i] <= arr[2 * i + 2]
and check_min_heap(arr, 2 * i + 2))
return left_child and right_child
|
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 | 748 |
mbpp
|
def extract_index_list(l1, l2, l3):
result = []
for m, n, o in zip(l1, l2, l3):
if (m == n == o):
result.append(m)
return result
|
transformation_dead_code_insert
|
def extract_index_list(l1, l2, l3):
_i_8 = 0
while _i_8 > _i_8:
return result
result = []
for m, n, o in zip(l1, l2, l3):
if m == n == o:
result.append(m)
return result
| 1 | 751 |
mbpp
|
def extract_index_list(l1, l2, l3):
result = []
for m, n, o in zip(l1, l2, l3):
if (m == n == o):
result.append(m)
return result
|
transformation_for_while_loop
|
def extract_index_list(l1, l2, l3):
result = []
for m, n, o in zip(l1, l2, l3):
if m == n == o:
result.append(m)
return result
| 1 | 751 |
mbpp
|
def extract_index_list(l1, l2, l3):
result = []
for m, n, o in zip(l1, l2, l3):
if (m == n == o):
result.append(m)
return result
|
transformation_operand_swap
|
def extract_index_list(l1, l2, l3):
result = []
for m, n, o in zip(l1, l2, l3):
if m == n == o:
result.append(m)
return result
| 1 | 751 |
mbpp
|
def extract_index_list(l1, l2, l3):
result = []
for m, n, o in zip(l1, l2, l3):
if (m == n == o):
result.append(m)
return result
|
transformation_rename_variable_cb
|
def extract_index_list(l1, l2, l3):
result = []
for i, n, o in zip(l1, l2, l3):
if i == n == o:
result.append(i)
return result
| 1 | 751 |
mbpp
|
def extract_index_list(l1, l2, l3):
result = []
for m, n, o in zip(l1, l2, l3):
if (m == n == o):
result.append(m)
return result
|
transformation_rename_variable_naive
|
def extract_index_list(l1, l2, l3):
result = []
for VAR_0, n, o in zip(l1, l2, l3):
if VAR_0 == n == o:
result.append(VAR_0)
return result
| 1 | 751 |
mbpp
|
def extract_index_list(l1, l2, l3):
result = []
for m, n, o in zip(l1, l2, l3):
if (m == n == o):
result.append(m)
return result
|
transformation_rename_variable_rn
|
def extract_index_list(l1, l2, l3):
result = []
for e, n, o in zip(l1, l2, l3):
if e == n == o:
result.append(e)
return result
| 1 | 751 |
mbpp
|
def extract_index_list(l1, l2, l3):
result = []
for m, n, o in zip(l1, l2, l3):
if (m == n == o):
result.append(m)
return result
|
transformation_equalto_exclamation_variable
|
def extract_index_list(l1, l2, l3):
result = []
for m, n, o in zip(l1, l2, l3):
if (m != n == o):
result.append(m)
return result
| 0 | 751 |
mbpp
|
def extract_index_list(l1, l2, l3):
result = []
for m, n, o in zip(l1, l2, l3):
if (m == n == o):
result.append(m)
return result
|
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 | 751 |
mbpp
|
def extract_index_list(l1, l2, l3):
result = []
for m, n, o in zip(l1, l2, l3):
if (m == n == o):
result.append(m)
return result
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 751 |
mbpp
|
def extract_index_list(l1, l2, l3):
result = []
for m, n, o in zip(l1, l2, l3):
if (m == n == o):
result.append(m)
return result
|
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 | 751 |
mbpp
|
def extract_index_list(l1, l2, l3):
result = []
for m, n, o in zip(l1, l2, l3):
if (m == n == o):
result.append(m)
return result
|
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 | 751 |
mbpp
|
def extract_index_list(l1, l2, l3):
result = []
for m, n, o in zip(l1, l2, l3):
if (m == n == o):
result.append(m)
return result
|
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 | 751 |
mbpp
|
def count_reverse_pairs(test_list):
res = sum([1 for idx in range(0, len(test_list)) for idxn in range(idx, len(
test_list)) if test_list[idxn] == str(''.join(list(reversed(test_list[idx]))))])
return str(res)
|
transformation_dead_code_insert
|
def count_reverse_pairs(test_list):
res = sum(
[
1
for idx in range(0, len(test_list))
for idxn in range(
idx,
len(
test_list
),
)
if test_list[idxn] == str("".join(list(reversed(test_list[idx]))))
]
)
return str(res)
| 1 | 754 |
mbpp
|
def count_reverse_pairs(test_list):
res = sum([1 for idx in range(0, len(test_list)) for idxn in range(idx, len(
test_list)) if test_list[idxn] == str(''.join(list(reversed(test_list[idx]))))])
return str(res)
|
transformation_for_while_loop
|
def count_reverse_pairs(test_list):
res = sum(
[
1
for idx in range(0, len(test_list))
for idxn in range(
idx,
len(
test_list
),
)
if test_list[idxn] == str("".join(list(reversed(test_list[idx]))))
]
)
return str(res)
| 1 | 754 |
mbpp
|
def count_reverse_pairs(test_list):
res = sum([1 for idx in range(0, len(test_list)) for idxn in range(idx, len(
test_list)) if test_list[idxn] == str(''.join(list(reversed(test_list[idx]))))])
return str(res)
|
transformation_operand_swap
|
def count_reverse_pairs(test_list):
res = sum(
[
1
for idx in range(0, len(test_list))
for idxn in range(
idx,
len(
test_list
),
)
if str("".join(list(reversed(test_list[idx])))) == test_list[idxn]
]
)
return str(res)
| 1 | 754 |
mbpp
|
def count_reverse_pairs(test_list):
res = sum([1 for idx in range(0, len(test_list)) for idxn in range(idx, len(
test_list)) if test_list[idxn] == str(''.join(list(reversed(test_list[idx]))))])
return str(res)
|
transformation_rename_variable_cb
|
def count_reverse_pairs(lines):
res = sum(
[
1
for idx in range(0, len(lines))
for idxn in range(
idx,
len(
lines
),
)
if lines[idxn] == str("".join(list(reversed(lines[idx]))))
]
)
return str(res)
| 1 | 754 |
mbpp
|
def count_reverse_pairs(test_list):
res = sum([1 for idx in range(0, len(test_list)) for idxn in range(idx, len(
test_list)) if test_list[idxn] == str(''.join(list(reversed(test_list[idx]))))])
return str(res)
|
transformation_rename_variable_naive
|
def count_reverse_pairs(VAR_0):
res = sum(
[
1
for idx in range(0, len(VAR_0))
for idxn in range(
idx,
len(
VAR_0
),
)
if VAR_0[idxn] == str("".join(list(reversed(VAR_0[idx]))))
]
)
return str(res)
| 1 | 754 |
mbpp
|
def count_reverse_pairs(test_list):
res = sum([1 for idx in range(0, len(test_list)) for idxn in range(idx, len(
test_list)) if test_list[idxn] == str(''.join(list(reversed(test_list[idx]))))])
return str(res)
|
transformation_rename_variable_rn
|
def count_reverse_pairs(P128N6224):
res = sum(
[
1
for idx in range(0, len(P128N6224))
for idxn in range(
idx,
len(
P128N6224
),
)
if P128N6224[idxn] == str("".join(list(reversed(P128N6224[idx]))))
]
)
return str(res)
| 1 | 754 |
mbpp
|
def count_reverse_pairs(test_list):
res = sum([1 for idx in range(0, len(test_list)) for idxn in range(idx, len(
test_list)) if test_list[idxn] == str(''.join(list(reversed(test_list[idx]))))])
return str(res)
|
transformation_equalto_exclamation_variable
|
def count_reverse_pairs(test_list):
res = sum([1 for idx in range(0, len(test_list)) for idxn in range(idx, len(
test_list)) if test_list[idxn] != str(''.join(list(reversed(test_list[idx]))))])
return str(res)
| 0 | 754 |
mbpp
|
def count_reverse_pairs(test_list):
res = sum([1 for idx in range(0, len(test_list)) for idxn in range(idx, len(
test_list)) if test_list[idxn] == str(''.join(list(reversed(test_list[idx]))))])
return str(res)
|
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 | 754 |
mbpp
|
def count_reverse_pairs(test_list):
res = sum([1 for idx in range(0, len(test_list)) for idxn in range(idx, len(
test_list)) if test_list[idxn] == str(''.join(list(reversed(test_list[idx]))))])
return str(res)
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 754 |
mbpp
|
def count_reverse_pairs(test_list):
res = sum([1 for idx in range(0, len(test_list)) for idxn in range(idx, len(
test_list)) if test_list[idxn] == str(''.join(list(reversed(test_list[idx]))))])
return str(res)
|
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 | 754 |
mbpp
|
def count_reverse_pairs(test_list):
res = sum([1 for idx in range(0, len(test_list)) for idxn in range(idx, len(
test_list)) if test_list[idxn] == str(''.join(list(reversed(test_list[idx]))))])
return str(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 | 754 |
mbpp
|
def count_reverse_pairs(test_list):
res = sum([1 for idx in range(0, len(test_list)) for idxn in range(idx, len(
test_list)) if test_list[idxn] == str(''.join(list(reversed(test_list[idx]))))])
return str(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 | 754 |
mbpp
|
def arc_length(d,a):
pi=22/7
if a >= 360:
return None
arclength = (pi*d) * (a/360)
return arclength
|
transformation_dead_code_insert
|
def arc_length(d, a):
pi = 22 / 7
if a >= 360:
for _i_6 in range(0):
return arclength
return None
arclength = (pi * d) * (a / 360)
return arclength
| 1 | 758 |
mbpp
|
def arc_length(d,a):
pi=22/7
if a >= 360:
return None
arclength = (pi*d) * (a/360)
return arclength
|
transformation_for_while_loop
|
def arc_length(d, a):
pi = 22 / 7
if a >= 360:
return None
arclength = (pi * d) * (a / 360)
return arclength
| 1 | 758 |
mbpp
|
def arc_length(d,a):
pi=22/7
if a >= 360:
return None
arclength = (pi*d) * (a/360)
return arclength
|
transformation_operand_swap
|
def arc_length(d, a):
pi = 22 / 7
if 360 <= a:
return None
arclength = (pi * d) * (a / 360)
return arclength
| 1 | 758 |
mbpp
|
def arc_length(d,a):
pi=22/7
if a >= 360:
return None
arclength = (pi*d) * (a/360)
return arclength
|
transformation_rename_variable_cb
|
def arc_length(d, pi2):
pi = 22 / 7
if pi2 >= 360:
return None
arclength = (pi * d) * (pi2 / 360)
return arclength
| 1 | 758 |
mbpp
|
def arc_length(d,a):
pi=22/7
if a >= 360:
return None
arclength = (pi*d) * (a/360)
return arclength
|
transformation_rename_variable_naive
|
def arc_length(d, VAR_0):
pi = 22 / 7
if VAR_0 >= 360:
return None
arclength = (pi * d) * (VAR_0 / 360)
return arclength
| 1 | 758 |
mbpp
|
def arc_length(d,a):
pi=22/7
if a >= 360:
return None
arclength = (pi*d) * (a/360)
return arclength
|
transformation_rename_variable_rn
|
def arc_length(d, L):
pi = 22 / 7
if L >= 360:
return None
arclength = (pi * d) * (L / 360)
return arclength
| 1 | 758 |
mbpp
|
def arc_length(d,a):
pi=22/7
if a >= 360:
return None
arclength = (pi*d) * (a/360)
return arclength
|
transformation_mul_div_variable
|
def arc_length(d,a):
pi=22/7
if a >= 360:
return None
arclength = (pi/d) * (a/360)
return arclength
| 0 | 758 |
mbpp
|
def arc_length(d,a):
pi=22/7
if a >= 360:
return None
arclength = (pi*d) * (a/360)
return arclength
|
transformation_div_mul_variable
|
def arc_length(d,a):
pi=22*7
if a >= 360:
return None
arclength = (pi*d) * (a/360)
return arclength
| 0 | 758 |
mbpp
|
def arc_length(d,a):
pi=22/7
if a >= 360:
return None
arclength = (pi*d) * (a/360)
return arclength
|
transformation_greater_lesser_variable
|
def arc_length(d,a):
pi=22/7
if a <= 360:
return None
arclength = (pi*d) * (a/360)
return arclength
| 0 | 758 |
mbpp
|
def arc_length(d,a):
pi=22/7
if a >= 360:
return None
arclength = (pi*d) * (a/360)
return arclength
|
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 | 758 |
mbpp
|
def arc_length(d,a):
pi=22/7
if a >= 360:
return None
arclength = (pi*d) * (a/360)
return arclength
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 758 |
mbpp
|
def arc_length(d,a):
pi=22/7
if a >= 360:
return None
arclength = (pi*d) * (a/360)
return arclength
|
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 | 758 |
mbpp
|
def arc_length(d,a):
pi=22/7
if a >= 360:
return None
arclength = (pi*d) * (a/360)
return arclength
|
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 | 758 |
mbpp
|
def arc_length(d,a):
pi=22/7
if a >= 360:
return None
arclength = (pi*d) * (a/360)
return arclength
|
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 | 758 |
mbpp
|
def find_Min_Diff(arr,n):
arr = sorted(arr)
diff = 10**20
for i in range(n-1):
if arr[i+1] - arr[i] < diff:
diff = arr[i+1] - arr[i]
return diff
|
transformation_dead_code_insert
|
def find_Min_Diff(arr, n):
for _i_2 in range(0):
return diff
arr = sorted(arr)
diff = 10 ** 20
for i in range(n - 1):
if arr[i + 1] - arr[i] < diff:
diff = arr[i + 1] - arr[i]
return diff
| 1 | 760 |
mbpp
|
def find_Min_Diff(arr,n):
arr = sorted(arr)
diff = 10**20
for i in range(n-1):
if arr[i+1] - arr[i] < diff:
diff = arr[i+1] - arr[i]
return diff
|
transformation_for_while_loop
|
def find_Min_Diff(arr, n):
arr = sorted(arr)
diff = 10 ** 20
i = 0
while i < n - 1:
if arr[i + 1] - arr[i] < diff:
diff = arr[i + 1] - arr[i]
i += 1
return diff
| 1 | 760 |
mbpp
|
def find_Min_Diff(arr,n):
arr = sorted(arr)
diff = 10**20
for i in range(n-1):
if arr[i+1] - arr[i] < diff:
diff = arr[i+1] - arr[i]
return diff
|
transformation_operand_swap
|
def find_Min_Diff(arr, n):
arr = sorted(arr)
diff = 10 ** 20
for i in range(n - 1):
if diff > arr[i + 1] - arr[i]:
diff = arr[i + 1] - arr[i]
return diff
| 1 | 760 |
mbpp
|
def find_Min_Diff(arr,n):
arr = sorted(arr)
diff = 10**20
for i in range(n-1):
if arr[i+1] - arr[i] < diff:
diff = arr[i+1] - arr[i]
return diff
|
transformation_rename_variable_cb
|
def find_Min_Diff(diff2, n):
diff2 = sorted(diff2)
diff = 10 ** 20
for i in range(n - 1):
if diff2[i + 1] - diff2[i] < diff:
diff = diff2[i + 1] - diff2[i]
return diff
| 1 | 760 |
mbpp
|
def find_Min_Diff(arr,n):
arr = sorted(arr)
diff = 10**20
for i in range(n-1):
if arr[i+1] - arr[i] < diff:
diff = arr[i+1] - arr[i]
return diff
|
transformation_rename_variable_naive
|
def find_Min_Diff(VAR_0, n):
VAR_0 = sorted(VAR_0)
diff = 10 ** 20
for i in range(n - 1):
if VAR_0[i + 1] - VAR_0[i] < diff:
diff = VAR_0[i + 1] - VAR_0[i]
return diff
| 1 | 760 |
mbpp
|
def find_Min_Diff(arr,n):
arr = sorted(arr)
diff = 10**20
for i in range(n-1):
if arr[i+1] - arr[i] < diff:
diff = arr[i+1] - arr[i]
return diff
|
transformation_rename_variable_rn
|
def find_Min_Diff(C9Z, n):
C9Z = sorted(C9Z)
diff = 10 ** 20
for i in range(n - 1):
if C9Z[i + 1] - C9Z[i] < diff:
diff = C9Z[i + 1] - C9Z[i]
return diff
| 1 | 760 |
mbpp
|
def find_Min_Diff(arr,n):
arr = sorted(arr)
diff = 10**20
for i in range(n-1):
if arr[i+1] - arr[i] < diff:
diff = arr[i+1] - arr[i]
return diff
|
transformation_add_sub_variable
|
def find_Min_Diff(arr,n):
arr = sorted(arr)
diff = 10**20
for i in range(n-1):
if arr[i-1] - arr[i] < diff:
diff = arr[i+1] - arr[i]
return diff
| 0 | 760 |
mbpp
|
def find_Min_Diff(arr,n):
arr = sorted(arr)
diff = 10**20
for i in range(n-1):
if arr[i+1] - arr[i] < diff:
diff = arr[i+1] - arr[i]
return diff
|
transformation_sub_add_variable
|
def find_Min_Diff(arr,n):
arr = sorted(arr)
diff = 10**20
for i in range(n+1):
if arr[i+1] - arr[i] < diff:
diff = arr[i+1] - arr[i]
return diff
| 0 | 760 |
mbpp
|
def find_Min_Diff(arr,n):
arr = sorted(arr)
diff = 10**20
for i in range(n-1):
if arr[i+1] - arr[i] < diff:
diff = arr[i+1] - arr[i]
return diff
|
transformation_mul_div_variable
|
def find_Min_Diff(arr,n):
arr = sorted(arr)
diff = 10/*20
for i in range(n-1):
if arr[i+1] - arr[i] < diff:
diff = arr[i+1] - arr[i]
return diff
| 0 | 760 |
mbpp
|
def find_Min_Diff(arr,n):
arr = sorted(arr)
diff = 10**20
for i in range(n-1):
if arr[i+1] - arr[i] < diff:
diff = arr[i+1] - arr[i]
return diff
|
transformation_lesser_greater_variable
|
def find_Min_Diff(arr,n):
arr = sorted(arr)
diff = 10**20
for i in range(n-1):
if arr[i+1] - arr[i] > diff:
diff = arr[i+1] - arr[i]
return diff
| 0 | 760 |
mbpp
|
def find_Min_Diff(arr,n):
arr = sorted(arr)
diff = 10**20
for i in range(n-1):
if arr[i+1] - arr[i] < diff:
diff = arr[i+1] - arr[i]
return diff
|
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 | 760 |
mbpp
|
def find_Min_Diff(arr,n):
arr = sorted(arr)
diff = 10**20
for i in range(n-1):
if arr[i+1] - arr[i] < diff:
diff = arr[i+1] - arr[i]
return diff
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 760 |
mbpp
|
def find_Min_Diff(arr,n):
arr = sorted(arr)
diff = 10**20
for i in range(n-1):
if arr[i+1] - arr[i] < diff:
diff = arr[i+1] - arr[i]
return diff
|
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 | 760 |
mbpp
|
def find_Min_Diff(arr,n):
arr = sorted(arr)
diff = 10**20
for i in range(n-1):
if arr[i+1] - arr[i] < diff:
diff = arr[i+1] - arr[i]
return diff
|
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 | 760 |
mbpp
|
def find_Min_Diff(arr,n):
arr = sorted(arr)
diff = 10**20
for i in range(n-1):
if arr[i+1] - arr[i] < diff:
diff = arr[i+1] - arr[i]
return diff
|
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 | 760 |
mbpp
|
def is_polite(n):
import math
n = n + 1
return (int)(n+(math.log((n + math.log(n, 2)), 2)))
|
transformation_dead_code_insert
|
def is_polite(n):
import math
for _i_3 in range(0):
n = n + 1
n = n + 1
return (int)(n + (math.log((n + math.log(n, 2)), 2)))
| 1 | 762 |
mbpp
|
def is_polite(n):
import math
n = n + 1
return (int)(n+(math.log((n + math.log(n, 2)), 2)))
|
transformation_for_while_loop
|
def is_polite(n):
import math
n = n + 1
return (int)(n + (math.log((n + math.log(n, 2)), 2)))
| 1 | 762 |
mbpp
|
def is_polite(n):
import math
n = n + 1
return (int)(n+(math.log((n + math.log(n, 2)), 2)))
|
transformation_operand_swap
|
def is_polite(n):
import math
n = n + 1
return (int)(n + (math.log((n + math.log(n, 2)), 2)))
| 1 | 762 |
mbpp
|
def is_polite(n):
import math
n = n + 1
return (int)(n+(math.log((n + math.log(n, 2)), 2)))
|
transformation_rename_variable_cb
|
def is_polite(i):
import math
i = i + 1
return (int)(i + (math.log((i + math.log(i, 2)), 2)))
| 1 | 762 |
mbpp
|
def is_polite(n):
import math
n = n + 1
return (int)(n+(math.log((n + math.log(n, 2)), 2)))
|
transformation_rename_variable_naive
|
def is_polite(VAR_0):
import math
VAR_0 = VAR_0 + 1
return (int)(VAR_0 + (math.log((VAR_0 + math.log(VAR_0, 2)), 2)))
| 1 | 762 |
mbpp
|
def is_polite(n):
import math
n = n + 1
return (int)(n+(math.log((n + math.log(n, 2)), 2)))
|
transformation_rename_variable_rn
|
def is_polite(U):
import math
U = U + 1
return (int)(U + (math.log((U + math.log(U, 2)), 2)))
| 1 | 762 |
mbpp
|
def is_polite(n):
import math
n = n + 1
return (int)(n+(math.log((n + math.log(n, 2)), 2)))
|
transformation_add_sub_variable
|
def is_polite(n):
import math
n = n - 1
return (int)(n+(math.log((n + math.log(n, 2)), 2)))
| 0 | 762 |
mbpp
|
def is_polite(n):
import math
n = n + 1
return (int)(n+(math.log((n + math.log(n, 2)), 2)))
|
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 | 762 |
mbpp
|
def is_polite(n):
import math
n = n + 1
return (int)(n+(math.log((n + math.log(n, 2)), 2)))
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 762 |
mbpp
|
def is_polite(n):
import math
n = n + 1
return (int)(n+(math.log((n + math.log(n, 2)), 2)))
|
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 | 762 |
mbpp
|
def is_polite(n):
import math
n = n + 1
return (int)(n+(math.log((n + math.log(n, 2)), 2)))
|
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 | 762 |
mbpp
|
def is_polite(n):
import math
n = n + 1
return (int)(n+(math.log((n + math.log(n, 2)), 2)))
|
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 | 762 |
mbpp
|
def pair_wise(l1):
temp = []
for i in range(len(l1) - 1):
current_element, next_element = l1[i], l1[i + 1]
x = (current_element, next_element)
temp.append(x)
return temp
|
transformation_dead_code_insert
|
def pair_wise(l1):
while False:
temp = []
temp = []
for i in range(len(l1) - 1):
current_element, next_element = l1[i], l1[i + 1]
x = (current_element, next_element)
temp.append(x)
return temp
| 1 | 763 |
mbpp
|
def pair_wise(l1):
temp = []
for i in range(len(l1) - 1):
current_element, next_element = l1[i], l1[i + 1]
x = (current_element, next_element)
temp.append(x)
return temp
|
transformation_for_while_loop
|
def pair_wise(l1):
temp = []
i = 0
while i < len(l1) - 1:
current_element, next_element = l1[i], l1[i + 1]
x = (current_element, next_element)
temp.append(x)
i += 1
return temp
| 1 | 763 |
mbpp
|
def pair_wise(l1):
temp = []
for i in range(len(l1) - 1):
current_element, next_element = l1[i], l1[i + 1]
x = (current_element, next_element)
temp.append(x)
return temp
|
transformation_operand_swap
|
def pair_wise(l1):
temp = []
for i in range(len(l1) - 1):
current_element, next_element = l1[i], l1[i + 1]
x = (current_element, next_element)
temp.append(x)
return temp
| 1 | 763 |
mbpp
|
def pair_wise(l1):
temp = []
for i in range(len(l1) - 1):
current_element, next_element = l1[i], l1[i + 1]
x = (current_element, next_element)
temp.append(x)
return temp
|
transformation_rename_variable_cb
|
def pair_wise(x2):
temp = []
for i in range(len(x2) - 1):
current_element, next_element = x2[i], x2[i + 1]
x = (current_element, next_element)
temp.append(x)
return temp
| 1 | 763 |
mbpp
|
def pair_wise(l1):
temp = []
for i in range(len(l1) - 1):
current_element, next_element = l1[i], l1[i + 1]
x = (current_element, next_element)
temp.append(x)
return temp
|
transformation_rename_variable_naive
|
def pair_wise(VAR_0):
temp = []
for i in range(len(VAR_0) - 1):
current_element, next_element = VAR_0[i], VAR_0[i + 1]
x = (current_element, next_element)
temp.append(x)
return temp
| 1 | 763 |
mbpp
|
def pair_wise(l1):
temp = []
for i in range(len(l1) - 1):
current_element, next_element = l1[i], l1[i + 1]
x = (current_element, next_element)
temp.append(x)
return temp
|
transformation_rename_variable_rn
|
def pair_wise(T3):
temp = []
for i in range(len(T3) - 1):
current_element, next_element = T3[i], T3[i + 1]
x = (current_element, next_element)
temp.append(x)
return temp
| 1 | 763 |
mbpp
|
def pair_wise(l1):
temp = []
for i in range(len(l1) - 1):
current_element, next_element = l1[i], l1[i + 1]
x = (current_element, next_element)
temp.append(x)
return temp
|
transformation_add_sub_variable
|
def pair_wise(l1):
temp = []
for i in range(len(l1) - 1):
current_element, next_element = l1[i], l1[i - 1]
x = (current_element, next_element)
temp.append(x)
return temp
| 0 | 763 |
mbpp
|
def pair_wise(l1):
temp = []
for i in range(len(l1) - 1):
current_element, next_element = l1[i], l1[i + 1]
x = (current_element, next_element)
temp.append(x)
return temp
|
transformation_sub_add_variable
|
def pair_wise(l1):
temp = []
for i in range(len(l1) + 1):
current_element, next_element = l1[i], l1[i + 1]
x = (current_element, next_element)
temp.append(x)
return temp
| 0 | 763 |
mbpp
|
def pair_wise(l1):
temp = []
for i in range(len(l1) - 1):
current_element, next_element = l1[i], l1[i + 1]
x = (current_element, next_element)
temp.append(x)
return temp
|
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 | 763 |
mbpp
|
def pair_wise(l1):
temp = []
for i in range(len(l1) - 1):
current_element, next_element = l1[i], l1[i + 1]
x = (current_element, next_element)
temp.append(x)
return temp
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 763 |
mbpp
|
def pair_wise(l1):
temp = []
for i in range(len(l1) - 1):
current_element, next_element = l1[i], l1[i + 1]
x = (current_element, next_element)
temp.append(x)
return temp
|
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 | 763 |
mbpp
|
def pair_wise(l1):
temp = []
for i in range(len(l1) - 1):
current_element, next_element = l1[i], l1[i + 1]
x = (current_element, next_element)
temp.append(x)
return temp
|
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 | 763 |
mbpp
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.