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 is_woodall(x):
if (x % 2 == 0):
return False
if (x == 1):
return True
x = x + 1
p = 0
while (x % 2 == 0):
x = x/2
p = p + 1
if (p == x):
return True
return False
|
transformation_rename_variable_naive
|
def is_woodall(VAR_0):
if VAR_0 % 2 == 0:
return False
if VAR_0 == 1:
return True
VAR_0 = VAR_0 + 1
p = 0
while VAR_0 % 2 == 0:
VAR_0 = VAR_0 / 2
p = p + 1
if p == VAR_0:
return True
return False
| 1 | 19 |
mbpp
|
def is_woodall(x):
if (x % 2 == 0):
return False
if (x == 1):
return True
x = x + 1
p = 0
while (x % 2 == 0):
x = x/2
p = p + 1
if (p == x):
return True
return False
|
transformation_rename_variable_rn
|
def is_woodall(z):
if z % 2 == 0:
return False
if z == 1:
return True
z = z + 1
p = 0
while z % 2 == 0:
z = z / 2
p = p + 1
if p == z:
return True
return False
| 1 | 19 |
mbpp
|
def is_woodall(x):
if (x % 2 == 0):
return False
if (x == 1):
return True
x = x + 1
p = 0
while (x % 2 == 0):
x = x/2
p = p + 1
if (p == x):
return True
return False
|
transformation_add_sub_variable
|
def is_woodall(x):
if (x % 2 == 0):
return False
if (x == 1):
return True
x = x - 1
p = 0
while (x % 2 == 0):
x = x/2
p = p + 1
if (p == x):
return True
return False
| 0 | 19 |
mbpp
|
def is_woodall(x):
if (x % 2 == 0):
return False
if (x == 1):
return True
x = x + 1
p = 0
while (x % 2 == 0):
x = x/2
p = p + 1
if (p == x):
return True
return False
|
transformation_div_mul_variable
|
def is_woodall(x):
if (x % 2 == 0):
return False
if (x == 1):
return True
x = x + 1
p = 0
while (x % 2 == 0):
x = x*2
p = p + 1
if (p == x):
return True
return False
| 0 | 19 |
mbpp
|
def is_woodall(x):
if (x % 2 == 0):
return False
if (x == 1):
return True
x = x + 1
p = 0
while (x % 2 == 0):
x = x/2
p = p + 1
if (p == x):
return True
return False
|
transformation_equalto_exclamation_variable
|
def is_woodall(x):
if (x % 2 != 0):
return False
if (x == 1):
return True
x = x + 1
p = 0
while (x % 2 == 0):
x = x/2
p = p + 1
if (p == x):
return True
return False
| 0 | 19 |
mbpp
|
def is_woodall(x):
if (x % 2 == 0):
return False
if (x == 1):
return True
x = x + 1
p = 0
while (x % 2 == 0):
x = x/2
p = p + 1
if (p == x):
return True
return False
|
transformation_true_false_variable
|
def is_woodall(x):
if (x % 2 == 0):
return False
if (x == 1):
return False
x = x + 1
p = 0
while (x % 2 == 0):
x = x/2
p = p + 1
if (p == x):
return True
return False
| 0 | 19 |
mbpp
|
def is_woodall(x):
if (x % 2 == 0):
return False
if (x == 1):
return True
x = x + 1
p = 0
while (x % 2 == 0):
x = x/2
p = p + 1
if (p == x):
return True
return False
|
transformation_false_true_variable
|
def is_woodall(x):
if (x % 2 == 0):
return True
if (x == 1):
return True
x = x + 1
p = 0
while (x % 2 == 0):
x = x/2
p = p + 1
if (p == x):
return True
return False
| 0 | 19 |
mbpp
|
def is_woodall(x):
if (x % 2 == 0):
return False
if (x == 1):
return True
x = x + 1
p = 0
while (x % 2 == 0):
x = x/2
p = p + 1
if (p == x):
return True
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 | 19 |
mbpp
|
def is_woodall(x):
if (x % 2 == 0):
return False
if (x == 1):
return True
x = x + 1
p = 0
while (x % 2 == 0):
x = x/2
p = p + 1
if (p == x):
return True
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 | 19 |
mbpp
|
def is_woodall(x):
if (x % 2 == 0):
return False
if (x == 1):
return True
x = x + 1
p = 0
while (x % 2 == 0):
x = x/2
p = p + 1
if (p == x):
return True
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 | 19 |
mbpp
|
def is_woodall(x):
if (x % 2 == 0):
return False
if (x == 1):
return True
x = x + 1
p = 0
while (x % 2 == 0):
x = x/2
p = p + 1
if (p == x):
return True
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 | 19 |
mbpp
|
def is_woodall(x):
if (x % 2 == 0):
return False
if (x == 1):
return True
x = x + 1
p = 0
while (x % 2 == 0):
x = x/2
p = p + 1
if (p == x):
return True
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 | 19 |
mbpp
|
def multiples_of_num(m,n):
multiples_of_num= list(range(n,(m+1)*n, n))
return list(multiples_of_num)
|
transformation_dead_code_insert
|
def multiples_of_num(m, n):
for _i_9 in range(0):
return list(multiples_of_num)
multiples_of_num = list(range(n, (m + 1) * n, n))
return list(multiples_of_num)
| 1 | 20 |
mbpp
|
def multiples_of_num(m,n):
multiples_of_num= list(range(n,(m+1)*n, n))
return list(multiples_of_num)
|
transformation_add_sub_variable
|
def multiples_of_num(m,n):
multiples_of_num= list(range(n,(m-1)*n, n))
return list(multiples_of_num)
| 0 | 20 |
mbpp
|
def multiples_of_num(m,n):
multiples_of_num= list(range(n,(m+1)*n, n))
return list(multiples_of_num)
|
transformation_mul_div_variable
|
def multiples_of_num(m,n):
multiples_of_num= list(range(n,(m+1)/n, n))
return list(multiples_of_num)
| 0 | 20 |
mbpp
|
def multiples_of_num(m,n):
multiples_of_num= list(range(n,(m+1)*n, n))
return list(multiples_of_num)
|
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 | 20 |
mbpp
|
def multiples_of_num(m,n):
multiples_of_num= list(range(n,(m+1)*n, n))
return list(multiples_of_num)
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 20 |
mbpp
|
def multiples_of_num(m,n):
multiples_of_num= list(range(n,(m+1)*n, n))
return list(multiples_of_num)
|
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 | 20 |
mbpp
|
def multiples_of_num(m,n):
multiples_of_num= list(range(n,(m+1)*n, n))
return list(multiples_of_num)
|
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 | 20 |
mbpp
|
def multiples_of_num(m,n):
multiples_of_num= list(range(n,(m+1)*n, n))
return list(multiples_of_num)
|
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 | 20 |
mbpp
|
def find_first_duplicate(nums):
num_set = set()
no_duplicate = -1
for i in range(len(nums)):
if nums[i] in num_set:
return nums[i]
else:
num_set.add(nums[i])
return no_duplicate
|
transformation_dead_code_insert
|
def find_first_duplicate(nums):
if False:
no_duplicate = -1
num_set = set()
no_duplicate = -1
for i in range(len(nums)):
if nums[i] in num_set:
return nums[i]
else:
num_set.add(nums[i])
return no_duplicate
| 1 | 21 |
mbpp
|
def find_first_duplicate(nums):
num_set = set()
no_duplicate = -1
for i in range(len(nums)):
if nums[i] in num_set:
return nums[i]
else:
num_set.add(nums[i])
return no_duplicate
|
transformation_for_while_loop
|
def find_first_duplicate(nums):
num_set = set()
no_duplicate = -1
i = 0
while i < len(nums):
if nums[i] in num_set:
return nums[i]
else:
num_set.add(nums[i])
i += 1
return no_duplicate
| 1 | 21 |
mbpp
|
def find_first_duplicate(nums):
num_set = set()
no_duplicate = -1
for i in range(len(nums)):
if nums[i] in num_set:
return nums[i]
else:
num_set.add(nums[i])
return no_duplicate
|
transformation_operand_swap
|
def find_first_duplicate(nums):
num_set = set()
no_duplicate = -1
for i in range(len(nums)):
if nums[i] in num_set:
return nums[i]
else:
num_set.add(nums[i])
return no_duplicate
| 1 | 21 |
mbpp
|
def find_first_duplicate(nums):
num_set = set()
no_duplicate = -1
for i in range(len(nums)):
if nums[i] in num_set:
return nums[i]
else:
num_set.add(nums[i])
return no_duplicate
|
transformation_rename_variable_cb
|
def find_first_duplicate(lines):
num_set = set()
no_duplicate = -1
for i in range(len(lines)):
if lines[i] in num_set:
return lines[i]
else:
num_set.add(lines[i])
return no_duplicate
| 1 | 21 |
mbpp
|
def find_first_duplicate(nums):
num_set = set()
no_duplicate = -1
for i in range(len(nums)):
if nums[i] in num_set:
return nums[i]
else:
num_set.add(nums[i])
return no_duplicate
|
transformation_rename_variable_naive
|
def find_first_duplicate(VAR_0):
num_set = set()
no_duplicate = -1
for i in range(len(VAR_0)):
if VAR_0[i] in num_set:
return VAR_0[i]
else:
num_set.add(VAR_0[i])
return no_duplicate
| 1 | 21 |
mbpp
|
def find_first_duplicate(nums):
num_set = set()
no_duplicate = -1
for i in range(len(nums)):
if nums[i] in num_set:
return nums[i]
else:
num_set.add(nums[i])
return no_duplicate
|
transformation_rename_variable_rn
|
def find_first_duplicate(u66P):
num_set = set()
no_duplicate = -1
for i in range(len(u66P)):
if u66P[i] in num_set:
return u66P[i]
else:
num_set.add(u66P[i])
return no_duplicate
| 1 | 21 |
mbpp
|
def find_first_duplicate(nums):
num_set = set()
no_duplicate = -1
for i in range(len(nums)):
if nums[i] in num_set:
return nums[i]
else:
num_set.add(nums[i])
return no_duplicate
|
transformation_sub_add_variable
|
def find_first_duplicate(nums):
num_set = set()
no_duplicate = +1
for i in range(len(nums)):
if nums[i] in num_set:
return nums[i]
else:
num_set.add(nums[i])
return no_duplicate
| 0 | 21 |
mbpp
|
def find_first_duplicate(nums):
num_set = set()
no_duplicate = -1
for i in range(len(nums)):
if nums[i] in num_set:
return nums[i]
else:
num_set.add(nums[i])
return no_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 | 21 |
mbpp
|
def find_first_duplicate(nums):
num_set = set()
no_duplicate = -1
for i in range(len(nums)):
if nums[i] in num_set:
return nums[i]
else:
num_set.add(nums[i])
return no_duplicate
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 21 |
mbpp
|
def find_first_duplicate(nums):
num_set = set()
no_duplicate = -1
for i in range(len(nums)):
if nums[i] in num_set:
return nums[i]
else:
num_set.add(nums[i])
return no_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 | 21 |
mbpp
|
def find_first_duplicate(nums):
num_set = set()
no_duplicate = -1
for i in range(len(nums)):
if nums[i] in num_set:
return nums[i]
else:
num_set.add(nums[i])
return no_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 | 21 |
mbpp
|
def find_first_duplicate(nums):
num_set = set()
no_duplicate = -1
for i in range(len(nums)):
if nums[i] in num_set:
return nums[i]
else:
num_set.add(nums[i])
return no_duplicate
|
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 | 21 |
mbpp
|
def maximum_Sum(list1):
maxi = -100000
for x in list1:
sum = 0
for y in x:
sum+= y
maxi = max(sum,maxi)
return maxi
|
transformation_dead_code_insert
|
def maximum_Sum(list1):
while False:
maxi = max(sum, maxi)
maxi = -100000
for x in list1:
sum = 0
for y in x:
sum += y
maxi = max(sum, maxi)
return maxi
| 1 | 22 |
mbpp
|
def maximum_Sum(list1):
maxi = -100000
for x in list1:
sum = 0
for y in x:
sum+= y
maxi = max(sum,maxi)
return maxi
|
transformation_for_while_loop
|
def maximum_Sum(list1):
maxi = -100000
_x_i = 0
while _x_i < len(list1):
x = list1[_x_i]
sum = 0
for y in x:
sum += y
maxi = max(sum, maxi)
_x_i += 1
return maxi
| 1 | 22 |
mbpp
|
def maximum_Sum(list1):
maxi = -100000
for x in list1:
sum = 0
for y in x:
sum+= y
maxi = max(sum,maxi)
return maxi
|
transformation_operand_swap
|
def maximum_Sum(list1):
maxi = -100000
for x in list1:
sum = 0
for y in x:
sum += y
maxi = max(sum, maxi)
return maxi
| 1 | 22 |
mbpp
|
def maximum_Sum(list1):
maxi = -100000
for x in list1:
sum = 0
for y in x:
sum+= y
maxi = max(sum,maxi)
return maxi
|
transformation_rename_variable_cb
|
def maximum_Sum(list1):
y2 = -100000
for x in list1:
sum = 0
for y in x:
sum += y
y2 = max(sum, y2)
return y2
| 1 | 22 |
mbpp
|
def maximum_Sum(list1):
maxi = -100000
for x in list1:
sum = 0
for y in x:
sum+= y
maxi = max(sum,maxi)
return maxi
|
transformation_rename_variable_naive
|
def maximum_Sum(list1):
VAR_0 = -100000
for x in list1:
sum = 0
for y in x:
sum += y
VAR_0 = max(sum, VAR_0)
return VAR_0
| 1 | 22 |
mbpp
|
def maximum_Sum(list1):
maxi = -100000
for x in list1:
sum = 0
for y in x:
sum+= y
maxi = max(sum,maxi)
return maxi
|
transformation_rename_variable_rn
|
def maximum_Sum(list1):
YK8l = -100000
for x in list1:
sum = 0
for y in x:
sum += y
YK8l = max(sum, YK8l)
return YK8l
| 1 | 22 |
mbpp
|
def maximum_Sum(list1):
maxi = -100000
for x in list1:
sum = 0
for y in x:
sum+= y
maxi = max(sum,maxi)
return maxi
|
transformation_add_sub_variable
|
def maximum_Sum(list1):
maxi = -100000
for x in list1:
sum = 0
for y in x:
sum-= y
maxi = max(sum,maxi)
return maxi
| 0 | 22 |
mbpp
|
def maximum_Sum(list1):
maxi = -100000
for x in list1:
sum = 0
for y in x:
sum+= y
maxi = max(sum,maxi)
return maxi
|
transformation_sub_add_variable
|
def maximum_Sum(list1):
maxi = +100000
for x in list1:
sum = 0
for y in x:
sum+= y
maxi = max(sum,maxi)
return maxi
| 0 | 22 |
mbpp
|
def maximum_Sum(list1):
maxi = -100000
for x in list1:
sum = 0
for y in x:
sum+= y
maxi = max(sum,maxi)
return maxi
|
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 | 22 |
mbpp
|
def maximum_Sum(list1):
maxi = -100000
for x in list1:
sum = 0
for y in x:
sum+= y
maxi = max(sum,maxi)
return maxi
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 22 |
mbpp
|
def maximum_Sum(list1):
maxi = -100000
for x in list1:
sum = 0
for y in x:
sum+= y
maxi = max(sum,maxi)
return maxi
|
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 | 22 |
mbpp
|
def maximum_Sum(list1):
maxi = -100000
for x in list1:
sum = 0
for y in x:
sum+= y
maxi = max(sum,maxi)
return maxi
|
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 | 22 |
mbpp
|
def maximum_Sum(list1):
maxi = -100000
for x in list1:
sum = 0
for y in x:
sum+= y
maxi = max(sum,maxi)
return maxi
|
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 | 22 |
mbpp
|
def remove(list):
import re
pattern = '[0-9]'
list = [re.sub(pattern, '', i) for i in list]
return list
|
transformation_dead_code_insert
|
def remove(list):
import re
while False:
list = [re.sub(pattern, "", i) for i in list]
pattern = "[0-9]"
list = [re.sub(pattern, "", i) for i in list]
return list
| 1 | 26 |
mbpp
|
def remove(list):
import re
pattern = '[0-9]'
list = [re.sub(pattern, '', i) for i in list]
return list
|
transformation_for_while_loop
|
def remove(list):
import re
pattern = "[0-9]"
list = [re.sub(pattern, "", i) for i in list]
return list
| 1 | 26 |
mbpp
|
def remove(list):
import re
pattern = '[0-9]'
list = [re.sub(pattern, '', i) for i in list]
return list
|
transformation_operand_swap
|
def remove(list):
import re
pattern = "[0-9]"
list = [re.sub(pattern, "", i) for i in list]
return list
| 1 | 26 |
mbpp
|
def remove(list):
import re
pattern = '[0-9]'
list = [re.sub(pattern, '', i) for i in list]
return list
|
transformation_rename_variable_cb
|
def remove(list):
import re
pattern = "[0-9]"
list = [re.sub(pattern, "", r) for r in list]
return list
| 1 | 26 |
mbpp
|
def remove(list):
import re
pattern = '[0-9]'
list = [re.sub(pattern, '', i) for i in list]
return list
|
transformation_rename_variable_naive
|
def remove(list):
import re
VAR_0 = "[0-9]"
list = [re.sub(VAR_0, "", i) for i in list]
return list
| 1 | 26 |
mbpp
|
def remove(list):
import re
pattern = '[0-9]'
list = [re.sub(pattern, '', i) for i in list]
return list
|
transformation_rename_variable_rn
|
def remove(list):
import re
pattern = "[0-9]"
list = [re.sub(pattern, "", S) for S in list]
return list
| 1 | 26 |
mbpp
|
def remove(list):
import re
pattern = '[0-9]'
list = [re.sub(pattern, '', i) for i in list]
return list
|
transformation_sub_add_variable
|
def remove(list):
import re
pattern = '[0+9]'
list = [re.sub(pattern, '', i) for i in list]
return list
| 0 | 26 |
mbpp
|
def remove(list):
import re
pattern = '[0-9]'
list = [re.sub(pattern, '', i) for i in list]
return list
|
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 | 26 |
mbpp
|
def remove(list):
import re
pattern = '[0-9]'
list = [re.sub(pattern, '', i) for i in list]
return list
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 26 |
mbpp
|
def remove(list):
import re
pattern = '[0-9]'
list = [re.sub(pattern, '', i) for i in list]
return 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 | 26 |
mbpp
|
def remove(list):
import re
pattern = '[0-9]'
list = [re.sub(pattern, '', i) for i in list]
return 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 | 26 |
mbpp
|
def remove(list):
import re
pattern = '[0-9]'
list = [re.sub(pattern, '', i) for i in list]
return 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 | 26 |
mbpp
|
def binomial_Coeff(n,k):
if k > n :
return 0
if k==0 or k ==n :
return 1
return binomial_Coeff(n-1,k-1) + binomial_Coeff(n-1,k)
|
transformation_dead_code_insert
|
def binomial_Coeff(n, k):
if k > n:
if False:
return 1
return 0
if k == 0 or k == n:
return 1
return binomial_Coeff(n - 1, k - 1) + binomial_Coeff(n - 1, k)
| 1 | 27 |
mbpp
|
def binomial_Coeff(n,k):
if k > n :
return 0
if k==0 or k ==n :
return 1
return binomial_Coeff(n-1,k-1) + binomial_Coeff(n-1,k)
|
transformation_for_while_loop
|
def binomial_Coeff(n, k):
if k > n:
return 0
if k == 0 or k == n:
return 1
return binomial_Coeff(n - 1, k - 1) + binomial_Coeff(n - 1, k)
| 1 | 27 |
mbpp
|
def binomial_Coeff(n,k):
if k > n :
return 0
if k==0 or k ==n :
return 1
return binomial_Coeff(n-1,k-1) + binomial_Coeff(n-1,k)
|
transformation_operand_swap
|
def binomial_Coeff(n, k):
if n < k:
return 0
if k == 0 or k == n:
return 1
return binomial_Coeff(n - 1, k - 1) + binomial_Coeff(n - 1, k)
| 1 | 27 |
mbpp
|
def binomial_Coeff(n,k):
if k > n :
return 0
if k==0 or k ==n :
return 1
return binomial_Coeff(n-1,k-1) + binomial_Coeff(n-1,k)
|
transformation_rename_variable_cb
|
def binomial_Coeff(n, n2):
if n2 > n:
return 0
if n2 == 0 or n2 == n:
return 1
return binomial_Coeff(n - 1, n2 - 1) + binomial_Coeff(n - 1, n2)
| 1 | 27 |
mbpp
|
def binomial_Coeff(n,k):
if k > n :
return 0
if k==0 or k ==n :
return 1
return binomial_Coeff(n-1,k-1) + binomial_Coeff(n-1,k)
|
transformation_rename_variable_naive
|
def binomial_Coeff(n, VAR_0):
if VAR_0 > n:
return 0
if VAR_0 == 0 or VAR_0 == n:
return 1
return binomial_Coeff(n - 1, VAR_0 - 1) + binomial_Coeff(n - 1, VAR_0)
| 1 | 27 |
mbpp
|
def binomial_Coeff(n,k):
if k > n :
return 0
if k==0 or k ==n :
return 1
return binomial_Coeff(n-1,k-1) + binomial_Coeff(n-1,k)
|
transformation_rename_variable_rn
|
def binomial_Coeff(n, F):
if F > n:
return 0
if F == 0 or F == n:
return 1
return binomial_Coeff(n - 1, F - 1) + binomial_Coeff(n - 1, F)
| 1 | 27 |
mbpp
|
def binomial_Coeff(n,k):
if k > n :
return 0
if k==0 or k ==n :
return 1
return binomial_Coeff(n-1,k-1) + binomial_Coeff(n-1,k)
|
transformation_add_sub_variable
|
def binomial_Coeff(n,k):
if k > n :
return 0
if k==0 or k ==n :
return 1
return binomial_Coeff(n-1,k-1) - binomial_Coeff(n-1,k)
| 0 | 27 |
mbpp
|
def binomial_Coeff(n,k):
if k > n :
return 0
if k==0 or k ==n :
return 1
return binomial_Coeff(n-1,k-1) + binomial_Coeff(n-1,k)
|
transformation_sub_add_variable
|
def binomial_Coeff(n,k):
if k > n :
return 0
if k==0 or k ==n :
return 1
return binomial_Coeff(n+1,k-1) + binomial_Coeff(n-1,k)
| 0 | 27 |
mbpp
|
def binomial_Coeff(n,k):
if k > n :
return 0
if k==0 or k ==n :
return 1
return binomial_Coeff(n-1,k-1) + binomial_Coeff(n-1,k)
|
transformation_greater_lesser_variable
|
def binomial_Coeff(n,k):
if k < n :
return 0
if k==0 or k ==n :
return 1
return binomial_Coeff(n-1,k-1) + binomial_Coeff(n-1,k)
| 0 | 27 |
mbpp
|
def binomial_Coeff(n,k):
if k > n :
return 0
if k==0 or k ==n :
return 1
return binomial_Coeff(n-1,k-1) + binomial_Coeff(n-1,k)
|
transformation_equalto_exclamation_variable
|
def binomial_Coeff(n,k):
if k > n :
return 0
if k!=0 or k ==n :
return 1
return binomial_Coeff(n-1,k-1) + binomial_Coeff(n-1,k)
| 0 | 27 |
mbpp
|
def binomial_Coeff(n,k):
if k > n :
return 0
if k==0 or k ==n :
return 1
return binomial_Coeff(n-1,k-1) + binomial_Coeff(n-1,k)
|
transformation_or_and_variable
|
def binomial_Coeff(n,k):
if k > n :
return 0
if k==0 and k ==n :
return 1
return binomial_Coeff(n-1,k-1) + binomial_Coeff(n-1,k)
| 0 | 27 |
mbpp
|
def binomial_Coeff(n,k):
if k > n :
return 0
if k==0 or k ==n :
return 1
return binomial_Coeff(n-1,k-1) + binomial_Coeff(n-1,k)
|
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 | 27 |
mbpp
|
def binomial_Coeff(n,k):
if k > n :
return 0
if k==0 or k ==n :
return 1
return binomial_Coeff(n-1,k-1) + binomial_Coeff(n-1,k)
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 27 |
mbpp
|
def binomial_Coeff(n,k):
if k > n :
return 0
if k==0 or k ==n :
return 1
return binomial_Coeff(n-1,k-1) + binomial_Coeff(n-1,k)
|
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 | 27 |
mbpp
|
def binomial_Coeff(n,k):
if k > n :
return 0
if k==0 or k ==n :
return 1
return binomial_Coeff(n-1,k-1) + binomial_Coeff(n-1,k)
|
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 | 27 |
mbpp
|
def binomial_Coeff(n,k):
if k > n :
return 0
if k==0 or k ==n :
return 1
return binomial_Coeff(n-1,k-1) + binomial_Coeff(n-1,k)
|
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 | 27 |
mbpp
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while (N != 0):
rem = N % 2
c = pow(10,cnt)
B_Number += rem*c
N //= 2
cnt += 1
return B_Number
|
transformation_dead_code_insert
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while N != 0:
rem = N % 2
_i_8 = 0
if _i_8 < _i_8:
cnt = 0
c = pow(10, cnt)
B_Number += rem * c
N //= 2
cnt += 1
return B_Number
| 1 | 32 |
mbpp
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while (N != 0):
rem = N % 2
c = pow(10,cnt)
B_Number += rem*c
N //= 2
cnt += 1
return B_Number
|
transformation_for_while_loop
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while N != 0:
rem = N % 2
c = pow(10, cnt)
B_Number += rem * c
N //= 2
cnt += 1
return B_Number
| 1 | 32 |
mbpp
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while (N != 0):
rem = N % 2
c = pow(10,cnt)
B_Number += rem*c
N //= 2
cnt += 1
return B_Number
|
transformation_operand_swap
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while 0 != N:
rem = N % 2
c = pow(10, cnt)
B_Number += rem * c
N //= 2
cnt += 1
return B_Number
| 1 | 32 |
mbpp
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while (N != 0):
rem = N % 2
c = pow(10,cnt)
B_Number += rem*c
N //= 2
cnt += 1
return B_Number
|
transformation_rename_variable_cb
|
def decimal_To_Binary(rem2):
B_Number = 0
cnt = 0
while rem2 != 0:
rem = rem2 % 2
c = pow(10, cnt)
B_Number += rem * c
rem2 //= 2
cnt += 1
return B_Number
| 1 | 32 |
mbpp
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while (N != 0):
rem = N % 2
c = pow(10,cnt)
B_Number += rem*c
N //= 2
cnt += 1
return B_Number
|
transformation_rename_variable_naive
|
def decimal_To_Binary(VAR_0):
B_Number = 0
cnt = 0
while VAR_0 != 0:
rem = VAR_0 % 2
c = pow(10, cnt)
B_Number += rem * c
VAR_0 //= 2
cnt += 1
return B_Number
| 1 | 32 |
mbpp
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while (N != 0):
rem = N % 2
c = pow(10,cnt)
B_Number += rem*c
N //= 2
cnt += 1
return B_Number
|
transformation_rename_variable_rn
|
def decimal_To_Binary(K):
B_Number = 0
cnt = 0
while K != 0:
rem = K % 2
c = pow(10, cnt)
B_Number += rem * c
K //= 2
cnt += 1
return B_Number
| 1 | 32 |
mbpp
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while (N != 0):
rem = N % 2
c = pow(10,cnt)
B_Number += rem*c
N //= 2
cnt += 1
return B_Number
|
transformation_add_sub_variable
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while (N != 0):
rem = N % 2
c = pow(10,cnt)
B_Number -= rem*c
N //= 2
cnt += 1
return B_Number
| 0 | 32 |
mbpp
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while (N != 0):
rem = N % 2
c = pow(10,cnt)
B_Number += rem*c
N //= 2
cnt += 1
return B_Number
|
transformation_mul_div_variable
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while (N != 0):
rem = N % 2
c = pow(10,cnt)
B_Number += rem/c
N //= 2
cnt += 1
return B_Number
| 0 | 32 |
mbpp
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while (N != 0):
rem = N % 2
c = pow(10,cnt)
B_Number += rem*c
N //= 2
cnt += 1
return B_Number
|
transformation_div_mul_variable
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while (N != 0):
rem = N % 2
c = pow(10,cnt)
B_Number += rem*c
N */= 2
cnt += 1
return B_Number
| 0 | 32 |
mbpp
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while (N != 0):
rem = N % 2
c = pow(10,cnt)
B_Number += rem*c
N //= 2
cnt += 1
return B_Number
|
transformation_exclamation_equalto_variable
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while (N == 0):
rem = N % 2
c = pow(10,cnt)
B_Number += rem*c
N //= 2
cnt += 1
return B_Number
| 0 | 32 |
mbpp
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while (N != 0):
rem = N % 2
c = pow(10,cnt)
B_Number += rem*c
N //= 2
cnt += 1
return B_Number
|
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 | 32 |
mbpp
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while (N != 0):
rem = N % 2
c = pow(10,cnt)
B_Number += rem*c
N //= 2
cnt += 1
return B_Number
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 32 |
mbpp
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while (N != 0):
rem = N % 2
c = pow(10,cnt)
B_Number += rem*c
N //= 2
cnt += 1
return B_Number
|
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 | 32 |
mbpp
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while (N != 0):
rem = N % 2
c = pow(10,cnt)
B_Number += rem*c
N //= 2
cnt += 1
return B_Number
|
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 | 32 |
mbpp
|
def decimal_To_Binary(N):
B_Number = 0
cnt = 0
while (N != 0):
rem = N % 2
c = pow(10,cnt)
B_Number += rem*c
N //= 2
cnt += 1
return B_Number
|
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 | 32 |
mbpp
|
def find_rect_num(n):
return n*(n + 1)
|
transformation_dead_code_insert
|
def find_rect_num(n):
for _i_4 in range(0):
return n * (n + 1)
return n * (n + 1)
| 1 | 34 |
mbpp
|
def find_rect_num(n):
return n*(n + 1)
|
transformation_for_while_loop
|
def find_rect_num(n):
return n * (n + 1)
| 1 | 34 |
mbpp
|
def find_rect_num(n):
return n*(n + 1)
|
transformation_operand_swap
|
def find_rect_num(n):
return n * (n + 1)
| 1 | 34 |
mbpp
|
def find_rect_num(n):
return n*(n + 1)
|
transformation_rename_variable_cb
|
def find_rect_num(i):
return i * (i + 1)
| 1 | 34 |
mbpp
|
def find_rect_num(n):
return n*(n + 1)
|
transformation_rename_variable_naive
|
def find_rect_num(VAR_0):
return VAR_0 * (VAR_0 + 1)
| 1 | 34 |
mbpp
|
def find_rect_num(n):
return n*(n + 1)
|
transformation_rename_variable_rn
|
def find_rect_num(q):
return q * (q + 1)
| 1 | 34 |
mbpp
|
def find_rect_num(n):
return n*(n + 1)
|
transformation_add_sub_variable
|
def find_rect_num(n):
return n*(n - 1)
| 0 | 34 |
mbpp
|
def find_rect_num(n):
return n*(n + 1)
|
transformation_mul_div_variable
|
def find_rect_num(n):
return n/(n + 1)
| 0 | 34 |
mbpp
|
def find_rect_num(n):
return n*(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 | 34 |
mbpp
|
def find_rect_num(n):
return n*(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 | 34 |
mbpp
|
def find_rect_num(n):
return n*(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 | 34 |
mbpp
|
def find_rect_num(n):
return n*(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 | 34 |
mbpp
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.