original_code
stringclasses
565 values
transformation
stringclasses
24 values
transformed_code
stringlengths
35
955
label
int64
0
1
groups
int64
1
971
dataset
stringclasses
1 value
def check_monthnumb(monthname2): if(monthname2=="January" or monthname2=="March"or monthname2=="May" or monthname2=="July" or monthname2=="Augest" or monthname2=="October" or monthname2=="December"): return True else: return False
transformation_or_and_variable
def check_monthnumb(monthname2): if(monthname2=="January" and monthname2=="March"or monthname2=="May" or monthname2=="July" or monthname2=="Augest" or monthname2=="October" or monthname2=="December"): return True else: return False
0
863
mbpp
def check_monthnumb(monthname2): if(monthname2=="January" or monthname2=="March"or monthname2=="May" or monthname2=="July" or monthname2=="Augest" or monthname2=="October" or monthname2=="December"): 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
863
mbpp
def check_monthnumb(monthname2): if(monthname2=="January" or monthname2=="March"or monthname2=="May" or monthname2=="July" or monthname2=="Augest" or monthname2=="October" or monthname2=="December"): 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
863
mbpp
def check_monthnumb(monthname2): if(monthname2=="January" or monthname2=="March"or monthname2=="May" or monthname2=="July" or monthname2=="Augest" or monthname2=="October" or monthname2=="December"): 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
863
mbpp
def check_monthnumb(monthname2): if(monthname2=="January" or monthname2=="March"or monthname2=="May" or monthname2=="July" or monthname2=="Augest" or monthname2=="October" or monthname2=="December"): 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
863
mbpp
def check_monthnumb(monthname2): if(monthname2=="January" or monthname2=="March"or monthname2=="May" or monthname2=="July" or monthname2=="Augest" or monthname2=="October" or monthname2=="December"): 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
863
mbpp
def length_Of_Last_Word(a): l = 0 x = a.strip() for i in range(len(x)): if x[i] == " ": l = 0 else: l += 1 return l
transformation_dead_code_insert
def length_Of_Last_Word(a): l = 0 x = a.strip() for i in range(len(x)): _i_6 = 0 while _i_6 > _i_6: l = 0 if x[i] == " ": l = 0 else: l += 1 return l
1
865
mbpp
def length_Of_Last_Word(a): l = 0 x = a.strip() for i in range(len(x)): if x[i] == " ": l = 0 else: l += 1 return l
transformation_for_while_loop
def length_Of_Last_Word(a): l = 0 x = a.strip() i = 0 while i < len(x): if x[i] == " ": l = 0 else: l += 1 i += 1 return l
1
865
mbpp
def length_Of_Last_Word(a): l = 0 x = a.strip() for i in range(len(x)): if x[i] == " ": l = 0 else: l += 1 return l
transformation_operand_swap
def length_Of_Last_Word(a): l = 0 x = a.strip() for i in range(len(x)): if " " == x[i]: l = 0 else: l += 1 return l
1
865
mbpp
def length_Of_Last_Word(a): l = 0 x = a.strip() for i in range(len(x)): if x[i] == " ": l = 0 else: l += 1 return l
transformation_rename_variable_cb
def length_Of_Last_Word(a): last = 0 x = a.strip() for i in range(len(x)): if x[i] == " ": last = 0 else: last += 1 return last
1
865
mbpp
def length_Of_Last_Word(a): l = 0 x = a.strip() for i in range(len(x)): if x[i] == " ": l = 0 else: l += 1 return l
transformation_rename_variable_naive
def length_Of_Last_Word(a): VAR_0 = 0 x = a.strip() for i in range(len(x)): if x[i] == " ": VAR_0 = 0 else: VAR_0 += 1 return VAR_0
1
865
mbpp
def length_Of_Last_Word(a): l = 0 x = a.strip() for i in range(len(x)): if x[i] == " ": l = 0 else: l += 1 return l
transformation_rename_variable_rn
def length_Of_Last_Word(a): w = 0 x = a.strip() for i in range(len(x)): if x[i] == " ": w = 0 else: w += 1 return w
1
865
mbpp
def length_Of_Last_Word(a): l = 0 x = a.strip() for i in range(len(x)): if x[i] == " ": l = 0 else: l += 1 return l
transformation_add_sub_variable
def length_Of_Last_Word(a): l = 0 x = a.strip() for i in range(len(x)): if x[i] == " ": l = 0 else: l -= 1 return l
0
865
mbpp
def length_Of_Last_Word(a): l = 0 x = a.strip() for i in range(len(x)): if x[i] == " ": l = 0 else: l += 1 return l
transformation_equalto_exclamation_variable
def length_Of_Last_Word(a): l = 0 x = a.strip() for i in range(len(x)): if x[i] != " ": l = 0 else: l += 1 return l
0
865
mbpp
def length_Of_Last_Word(a): l = 0 x = a.strip() for i in range(len(x)): if x[i] == " ": l = 0 else: l += 1 return l
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
865
mbpp
def length_Of_Last_Word(a): l = 0 x = a.strip() for i in range(len(x)): if x[i] == " ": l = 0 else: l += 1 return l
transformation_dissimilar_code_injection_1
def similar_elements(test_tup1, test_tup2): res = tuple(set(test_tup1) & set(test_tup2)) return (res)
0
865
mbpp
def length_Of_Last_Word(a): l = 0 x = a.strip() for i in range(len(x)): if x[i] == " ": l = 0 else: l += 1 return l
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
865
mbpp
def length_Of_Last_Word(a): l = 0 x = a.strip() for i in range(len(x)): if x[i] == " ": l = 0 else: l += 1 return l
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
865
mbpp
def length_Of_Last_Word(a): l = 0 x = a.strip() for i in range(len(x)): if x[i] == " ": l = 0 else: l += 1 return l
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
865
mbpp
def check_subset(list1,list2): return all(map(list1.__contains__,list2))
transformation_dead_code_insert
def check_subset(list1, list2): if False: return all(map(list1.__contains__, list2)) return all(map(list1.__contains__, list2))
1
869
mbpp
def check_subset(list1,list2): return all(map(list1.__contains__,list2))
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
869
mbpp
def check_subset(list1,list2): return all(map(list1.__contains__,list2))
transformation_dissimilar_code_injection_1
def similar_elements(test_tup1, test_tup2): res = tuple(set(test_tup1) & set(test_tup2)) return (res)
0
869
mbpp
def check_subset(list1,list2): return all(map(list1.__contains__,list2))
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
869
mbpp
def check_subset(list1,list2): return all(map(list1.__contains__,list2))
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
869
mbpp
def check_subset(list1,list2): return all(map(list1.__contains__,list2))
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
869
mbpp
def fibonacci(n): if n == 1 or n == 2: return 1 else: return (fibonacci(n - 1) + (fibonacci(n - 2)))
transformation_dead_code_insert
def fibonacci(n): if n == 1 or n == 2: if False: return fibonacci(n - 1) + (fibonacci(n - 2)) return 1 else: return fibonacci(n - 1) + (fibonacci(n - 2))
1
870
mbpp
def fibonacci(n): if n == 1 or n == 2: return 1 else: return (fibonacci(n - 1) + (fibonacci(n - 2)))
transformation_for_while_loop
def fibonacci(n): if n == 1 or n == 2: return 1 else: return fibonacci(n - 1) + (fibonacci(n - 2))
1
870
mbpp
def fibonacci(n): if n == 1 or n == 2: return 1 else: return (fibonacci(n - 1) + (fibonacci(n - 2)))
transformation_operand_swap
def fibonacci(n): if 1 == n or n == 2: return 1 else: return fibonacci(n - 1) + (fibonacci(n - 2))
1
870
mbpp
def fibonacci(n): if n == 1 or n == 2: return 1 else: return (fibonacci(n - 1) + (fibonacci(n - 2)))
transformation_rename_variable_cb
def fibonacci(pri): if pri == 1 or pri == 2: return 1 else: return fibonacci(pri - 1) + (fibonacci(pri - 2))
1
870
mbpp
def fibonacci(n): if n == 1 or n == 2: return 1 else: return (fibonacci(n - 1) + (fibonacci(n - 2)))
transformation_rename_variable_naive
def fibonacci(VAR_0): if VAR_0 == 1 or VAR_0 == 2: return 1 else: return fibonacci(VAR_0 - 1) + (fibonacci(VAR_0 - 2))
1
870
mbpp
def fibonacci(n): if n == 1 or n == 2: return 1 else: return (fibonacci(n - 1) + (fibonacci(n - 2)))
transformation_rename_variable_rn
def fibonacci(M): if M == 1 or M == 2: return 1 else: return fibonacci(M - 1) + (fibonacci(M - 2))
1
870
mbpp
def fibonacci(n): if n == 1 or n == 2: return 1 else: return (fibonacci(n - 1) + (fibonacci(n - 2)))
transformation_add_sub_variable
def fibonacci(n): if n == 1 or n == 2: return 1 else: return (fibonacci(n - 1) - (fibonacci(n - 2)))
0
870
mbpp
def fibonacci(n): if n == 1 or n == 2: return 1 else: return (fibonacci(n - 1) + (fibonacci(n - 2)))
transformation_sub_add_variable
def fibonacci(n): if n == 1 or n == 2: return 1 else: return (fibonacci(n + 1) + (fibonacci(n - 2)))
0
870
mbpp
def fibonacci(n): if n == 1 or n == 2: return 1 else: return (fibonacci(n - 1) + (fibonacci(n - 2)))
transformation_equalto_exclamation_variable
def fibonacci(n): if n != 1 or n == 2: return 1 else: return (fibonacci(n - 1) + (fibonacci(n - 2)))
0
870
mbpp
def fibonacci(n): if n == 1 or n == 2: return 1 else: return (fibonacci(n - 1) + (fibonacci(n - 2)))
transformation_or_and_variable
def fibonacci(n): if n == 1 and n == 2: return 1 else: return (fibonacci(n - 1) + (fibonacci(n - 2)))
0
870
mbpp
def fibonacci(n): if n == 1 or n == 2: return 1 else: return (fibonacci(n - 1) + (fibonacci(n - 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
870
mbpp
def fibonacci(n): if n == 1 or n == 2: return 1 else: return (fibonacci(n - 1) + (fibonacci(n - 2)))
transformation_dissimilar_code_injection_1
def similar_elements(test_tup1, test_tup2): res = tuple(set(test_tup1) & set(test_tup2)) return (res)
0
870
mbpp
def fibonacci(n): if n == 1 or n == 2: return 1 else: return (fibonacci(n - 1) + (fibonacci(n - 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
870
mbpp
def fibonacci(n): if n == 1 or n == 2: return 1 else: return (fibonacci(n - 1) + (fibonacci(n - 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
870
mbpp
def fibonacci(n): if n == 1 or n == 2: return 1 else: return (fibonacci(n - 1) + (fibonacci(n - 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
870
mbpp
def check_Concat(str1,str2): N = len(str1) M = len(str2) if (N % M != 0): return False for i in range(N): if (str1[i] != str2[i % M]): return False return True
transformation_dead_code_insert
def check_Concat(str1, str2): N = len(str1) _i_5 = 0 if _i_5 > _i_5: N = len(str1) M = len(str2) if N % M != 0: return False for i in range(N): if str1[i] != str2[i % M]: return False return True
1
871
mbpp
def check_Concat(str1,str2): N = len(str1) M = len(str2) if (N % M != 0): return False for i in range(N): if (str1[i] != str2[i % M]): return False return True
transformation_for_while_loop
def check_Concat(str1, str2): N = len(str1) M = len(str2) if N % M != 0: return False i = 0 while i < N: if str1[i] != str2[i % M]: return False i += 1 return True
1
871
mbpp
def check_Concat(str1,str2): N = len(str1) M = len(str2) if (N % M != 0): return False for i in range(N): if (str1[i] != str2[i % M]): return False return True
transformation_operand_swap
def check_Concat(str1, str2): N = len(str1) M = len(str2) if 0 != N % M: return False for i in range(N): if str1[i] != str2[i % M]: return False return True
1
871
mbpp
def check_Concat(str1,str2): N = len(str1) M = len(str2) if (N % M != 0): return False for i in range(N): if (str1[i] != str2[i % M]): return False return True
transformation_rename_variable_cb
def check_Concat(str1, str2): N = len(str1) M = len(str2) if N % M != 0: return False for i2 in range(N): if str1[i2] != str2[i2 % M]: return False return True
1
871
mbpp
def check_Concat(str1,str2): N = len(str1) M = len(str2) if (N % M != 0): return False for i in range(N): if (str1[i] != str2[i % M]): return False return True
transformation_rename_variable_naive
def check_Concat(str1, str2): VAR_0 = len(str1) M = len(str2) if VAR_0 % M != 0: return False for i in range(VAR_0): if str1[i] != str2[i % M]: return False return True
1
871
mbpp
def check_Concat(str1,str2): N = len(str1) M = len(str2) if (N % M != 0): return False for i in range(N): if (str1[i] != str2[i % M]): return False return True
transformation_rename_variable_rn
def check_Concat(str1, str2): N = len(str1) M = len(str2) if N % M != 0: return False for m in range(N): if str1[m] != str2[m % M]: return False return True
1
871
mbpp
def check_Concat(str1,str2): N = len(str1) M = len(str2) if (N % M != 0): return False for i in range(N): if (str1[i] != str2[i % M]): return False return True
transformation_exclamation_equalto_variable
def check_Concat(str1,str2): N = len(str1) M = len(str2) if (N % M == 0): return False for i in range(N): if (str1[i] != str2[i % M]): return False return True
0
871
mbpp
def check_Concat(str1,str2): N = len(str1) M = len(str2) if (N % M != 0): return False for i in range(N): if (str1[i] != str2[i % M]): return False return True
transformation_true_false_variable
def check_Concat(str1,str2): N = len(str1) M = len(str2) if (N % M != 0): return False for i in range(N): if (str1[i] != str2[i % M]): return False return False
0
871
mbpp
def check_Concat(str1,str2): N = len(str1) M = len(str2) if (N % M != 0): return False for i in range(N): if (str1[i] != str2[i % M]): return False return True
transformation_false_true_variable
def check_Concat(str1,str2): N = len(str1) M = len(str2) if (N % M != 0): return True for i in range(N): if (str1[i] != str2[i % M]): return False return True
0
871
mbpp
def check_Concat(str1,str2): N = len(str1) M = len(str2) if (N % M != 0): return False for i in range(N): if (str1[i] != str2[i % M]): return False return True
transformation_dissimilar_code_injection_0
def min_cost(cost, m, n): R = 3 C = 3 tc = [[0 for x in range(C)] for x in range(R)] tc[0][0] = cost[0][0] for i in range(1, m+1): tc[i][0] = tc[i-1][0] + cost[i][0] for j in range(1, n+1): tc[0][j] = tc[0][j-1] + cost[0][j] for i in range(1, m+1): for j in range(1, n+1): tc[i][j] = min(tc[i-1][j-1], tc[i-1][j], tc[i][j-1]) + cost[i][j] return tc[m][n]
0
871
mbpp
def check_Concat(str1,str2): N = len(str1) M = len(str2) if (N % M != 0): return False for i in range(N): if (str1[i] != str2[i % M]): return False return True
transformation_dissimilar_code_injection_1
def similar_elements(test_tup1, test_tup2): res = tuple(set(test_tup1) & set(test_tup2)) return (res)
0
871
mbpp
def check_Concat(str1,str2): N = len(str1) M = len(str2) if (N % M != 0): return False for i in range(N): if (str1[i] != str2[i % M]): return False return True
transformation_dissimilar_code_injection_2
def is_not_prime(n): import math result = False for i in range(2,int(math.sqrt(n)) + 1): if n % i == 0: result = True return result
0
871
mbpp
def check_Concat(str1,str2): N = len(str1) M = len(str2) if (N % M != 0): return False for i in range(N): if (str1[i] != str2[i % M]): return False return True
transformation_dissimilar_code_injection_3
def heap_queue_largest(nums,n): import heapq as hq largest_nums = hq.nlargest(n, nums) return largest_nums
0
871
mbpp
def check_Concat(str1,str2): N = len(str1) M = len(str2) if (N % M != 0): return False for i in range(N): if (str1[i] != str2[i % M]): return False return True
transformation_dissimilar_code_injection_4
def count_ways(n): A = [0] * (n + 1) B = [0] * (n + 1) A[0] = 1 A[1] = 0 B[0] = 0 B[1] = 1 for i in range(2, n+1): A[i] = A[i - 2] + 2 * B[i - 1] B[i] = A[i - 1] + B[i - 2] return A[n]
0
871
mbpp
def lcm(x, y): if x > y: z = x else: z = y while(True): if((z % x == 0) and (z % y == 0)): lcm = z break z += 1 return lcm
transformation_dead_code_insert
def lcm(x, y): if x > y: z = x else: _i_8 = 0 if _i_8 > _i_8: z = y z = y while True: if (z % x == 0) and (z % y == 0): lcm = z break z += 1 return lcm
1
873
mbpp
def lcm(x, y): if x > y: z = x else: z = y while(True): if((z % x == 0) and (z % y == 0)): lcm = z break z += 1 return lcm
transformation_for_while_loop
def lcm(x, y): if x > y: z = x else: z = y while True: if (z % x == 0) and (z % y == 0): lcm = z break z += 1 return lcm
1
873
mbpp
def lcm(x, y): if x > y: z = x else: z = y while(True): if((z % x == 0) and (z % y == 0)): lcm = z break z += 1 return lcm
transformation_operand_swap
def lcm(x, y): if y < x: z = x else: z = y while True: if (z % x == 0) and (z % y == 0): lcm = z break z += 1 return lcm
1
873
mbpp
def lcm(x, y): if x > y: z = x else: z = y while(True): if((z % x == 0) and (z % y == 0)): lcm = z break z += 1 return lcm
transformation_rename_variable_cb
def lcm(x, y): if x > y: x2 = x else: x2 = y while True: if (x2 % x == 0) and (x2 % y == 0): lcm = x2 break x2 += 1 return lcm
1
873
mbpp
def lcm(x, y): if x > y: z = x else: z = y while(True): if((z % x == 0) and (z % y == 0)): lcm = z break z += 1 return lcm
transformation_rename_variable_naive
def lcm(x, y): if x > y: VAR_0 = x else: VAR_0 = y while True: if (VAR_0 % x == 0) and (VAR_0 % y == 0): lcm = VAR_0 break VAR_0 += 1 return lcm
1
873
mbpp
def lcm(x, y): if x > y: z = x else: z = y while(True): if((z % x == 0) and (z % y == 0)): lcm = z break z += 1 return lcm
transformation_rename_variable_rn
def lcm(x, y): if x > y: z2 = x else: z2 = y while True: if (z2 % x == 0) and (z2 % y == 0): lcm = z2 break z2 += 1 return lcm
1
873
mbpp
def lcm(x, y): if x > y: z = x else: z = y while(True): if((z % x == 0) and (z % y == 0)): lcm = z break z += 1 return lcm
transformation_add_sub_variable
def lcm(x, y): if x > y: z = x else: z = y while(True): if((z % x == 0) and (z % y == 0)): lcm = z break z -= 1 return lcm
0
873
mbpp
def lcm(x, y): if x > y: z = x else: z = y while(True): if((z % x == 0) and (z % y == 0)): lcm = z break z += 1 return lcm
transformation_greater_lesser_variable
def lcm(x, y): if x < y: z = x else: z = y while(True): if((z % x == 0) and (z % y == 0)): lcm = z break z += 1 return lcm
0
873
mbpp
def lcm(x, y): if x > y: z = x else: z = y while(True): if((z % x == 0) and (z % y == 0)): lcm = z break z += 1 return lcm
transformation_equalto_exclamation_variable
def lcm(x, y): if x > y: z = x else: z = y while(True): if((z % x != 0) and (z % y == 0)): lcm = z break z += 1 return lcm
0
873
mbpp
def lcm(x, y): if x > y: z = x else: z = y while(True): if((z % x == 0) and (z % y == 0)): lcm = z break z += 1 return lcm
transformation_and_or_variable
def lcm(x, y): if x > y: z = x else: z = y while(True): if((z % x == 0) or (z % y == 0)): lcm = z break z += 1 return lcm
0
873
mbpp
def lcm(x, y): if x > y: z = x else: z = y while(True): if((z % x == 0) and (z % y == 0)): lcm = z break z += 1 return lcm
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
873
mbpp
def lcm(x, y): if x > y: z = x else: z = y while(True): if((z % x == 0) and (z % y == 0)): lcm = z break z += 1 return lcm
transformation_dissimilar_code_injection_1
def similar_elements(test_tup1, test_tup2): res = tuple(set(test_tup1) & set(test_tup2)) return (res)
0
873
mbpp
def lcm(x, y): if x > y: z = x else: z = y while(True): if((z % x == 0) and (z % y == 0)): lcm = z break z += 1 return lcm
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
873
mbpp
def lcm(x, y): if x > y: z = x else: z = y while(True): if((z % x == 0) and (z % y == 0)): lcm = z break z += 1 return lcm
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
873
mbpp
def lcm(x, y): if x > y: z = x else: z = y while(True): if((z % x == 0) and (z % y == 0)): lcm = z break z += 1 return lcm
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
873
mbpp
def sort_String(str) : str = ''.join(sorted(str)) return (str)
transformation_dead_code_insert
def sort_String(str): _i_3 = 0 if _i_3 < _i_3: return str str = "".join(sorted(str)) return str
1
874
mbpp
def sort_String(str) : str = ''.join(sorted(str)) return (str)
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
874
mbpp
def sort_String(str) : str = ''.join(sorted(str)) return (str)
transformation_dissimilar_code_injection_1
def similar_elements(test_tup1, test_tup2): res = tuple(set(test_tup1) & set(test_tup2)) return (res)
0
874
mbpp
def sort_String(str) : str = ''.join(sorted(str)) return (str)
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
874
mbpp
def sort_String(str) : str = ''.join(sorted(str)) return (str)
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
874
mbpp
def sort_String(str) : str = ''.join(sorted(str)) return (str)
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
874
mbpp
def check_tuples(test_tuple, K): res = all(ele in K for ele in test_tuple) return (res)
transformation_dead_code_insert
def check_tuples(test_tuple, K): _i_2 = 0 if _i_2 < _i_2: res = all(ele in K for ele in test_tuple) res = all(ele in K for ele in test_tuple) return res
1
875
mbpp
def check_tuples(test_tuple, K): res = all(ele in K for ele in test_tuple) return (res)
transformation_for_while_loop
def check_tuples(test_tuple, K): res = all(ele in K for ele in test_tuple) return res
1
875
mbpp
def check_tuples(test_tuple, K): res = all(ele in K for ele in test_tuple) return (res)
transformation_operand_swap
def check_tuples(test_tuple, K): res = all(ele in K for ele in test_tuple) return res
1
875
mbpp
def check_tuples(test_tuple, K): res = all(ele in K for ele in test_tuple) return (res)
transformation_rename_variable_cb
def check_tuples(test_tuple, K): K2 = all(ele in K for ele in test_tuple) return K2
1
875
mbpp
def check_tuples(test_tuple, K): res = all(ele in K for ele in test_tuple) return (res)
transformation_rename_variable_naive
def check_tuples(test_tuple, K): res = all(VAR_0 in K for VAR_0 in test_tuple) return res
1
875
mbpp
def check_tuples(test_tuple, K): res = all(ele in K for ele in test_tuple) return (res)
transformation_rename_variable_rn
def check_tuples(m3Rp6oUy62, K): res = all(ele in K for ele in m3Rp6oUy62) return res
1
875
mbpp
def check_tuples(test_tuple, K): res = all(ele in K for ele in test_tuple) return (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
875
mbpp
def check_tuples(test_tuple, K): res = all(ele in K for ele in test_tuple) return (res)
transformation_dissimilar_code_injection_1
def similar_elements(test_tup1, test_tup2): res = tuple(set(test_tup1) & set(test_tup2)) return (res)
0
875
mbpp
def check_tuples(test_tuple, K): res = all(ele in K for ele in test_tuple) return (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
875
mbpp
def check_tuples(test_tuple, K): res = all(ele in K for ele in test_tuple) return (res)
transformation_dissimilar_code_injection_3
def heap_queue_largest(nums,n): import heapq as hq largest_nums = hq.nlargest(n, nums) return largest_nums
0
875
mbpp
def check_tuples(test_tuple, K): res = all(ele in K for ele in test_tuple) return (res)
transformation_dissimilar_code_injection_4
def count_ways(n): A = [0] * (n + 1) B = [0] * (n + 1) A[0] = 1 A[1] = 0 B[0] = 0 B[1] = 1 for i in range(2, n+1): A[i] = A[i - 2] + 2 * B[i - 1] B[i] = A[i - 1] + B[i - 2] return A[n]
0
875
mbpp
def sum_even_odd(list1): first_even = next((el for el in list1 if el%2==0),-1) first_odd = next((el for el in list1 if el%2!=0),-1) return (first_even+first_odd)
transformation_dead_code_insert
def sum_even_odd(list1): first_even = next((el for el in list1 if el % 2 == 0), -1) _i_9 = 0 while _i_9 > _i_9: return first_even + first_odd first_odd = next((el for el in list1 if el % 2 != 0), -1) return first_even + first_odd
1
878
mbpp
def sum_even_odd(list1): first_even = next((el for el in list1 if el%2==0),-1) first_odd = next((el for el in list1 if el%2!=0),-1) return (first_even+first_odd)
transformation_for_while_loop
def sum_even_odd(list1): first_even = next((el for el in list1 if el % 2 == 0), -1) first_odd = next((el for el in list1 if el % 2 != 0), -1) return first_even + first_odd
1
878
mbpp
def sum_even_odd(list1): first_even = next((el for el in list1 if el%2==0),-1) first_odd = next((el for el in list1 if el%2!=0),-1) return (first_even+first_odd)
transformation_operand_swap
def sum_even_odd(list1): first_even = next((el for el in list1 if 0 == el % 2), -1) first_odd = next((el for el in list1 if el % 2 != 0), -1) return first_even + first_odd
1
878
mbpp
def sum_even_odd(list1): first_even = next((el for el in list1 if el%2==0),-1) first_odd = next((el for el in list1 if el%2!=0),-1) return (first_even+first_odd)
transformation_rename_variable_cb
def sum_even_odd(list1): first_even = next((i for i in list1 if i % 2 == 0), -1) first_odd = next((i for i in list1 if i % 2 != 0), -1) return first_even + first_odd
1
878
mbpp
def sum_even_odd(list1): first_even = next((el for el in list1 if el%2==0),-1) first_odd = next((el for el in list1 if el%2!=0),-1) return (first_even+first_odd)
transformation_rename_variable_naive
def sum_even_odd(list1): first_even = next((VAR_0 for VAR_0 in list1 if VAR_0 % 2 == 0), -1) first_odd = next((VAR_0 for VAR_0 in list1 if VAR_0 % 2 != 0), -1) return first_even + first_odd
1
878
mbpp
def sum_even_odd(list1): first_even = next((el for el in list1 if el%2==0),-1) first_odd = next((el for el in list1 if el%2!=0),-1) return (first_even+first_odd)
transformation_rename_variable_rn
def sum_even_odd(list1): first_even = next((i0 for i0 in list1 if i0 % 2 == 0), -1) first_odd = next((i0 for i0 in list1 if i0 % 2 != 0), -1) return first_even + first_odd
1
878
mbpp
def sum_even_odd(list1): first_even = next((el for el in list1 if el%2==0),-1) first_odd = next((el for el in list1 if el%2!=0),-1) return (first_even+first_odd)
transformation_add_sub_variable
def sum_even_odd(list1): first_even = next((el for el in list1 if el%2==0),-1) first_odd = next((el for el in list1 if el%2!=0),-1) return (first_even-first_odd)
0
878
mbpp
def sum_even_odd(list1): first_even = next((el for el in list1 if el%2==0),-1) first_odd = next((el for el in list1 if el%2!=0),-1) return (first_even+first_odd)
transformation_sub_add_variable
def sum_even_odd(list1): first_even = next((el for el in list1 if el%2==0),+1) first_odd = next((el for el in list1 if el%2!=0),-1) return (first_even+first_odd)
0
878
mbpp
def sum_even_odd(list1): first_even = next((el for el in list1 if el%2==0),-1) first_odd = next((el for el in list1 if el%2!=0),-1) return (first_even+first_odd)
transformation_equalto_exclamation_variable
def sum_even_odd(list1): first_even = next((el for el in list1 if el%2!=0),-1) first_odd = next((el for el in list1 if el%2!=0),-1) return (first_even+first_odd)
0
878
mbpp
def sum_even_odd(list1): first_even = next((el for el in list1 if el%2==0),-1) first_odd = next((el for el in list1 if el%2!=0),-1) return (first_even+first_odd)
transformation_exclamation_equalto_variable
def sum_even_odd(list1): first_even = next((el for el in list1 if el%2==0),-1) first_odd = next((el for el in list1 if el%2==0),-1) return (first_even+first_odd)
0
878
mbpp
def sum_even_odd(list1): first_even = next((el for el in list1 if el%2==0),-1) first_odd = next((el for el in list1 if el%2!=0),-1) return (first_even+first_odd)
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
878
mbpp
def sum_even_odd(list1): first_even = next((el for el in list1 if el%2==0),-1) first_odd = next((el for el in list1 if el%2!=0),-1) return (first_even+first_odd)
transformation_dissimilar_code_injection_1
def similar_elements(test_tup1, test_tup2): res = tuple(set(test_tup1) & set(test_tup2)) return (res)
0
878
mbpp
def sum_even_odd(list1): first_even = next((el for el in list1 if el%2==0),-1) first_odd = next((el for el in list1 if el%2!=0),-1) return (first_even+first_odd)
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
878
mbpp
def sum_even_odd(list1): first_even = next((el for el in list1 if el%2==0),-1) first_odd = next((el for el in list1 if el%2!=0),-1) return (first_even+first_odd)
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
878
mbpp