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 match_num(string):
import re
text = re.compile(r"^5")
if text.match(string):
return True
else:
return False
|
transformation_for_while_loop
|
def match_num(string):
import re
text = re.compile(r"^5")
if text.match(string):
return True
else:
return False
| 1 | 897 |
mbpp
|
def match_num(string):
import re
text = re.compile(r"^5")
if text.match(string):
return True
else:
return False
|
transformation_operand_swap
|
def match_num(string):
import re
text = re.compile(r"^5")
if text.match(string):
return True
else:
return False
| 1 | 897 |
mbpp
|
def match_num(string):
import re
text = re.compile(r"^5")
if text.match(string):
return True
else:
return False
|
transformation_rename_variable_cb
|
def match_num(line):
import re
text = re.compile(r"^5")
if text.match(line):
return True
else:
return False
| 1 | 897 |
mbpp
|
def match_num(string):
import re
text = re.compile(r"^5")
if text.match(string):
return True
else:
return False
|
transformation_rename_variable_naive
|
def match_num(VAR_0):
import re
text = re.compile(r"^5")
if text.match(VAR_0):
return True
else:
return False
| 1 | 897 |
mbpp
|
def match_num(string):
import re
text = re.compile(r"^5")
if text.match(string):
return True
else:
return False
|
transformation_rename_variable_rn
|
def match_num(string):
import re
YoW6 = re.compile(r"^5")
if YoW6.match(string):
return True
else:
return False
| 1 | 897 |
mbpp
|
def match_num(string):
import re
text = re.compile(r"^5")
if text.match(string):
return True
else:
return False
|
transformation_true_false_variable
|
def match_num(string):
import re
text = re.compile(r"^5")
if text.match(string):
return False
else:
return False
| 0 | 897 |
mbpp
|
def match_num(string):
import re
text = re.compile(r"^5")
if text.match(string):
return True
else:
return False
|
transformation_false_true_variable
|
def match_num(string):
import re
text = re.compile(r"^5")
if text.match(string):
return True
else:
return True
| 0 | 897 |
mbpp
|
def match_num(string):
import re
text = re.compile(r"^5")
if text.match(string):
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 | 897 |
mbpp
|
def match_num(string):
import re
text = re.compile(r"^5")
if text.match(string):
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 | 897 |
mbpp
|
def match_num(string):
import re
text = re.compile(r"^5")
if text.match(string):
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 | 897 |
mbpp
|
def match_num(string):
import re
text = re.compile(r"^5")
if text.match(string):
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 | 897 |
mbpp
|
def match_num(string):
import re
text = re.compile(r"^5")
if text.match(string):
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 | 897 |
mbpp
|
def count_Unset_Bits(n) :
cnt = 0;
for i in range(1,n + 1) :
temp = i;
while (temp) :
if (temp % 2 == 0) :
cnt += 1;
temp = temp // 2;
return cnt;
|
transformation_dead_code_insert
|
def count_Unset_Bits(n):
cnt = 0
for i in range(1, n + 1):
while False:
if temp % 2 == 0:
cnt += 1
temp = i
while temp:
if temp % 2 == 0:
cnt += 1
temp = temp // 2
return cnt
| 1 | 900 |
mbpp
|
def count_Unset_Bits(n) :
cnt = 0;
for i in range(1,n + 1) :
temp = i;
while (temp) :
if (temp % 2 == 0) :
cnt += 1;
temp = temp // 2;
return cnt;
|
transformation_for_while_loop
|
def count_Unset_Bits(n):
cnt = 0
i = 1
while i < n + 1:
temp = i
while temp:
if temp % 2 == 0:
cnt += 1
temp = temp // 2
i += 1
return cnt
| 1 | 900 |
mbpp
|
def count_Unset_Bits(n) :
cnt = 0;
for i in range(1,n + 1) :
temp = i;
while (temp) :
if (temp % 2 == 0) :
cnt += 1;
temp = temp // 2;
return cnt;
|
transformation_operand_swap
|
def count_Unset_Bits(n):
cnt = 0
for i in range(1, n + 1):
temp = i
while temp:
if 0 == temp % 2:
cnt += 1
temp = temp // 2
return cnt
| 1 | 900 |
mbpp
|
def count_Unset_Bits(n) :
cnt = 0;
for i in range(1,n + 1) :
temp = i;
while (temp) :
if (temp % 2 == 0) :
cnt += 1;
temp = temp // 2;
return cnt;
|
transformation_rename_variable_cb
|
def count_Unset_Bits(n):
cnt = 0
for i in range(1, n + 1):
n2 = i
while n2:
if n2 % 2 == 0:
cnt += 1
n2 = n2 // 2
return cnt
| 1 | 900 |
mbpp
|
def count_Unset_Bits(n) :
cnt = 0;
for i in range(1,n + 1) :
temp = i;
while (temp) :
if (temp % 2 == 0) :
cnt += 1;
temp = temp // 2;
return cnt;
|
transformation_rename_variable_naive
|
def count_Unset_Bits(n):
cnt = 0
for i in range(1, n + 1):
VAR_0 = i
while VAR_0:
if VAR_0 % 2 == 0:
cnt += 1
VAR_0 = VAR_0 // 2
return cnt
| 1 | 900 |
mbpp
|
def count_Unset_Bits(n) :
cnt = 0;
for i in range(1,n + 1) :
temp = i;
while (temp) :
if (temp % 2 == 0) :
cnt += 1;
temp = temp // 2;
return cnt;
|
transformation_rename_variable_rn
|
def count_Unset_Bits(n):
cnt = 0
for i in range(1, n + 1):
W469 = i
while W469:
if W469 % 2 == 0:
cnt += 1
W469 = W469 // 2
return cnt
| 1 | 900 |
mbpp
|
def count_Unset_Bits(n) :
cnt = 0;
for i in range(1,n + 1) :
temp = i;
while (temp) :
if (temp % 2 == 0) :
cnt += 1;
temp = temp // 2;
return cnt;
|
transformation_add_sub_variable
|
def count_Unset_Bits(n) :
cnt = 0;
for i in range(1,n - 1) :
temp = i;
while (temp) :
if (temp % 2 == 0) :
cnt += 1;
temp = temp // 2;
return cnt;
| 0 | 900 |
mbpp
|
def count_Unset_Bits(n) :
cnt = 0;
for i in range(1,n + 1) :
temp = i;
while (temp) :
if (temp % 2 == 0) :
cnt += 1;
temp = temp // 2;
return cnt;
|
transformation_div_mul_variable
|
def count_Unset_Bits(n) :
cnt = 0;
for i in range(1,n + 1) :
temp = i;
while (temp) :
if (temp % 2 == 0) :
cnt += 1;
temp = temp */ 2;
return cnt;
| 0 | 900 |
mbpp
|
def count_Unset_Bits(n) :
cnt = 0;
for i in range(1,n + 1) :
temp = i;
while (temp) :
if (temp % 2 == 0) :
cnt += 1;
temp = temp // 2;
return cnt;
|
transformation_equalto_exclamation_variable
|
def count_Unset_Bits(n) :
cnt = 0;
for i in range(1,n + 1) :
temp = i;
while (temp) :
if (temp % 2 != 0) :
cnt += 1;
temp = temp // 2;
return cnt;
| 0 | 900 |
mbpp
|
def count_Unset_Bits(n) :
cnt = 0;
for i in range(1,n + 1) :
temp = i;
while (temp) :
if (temp % 2 == 0) :
cnt += 1;
temp = temp // 2;
return cnt;
|
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 | 900 |
mbpp
|
def count_Unset_Bits(n) :
cnt = 0;
for i in range(1,n + 1) :
temp = i;
while (temp) :
if (temp % 2 == 0) :
cnt += 1;
temp = temp // 2;
return cnt;
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 900 |
mbpp
|
def count_Unset_Bits(n) :
cnt = 0;
for i in range(1,n + 1) :
temp = i;
while (temp) :
if (temp % 2 == 0) :
cnt += 1;
temp = temp // 2;
return cnt;
|
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 | 900 |
mbpp
|
def count_Unset_Bits(n) :
cnt = 0;
for i in range(1,n + 1) :
temp = i;
while (temp) :
if (temp % 2 == 0) :
cnt += 1;
temp = temp // 2;
return cnt;
|
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 | 900 |
mbpp
|
def count_Unset_Bits(n) :
cnt = 0;
for i in range(1,n + 1) :
temp = i;
while (temp) :
if (temp % 2 == 0) :
cnt += 1;
temp = temp // 2;
return cnt;
|
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 | 900 |
mbpp
|
def even_num(x):
if x%2==0:
return True
else:
return False
|
transformation_dead_code_insert
|
def even_num(x):
if x % 2 == 0:
_i_6 = 0
while _i_6 < _i_6:
return True
return True
else:
return False
| 1 | 901 |
mbpp
|
def even_num(x):
if x%2==0:
return True
else:
return False
|
transformation_for_while_loop
|
def even_num(x):
if x % 2 == 0:
return True
else:
return False
| 1 | 901 |
mbpp
|
def even_num(x):
if x%2==0:
return True
else:
return False
|
transformation_operand_swap
|
def even_num(x):
if 0 == x % 2:
return True
else:
return False
| 1 | 901 |
mbpp
|
def even_num(x):
if x%2==0:
return True
else:
return False
|
transformation_rename_variable_cb
|
def even_num(line):
if line % 2 == 0:
return True
else:
return False
| 1 | 901 |
mbpp
|
def even_num(x):
if x%2==0:
return True
else:
return False
|
transformation_rename_variable_naive
|
def even_num(VAR_0):
if VAR_0 % 2 == 0:
return True
else:
return False
| 1 | 901 |
mbpp
|
def even_num(x):
if x%2==0:
return True
else:
return False
|
transformation_rename_variable_rn
|
def even_num(u):
if u % 2 == 0:
return True
else:
return False
| 1 | 901 |
mbpp
|
def even_num(x):
if x%2==0:
return True
else:
return False
|
transformation_equalto_exclamation_variable
|
def even_num(x):
if x%2!=0:
return True
else:
return False
| 0 | 901 |
mbpp
|
def even_num(x):
if x%2==0:
return True
else:
return False
|
transformation_true_false_variable
|
def even_num(x):
if x%2==0:
return False
else:
return False
| 0 | 901 |
mbpp
|
def even_num(x):
if x%2==0:
return True
else:
return False
|
transformation_false_true_variable
|
def even_num(x):
if x%2==0:
return True
else:
return True
| 0 | 901 |
mbpp
|
def even_num(x):
if x%2==0:
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 | 901 |
mbpp
|
def even_num(x):
if x%2==0:
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 | 901 |
mbpp
|
def even_num(x):
if x%2==0:
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 | 901 |
mbpp
|
def even_num(x):
if x%2==0:
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 | 901 |
mbpp
|
def even_num(x):
if x%2==0:
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 | 901 |
mbpp
|
def lucky_num(n):
List=range(-1,n*n+9,2)
i=2
while List[i:]:List=sorted(set(List)-set(List[List[i]::List[i]]));i+=1
return List[1:n+1]
|
transformation_dead_code_insert
|
def lucky_num(n):
for _i_5 in range(0):
while List[i:]:
List = sorted(set(List) - set(List[List[i] :: List[i]]))
List = range(-1, n * n + 9, 2)
i = 2
while List[i:]:
List = sorted(set(List) - set(List[List[i] :: List[i]]))
i += 1
return List[1 : n + 1]
| 1 | 904 |
mbpp
|
def lucky_num(n):
List=range(-1,n*n+9,2)
i=2
while List[i:]:List=sorted(set(List)-set(List[List[i]::List[i]]));i+=1
return List[1:n+1]
|
transformation_for_while_loop
|
def lucky_num(n):
List = range(-1, n * n + 9, 2)
i = 2
while List[i:]:
List = sorted(set(List) - set(List[List[i] :: List[i]]))
i += 1
return List[1 : n + 1]
| 1 | 904 |
mbpp
|
def lucky_num(n):
List=range(-1,n*n+9,2)
i=2
while List[i:]:List=sorted(set(List)-set(List[List[i]::List[i]]));i+=1
return List[1:n+1]
|
transformation_operand_swap
|
def lucky_num(n):
List = range(-1, n * n + 9, 2)
i = 2
while List[i:]:
List = sorted(set(List) - set(List[List[i] :: List[i]]))
i += 1
return List[1 : n + 1]
| 1 | 904 |
mbpp
|
def lucky_num(n):
List=range(-1,n*n+9,2)
i=2
while List[i:]:List=sorted(set(List)-set(List[List[i]::List[i]]));i+=1
return List[1:n+1]
|
transformation_rename_variable_cb
|
def lucky_num(n):
List = range(-1, n * n + 9, 2)
n2 = 2
while List[n2:]:
List = sorted(set(List) - set(List[List[n2] :: List[n2]]))
n2 += 1
return List[1 : n + 1]
| 1 | 904 |
mbpp
|
def lucky_num(n):
List=range(-1,n*n+9,2)
i=2
while List[i:]:List=sorted(set(List)-set(List[List[i]::List[i]]));i+=1
return List[1:n+1]
|
transformation_rename_variable_naive
|
def lucky_num(n):
List = range(-1, n * n + 9, 2)
VAR_0 = 2
while List[VAR_0:]:
List = sorted(set(List) - set(List[List[VAR_0] :: List[VAR_0]]))
VAR_0 += 1
return List[1 : n + 1]
| 1 | 904 |
mbpp
|
def lucky_num(n):
List=range(-1,n*n+9,2)
i=2
while List[i:]:List=sorted(set(List)-set(List[List[i]::List[i]]));i+=1
return List[1:n+1]
|
transformation_rename_variable_rn
|
def lucky_num(n):
List = range(-1, n * n + 9, 2)
Q = 2
while List[Q:]:
List = sorted(set(List) - set(List[List[Q] :: List[Q]]))
Q += 1
return List[1 : n + 1]
| 1 | 904 |
mbpp
|
def lucky_num(n):
List=range(-1,n*n+9,2)
i=2
while List[i:]:List=sorted(set(List)-set(List[List[i]::List[i]]));i+=1
return List[1:n+1]
|
transformation_add_sub_variable
|
def lucky_num(n):
List=range(-1,n*n-9,2)
i=2
while List[i:]:List=sorted(set(List)-set(List[List[i]::List[i]]));i+=1
return List[1:n+1]
| 0 | 904 |
mbpp
|
def lucky_num(n):
List=range(-1,n*n+9,2)
i=2
while List[i:]:List=sorted(set(List)-set(List[List[i]::List[i]]));i+=1
return List[1:n+1]
|
transformation_sub_add_variable
|
def lucky_num(n):
List=range(+1,n*n+9,2)
i=2
while List[i:]:List=sorted(set(List)-set(List[List[i]::List[i]]));i+=1
return List[1:n+1]
| 0 | 904 |
mbpp
|
def lucky_num(n):
List=range(-1,n*n+9,2)
i=2
while List[i:]:List=sorted(set(List)-set(List[List[i]::List[i]]));i+=1
return List[1:n+1]
|
transformation_mul_div_variable
|
def lucky_num(n):
List=range(-1,n/n+9,2)
i=2
while List[i:]:List=sorted(set(List)-set(List[List[i]::List[i]]));i+=1
return List[1:n+1]
| 0 | 904 |
mbpp
|
def lucky_num(n):
List=range(-1,n*n+9,2)
i=2
while List[i:]:List=sorted(set(List)-set(List[List[i]::List[i]]));i+=1
return List[1: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 | 904 |
mbpp
|
def lucky_num(n):
List=range(-1,n*n+9,2)
i=2
while List[i:]:List=sorted(set(List)-set(List[List[i]::List[i]]));i+=1
return List[1: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 | 904 |
mbpp
|
def lucky_num(n):
List=range(-1,n*n+9,2)
i=2
while List[i:]:List=sorted(set(List)-set(List[List[i]::List[i]]));i+=1
return List[1: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 | 904 |
mbpp
|
def lucky_num(n):
List=range(-1,n*n+9,2)
i=2
while List[i:]:List=sorted(set(List)-set(List[List[i]::List[i]]));i+=1
return List[1: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 | 904 |
mbpp
|
def lucky_num(n):
List=range(-1,n*n+9,2)
i=2
while List[i:]:List=sorted(set(List)-set(List[List[i]::List[i]]));i+=1
return List[1: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 | 904 |
mbpp
|
def find_fixed_point(arr, n):
for i in range(n):
if arr[i] is i:
return i
return -1
|
transformation_dead_code_insert
|
def find_fixed_point(arr, n):
for i in range(n):
_i_5 = 0
while _i_5 < _i_5:
return -1
if arr[i] is i:
return i
return -1
| 1 | 905 |
mbpp
|
def find_fixed_point(arr, n):
for i in range(n):
if arr[i] is i:
return i
return -1
|
transformation_for_while_loop
|
def find_fixed_point(arr, n):
i = 0
while i < n:
if arr[i] is i:
return i
i += 1
return -1
| 1 | 905 |
mbpp
|
def find_fixed_point(arr, n):
for i in range(n):
if arr[i] is i:
return i
return -1
|
transformation_operand_swap
|
def find_fixed_point(arr, n):
for i in range(n):
if arr[i] is i:
return i
return -1
| 1 | 905 |
mbpp
|
def find_fixed_point(arr, n):
for i in range(n):
if arr[i] is i:
return i
return -1
|
transformation_rename_variable_cb
|
def find_fixed_point(arr, n):
for i2 in range(n):
if arr[i2] is i2:
return i2
return -1
| 1 | 905 |
mbpp
|
def find_fixed_point(arr, n):
for i in range(n):
if arr[i] is i:
return i
return -1
|
transformation_rename_variable_naive
|
def find_fixed_point(arr, n):
for VAR_0 in range(n):
if arr[VAR_0] is VAR_0:
return VAR_0
return -1
| 1 | 905 |
mbpp
|
def find_fixed_point(arr, n):
for i in range(n):
if arr[i] is i:
return i
return -1
|
transformation_rename_variable_rn
|
def find_fixed_point(arr, n):
for n2 in range(n):
if arr[n2] is n2:
return n2
return -1
| 1 | 905 |
mbpp
|
def find_fixed_point(arr, n):
for i in range(n):
if arr[i] is i:
return i
return -1
|
transformation_sub_add_variable
|
def find_fixed_point(arr, n):
for i in range(n):
if arr[i] is i:
return i
return +1
| 0 | 905 |
mbpp
|
def find_fixed_point(arr, n):
for i in range(n):
if arr[i] is i:
return i
return -1
|
transformation_is_isnot_variable
|
def find_fixed_point(arr, n):
for i in range(n):
if arr[i] is not i:
return i
return -1
| 0 | 905 |
mbpp
|
def find_fixed_point(arr, n):
for i in range(n):
if arr[i] is i:
return i
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 | 905 |
mbpp
|
def find_fixed_point(arr, n):
for i in range(n):
if arr[i] is i:
return i
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 | 905 |
mbpp
|
def find_fixed_point(arr, n):
for i in range(n):
if arr[i] is i:
return i
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 | 905 |
mbpp
|
def find_fixed_point(arr, n):
for i in range(n):
if arr[i] is i:
return i
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 | 905 |
mbpp
|
def find_fixed_point(arr, n):
for i in range(n):
if arr[i] is i:
return i
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 | 905 |
mbpp
|
def end_num(string):
import re
text = re.compile(r".*[0-9]$")
if text.match(string):
return True
else:
return False
|
transformation_dead_code_insert
|
def end_num(string):
import re
for _i_1 in range(0):
import re
text = re.compile(r".*[0-9]$")
if text.match(string):
return True
else:
return False
| 1 | 910 |
mbpp
|
def end_num(string):
import re
text = re.compile(r".*[0-9]$")
if text.match(string):
return True
else:
return False
|
transformation_for_while_loop
|
def end_num(string):
import re
text = re.compile(r".*[0-9]$")
if text.match(string):
return True
else:
return False
| 1 | 910 |
mbpp
|
def end_num(string):
import re
text = re.compile(r".*[0-9]$")
if text.match(string):
return True
else:
return False
|
transformation_operand_swap
|
def end_num(string):
import re
text = re.compile(r".*[0-9]$")
if text.match(string):
return True
else:
return False
| 1 | 910 |
mbpp
|
def end_num(string):
import re
text = re.compile(r".*[0-9]$")
if text.match(string):
return True
else:
return False
|
transformation_rename_variable_cb
|
def end_num(line):
import re
text = re.compile(r".*[0-9]$")
if text.match(line):
return True
else:
return False
| 1 | 910 |
mbpp
|
def end_num(string):
import re
text = re.compile(r".*[0-9]$")
if text.match(string):
return True
else:
return False
|
transformation_rename_variable_naive
|
def end_num(VAR_0):
import re
text = re.compile(r".*[0-9]$")
if text.match(VAR_0):
return True
else:
return False
| 1 | 910 |
mbpp
|
def end_num(string):
import re
text = re.compile(r".*[0-9]$")
if text.match(string):
return True
else:
return False
|
transformation_rename_variable_rn
|
def end_num(string):
import re
jmcm = re.compile(r".*[0-9]$")
if jmcm.match(string):
return True
else:
return False
| 1 | 910 |
mbpp
|
def end_num(string):
import re
text = re.compile(r".*[0-9]$")
if text.match(string):
return True
else:
return False
|
transformation_sub_add_variable
|
def end_num(string):
import re
text = re.compile(r".*[0+9]$")
if text.match(string):
return True
else:
return False
| 0 | 910 |
mbpp
|
def end_num(string):
import re
text = re.compile(r".*[0-9]$")
if text.match(string):
return True
else:
return False
|
transformation_mul_div_variable
|
def end_num(string):
import re
text = re.compile(r"./[0-9]$")
if text.match(string):
return True
else:
return False
| 0 | 910 |
mbpp
|
def end_num(string):
import re
text = re.compile(r".*[0-9]$")
if text.match(string):
return True
else:
return False
|
transformation_true_false_variable
|
def end_num(string):
import re
text = re.compile(r".*[0-9]$")
if text.match(string):
return False
else:
return False
| 0 | 910 |
mbpp
|
def end_num(string):
import re
text = re.compile(r".*[0-9]$")
if text.match(string):
return True
else:
return False
|
transformation_false_true_variable
|
def end_num(string):
import re
text = re.compile(r".*[0-9]$")
if text.match(string):
return True
else:
return True
| 0 | 910 |
mbpp
|
def end_num(string):
import re
text = re.compile(r".*[0-9]$")
if text.match(string):
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 | 910 |
mbpp
|
def end_num(string):
import re
text = re.compile(r".*[0-9]$")
if text.match(string):
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 | 910 |
mbpp
|
def end_num(string):
import re
text = re.compile(r".*[0-9]$")
if text.match(string):
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 | 910 |
mbpp
|
def end_num(string):
import re
text = re.compile(r".*[0-9]$")
if text.match(string):
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 | 910 |
mbpp
|
def end_num(string):
import re
text = re.compile(r".*[0-9]$")
if text.match(string):
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 | 910 |
mbpp
|
def multiply_list(items):
tot = 1
for x in items:
tot *= x
return tot
|
transformation_dead_code_insert
|
def multiply_list(items):
for _i_6 in range(0):
for x in items:
tot *= x
tot = 1
for x in items:
tot *= x
return tot
| 1 | 916 |
mbpp
|
def multiply_list(items):
tot = 1
for x in items:
tot *= x
return tot
|
transformation_for_while_loop
|
def multiply_list(items):
tot = 1
_x_i = 0
while _x_i < len(items):
x = items[_x_i]
tot *= x
_x_i += 1
return tot
| 1 | 916 |
mbpp
|
def multiply_list(items):
tot = 1
for x in items:
tot *= x
return tot
|
transformation_operand_swap
|
def multiply_list(items):
tot = 1
for x in items:
tot *= x
return tot
| 1 | 916 |
mbpp
|
def multiply_list(items):
tot = 1
for x in items:
tot *= x
return tot
|
transformation_rename_variable_cb
|
def multiply_list(items):
x2 = 1
for x in items:
x2 *= x
return x2
| 1 | 916 |
mbpp
|
def multiply_list(items):
tot = 1
for x in items:
tot *= x
return tot
|
transformation_rename_variable_naive
|
def multiply_list(items):
VAR_0 = 1
for x in items:
VAR_0 *= x
return VAR_0
| 1 | 916 |
mbpp
|
def multiply_list(items):
tot = 1
for x in items:
tot *= x
return tot
|
transformation_rename_variable_rn
|
def multiply_list(items):
es9 = 1
for x in items:
es9 *= x
return es9
| 1 | 916 |
mbpp
|
def multiply_list(items):
tot = 1
for x in items:
tot *= x
return tot
|
transformation_mul_div_variable
|
def multiply_list(items):
tot = 1
for x in items:
tot /= x
return tot
| 0 | 916 |
mbpp
|
def multiply_list(items):
tot = 1
for x in items:
tot *= x
return tot
|
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 | 916 |
mbpp
|
def multiply_list(items):
tot = 1
for x in items:
tot *= x
return tot
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 916 |
mbpp
|
def multiply_list(items):
tot = 1
for x in items:
tot *= x
return tot
|
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 | 916 |
mbpp
|
def multiply_list(items):
tot = 1
for x in items:
tot *= x
return tot
|
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 | 916 |
mbpp
|
def multiply_list(items):
tot = 1
for x in items:
tot *= x
return tot
|
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 | 916 |
mbpp
|
def remove_tuple(test_list):
res = [sub for sub in test_list if not all(ele == None for ele in sub)]
return (str(res))
|
transformation_dead_code_insert
|
def remove_tuple(test_list):
if False:
return str(res)
res = [sub for sub in test_list if not all(ele == None for ele in sub)]
return str(res)
| 1 | 917 |
mbpp
|
def remove_tuple(test_list):
res = [sub for sub in test_list if not all(ele == None for ele in sub)]
return (str(res))
|
transformation_for_while_loop
|
def remove_tuple(test_list):
res = [sub for sub in test_list if not all(ele == None for ele in sub)]
return str(res)
| 1 | 917 |
mbpp
|
def remove_tuple(test_list):
res = [sub for sub in test_list if not all(ele == None for ele in sub)]
return (str(res))
|
transformation_operand_swap
|
def remove_tuple(test_list):
res = [sub for sub in test_list if not all(None == ele for ele in sub)]
return str(res)
| 1 | 917 |
mbpp
|
def remove_tuple(test_list):
res = [sub for sub in test_list if not all(ele == None for ele in sub)]
return (str(res))
|
transformation_rename_variable_cb
|
def remove_tuple(test_list):
res = [ele2 for ele2 in test_list if not all(ele == None for ele in ele2)]
return str(res)
| 1 | 917 |
mbpp
|
def remove_tuple(test_list):
res = [sub for sub in test_list if not all(ele == None for ele in sub)]
return (str(res))
|
transformation_rename_variable_naive
|
def remove_tuple(test_list):
res = [VAR_0 for VAR_0 in test_list if not all(ele == None for ele in VAR_0)]
return str(res)
| 1 | 917 |
mbpp
|
def remove_tuple(test_list):
res = [sub for sub in test_list if not all(ele == None for ele in sub)]
return (str(res))
|
transformation_rename_variable_rn
|
def remove_tuple(test_list):
res = [y0j for y0j in test_list if not all(ele == None for ele in y0j)]
return str(res)
| 1 | 917 |
mbpp
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.