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 first_Repeated_Char(str): h = {} for ch in str: if ch in h: return ch; else: h[ch] = 0 return '\0'
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
214
mbpp
def first_Repeated_Char(str): h = {} for ch in str: if ch in h: return ch; else: h[ch] = 0 return '\0'
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
214
mbpp
def first_Repeated_Char(str): h = {} for ch in str: if ch in h: return ch; else: h[ch] = 0 return '\0'
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
214
mbpp
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: res.append(val) res = tuple(res) return (res)
transformation_dead_code_insert
def extract_min_max(test_tup, K): _i_7 = 0 while _i_7 < _i_7: for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: res.append(val) res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: res.append(val) res = tuple(res) return res
1
216
mbpp
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: res.append(val) res = tuple(res) return (res)
transformation_for_while_loop
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: res.append(val) res = tuple(res) return res
1
216
mbpp
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: res.append(val) res = tuple(res) return (res)
transformation_operand_swap
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if K > idx or idx >= len(temp) - K: res.append(val) res = tuple(res) return res
1
216
mbpp
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: res.append(val) res = tuple(res) return (res)
transformation_rename_variable_cb
def extract_min_max(test_tup, K): temp2 = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: temp2.append(val) temp2 = tuple(temp2) return temp2
1
216
mbpp
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: res.append(val) res = tuple(res) return (res)
transformation_rename_variable_naive
def extract_min_max(test_tup, K): VAR_0 = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: VAR_0.append(val) VAR_0 = tuple(VAR_0) return VAR_0
1
216
mbpp
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: res.append(val) res = tuple(res) return (res)
transformation_rename_variable_rn
def extract_min_max(test_tup, K): Amk = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: Amk.append(val) Amk = tuple(Amk) return Amk
1
216
mbpp
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: res.append(val) res = tuple(res) return (res)
transformation_sub_add_variable
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) + K: res.append(val) res = tuple(res) return (res)
0
216
mbpp
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: res.append(val) res = tuple(res) return (res)
transformation_lesser_greater_variable
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx > K or idx >= len(temp) - K: res.append(val) res = tuple(res) return (res)
0
216
mbpp
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: res.append(val) res = tuple(res) return (res)
transformation_greater_lesser_variable
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx <= len(temp) - K: res.append(val) res = tuple(res) return (res)
0
216
mbpp
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: res.append(val) res = tuple(res) return (res)
transformation_or_and_variable
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K and idx >= len(temp) - K: res.append(val) res = tuple(res) return (res)
0
216
mbpp
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: res.append(val) res = tuple(res) 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
216
mbpp
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: res.append(val) res = tuple(res) 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
216
mbpp
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: res.append(val) res = tuple(res) 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
216
mbpp
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: res.append(val) res = tuple(res) 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
216
mbpp
def extract_min_max(test_tup, K): res = [] test_tup = list(test_tup) temp = sorted(test_tup) for idx, val in enumerate(temp): if idx < K or idx >= len(temp) - K: res.append(val) res = tuple(res) 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
216
mbpp
def replace_max_specialchar(text,n): import re return (re.sub("[ ,.]", ":", text, n))
transformation_dead_code_insert
def replace_max_specialchar(text, n): import re for _i_0 in range(0): import re return re.sub("[ ,.]", ":", text, n)
1
217
mbpp
def replace_max_specialchar(text,n): import re return (re.sub("[ ,.]", ":", text, n))
transformation_for_while_loop
def replace_max_specialchar(text, n): import re return re.sub("[ ,.]", ":", text, n)
1
217
mbpp
def replace_max_specialchar(text,n): import re return (re.sub("[ ,.]", ":", text, n))
transformation_operand_swap
def replace_max_specialchar(text, n): import re return re.sub("[ ,.]", ":", text, n)
1
217
mbpp
def replace_max_specialchar(text,n): import re return (re.sub("[ ,.]", ":", text, n))
transformation_rename_variable_cb
def replace_max_specialchar(text, replace): import re return re.sub("[ ,.]", ":", text, replace)
1
217
mbpp
def replace_max_specialchar(text,n): import re return (re.sub("[ ,.]", ":", text, n))
transformation_rename_variable_naive
def replace_max_specialchar(VAR_0, n): import re return re.sub("[ ,.]", ":", VAR_0, n)
1
217
mbpp
def replace_max_specialchar(text,n): import re return (re.sub("[ ,.]", ":", text, n))
transformation_rename_variable_rn
def replace_max_specialchar(N382, n): import re return re.sub("[ ,.]", ":", N382, n)
1
217
mbpp
def replace_max_specialchar(text,n): import re return (re.sub("[ ,.]", ":", text, n))
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
217
mbpp
def replace_max_specialchar(text,n): import re return (re.sub("[ ,.]", ":", text, n))
transformation_dissimilar_code_injection_1
def similar_elements(test_tup1, test_tup2): res = tuple(set(test_tup1) & set(test_tup2)) return (res)
0
217
mbpp
def replace_max_specialchar(text,n): import re return (re.sub("[ ,.]", ":", text, n))
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
217
mbpp
def replace_max_specialchar(text,n): import re return (re.sub("[ ,.]", ":", text, n))
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
217
mbpp
def replace_max_specialchar(text,n): import re return (re.sub("[ ,.]", ":", text, n))
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
217
mbpp
def check_type(test_tuple): res = True for ele in test_tuple: if not isinstance(ele, type(test_tuple[0])): res = False break return (res)
transformation_dead_code_insert
def check_type(test_tuple): res = True for ele in test_tuple: _i_8 = 0 if _i_8 > _i_8: if not isinstance(ele, type(test_tuple[0])): res = False break if not isinstance(ele, type(test_tuple[0])): res = False break return res
1
219
mbpp
def check_type(test_tuple): res = True for ele in test_tuple: if not isinstance(ele, type(test_tuple[0])): res = False break return (res)
transformation_for_while_loop
def check_type(test_tuple): res = True _ele_i = 0 while _ele_i < len(test_tuple): ele = test_tuple[_ele_i] if not isinstance(ele, type(test_tuple[0])): res = False break _ele_i += 1 return res
1
219
mbpp
def check_type(test_tuple): res = True for ele in test_tuple: if not isinstance(ele, type(test_tuple[0])): res = False break return (res)
transformation_operand_swap
def check_type(test_tuple): res = True for ele in test_tuple: if not isinstance(ele, type(test_tuple[0])): res = False break return res
1
219
mbpp
def check_type(test_tuple): res = True for ele in test_tuple: if not isinstance(ele, type(test_tuple[0])): res = False break return (res)
transformation_rename_variable_naive
def check_type(VAR_0): res = True for ele in VAR_0: if not isinstance(ele, type(VAR_0[0])): res = False break return res
1
219
mbpp
def check_type(test_tuple): res = True for ele in test_tuple: if not isinstance(ele, type(test_tuple[0])): res = False break return (res)
transformation_rename_variable_rn
def check_type(U7444b3899): res = True for ele in U7444b3899: if not isinstance(ele, type(U7444b3899[0])): res = False break return res
1
219
mbpp
def check_type(test_tuple): res = True for ele in test_tuple: if not isinstance(ele, type(test_tuple[0])): res = False break return (res)
transformation_true_false_variable
def check_type(test_tuple): res = False for ele in test_tuple: if not isinstance(ele, type(test_tuple[0])): res = False break return (res)
0
219
mbpp
def check_type(test_tuple): res = True for ele in test_tuple: if not isinstance(ele, type(test_tuple[0])): res = False break return (res)
transformation_false_true_variable
def check_type(test_tuple): res = True for ele in test_tuple: if not isinstance(ele, type(test_tuple[0])): res = True break return (res)
0
219
mbpp
def check_type(test_tuple): res = True for ele in test_tuple: if not isinstance(ele, type(test_tuple[0])): res = False break 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
219
mbpp
def check_type(test_tuple): res = True for ele in test_tuple: if not isinstance(ele, type(test_tuple[0])): res = False break 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
219
mbpp
def check_type(test_tuple): res = True for ele in test_tuple: if not isinstance(ele, type(test_tuple[0])): res = False break 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
219
mbpp
def check_type(test_tuple): res = True for ele in test_tuple: if not isinstance(ele, type(test_tuple[0])): res = False break 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
219
mbpp
def check_type(test_tuple): res = True for ele in test_tuple: if not isinstance(ele, type(test_tuple[0])): res = False break 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
219
mbpp
def count_Set_Bits(n): count = 0 while (n): count += n & 1 n >>= 1 return count
transformation_dead_code_insert
def count_Set_Bits(n): count = 0 while n: for _i_4 in range(0): count = 0 count += n & 1 n >>= 1 return count
1
221
mbpp
def count_Set_Bits(n): count = 0 while (n): count += n & 1 n >>= 1 return count
transformation_for_while_loop
def count_Set_Bits(n): count = 0 while n: count += n & 1 n >>= 1 return count
1
221
mbpp
def count_Set_Bits(n): count = 0 while (n): count += n & 1 n >>= 1 return count
transformation_operand_swap
def count_Set_Bits(n): count = 0 while n: count += n & 1 n >>= 1 return count
1
221
mbpp
def count_Set_Bits(n): count = 0 while (n): count += n & 1 n >>= 1 return count
transformation_rename_variable_cb
def count_Set_Bits(pri): count = 0 while pri: count += pri & 1 pri >>= 1 return count
1
221
mbpp
def count_Set_Bits(n): count = 0 while (n): count += n & 1 n >>= 1 return count
transformation_rename_variable_naive
def count_Set_Bits(VAR_0): count = 0 while VAR_0: count += VAR_0 & 1 VAR_0 >>= 1 return count
1
221
mbpp
def count_Set_Bits(n): count = 0 while (n): count += n & 1 n >>= 1 return count
transformation_rename_variable_rn
def count_Set_Bits(F): count = 0 while F: count += F & 1 F >>= 1 return count
1
221
mbpp
def count_Set_Bits(n): count = 0 while (n): count += n & 1 n >>= 1 return count
transformation_add_sub_variable
def count_Set_Bits(n): count = 0 while (n): count -= n & 1 n >>= 1 return count
0
221
mbpp
def count_Set_Bits(n): count = 0 while (n): count += n & 1 n >>= 1 return count
transformation_greater_lesser_variable
def count_Set_Bits(n): count = 0 while (n): count += n & 1 n <>= 1 return count
0
221
mbpp
def count_Set_Bits(n): count = 0 while (n): count += n & 1 n >>= 1 return count
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
221
mbpp
def count_Set_Bits(n): count = 0 while (n): count += n & 1 n >>= 1 return count
transformation_dissimilar_code_injection_1
def similar_elements(test_tup1, test_tup2): res = tuple(set(test_tup1) & set(test_tup2)) return (res)
0
221
mbpp
def count_Set_Bits(n): count = 0 while (n): count += n & 1 n >>= 1 return count
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
221
mbpp
def count_Set_Bits(n): count = 0 while (n): count += n & 1 n >>= 1 return count
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
221
mbpp
def count_Set_Bits(n): count = 0 while (n): count += n & 1 n >>= 1 return count
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
221
mbpp
def find_Min(arr,low,high): while (low < high): mid = low + (high - low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
transformation_dead_code_insert
def find_Min(arr, low, high): while low < high: mid = low + (high - low) // 2 if arr[mid] == arr[high]: _i_5 = 0 while _i_5 < _i_5: high = mid high -= 1 elif arr[mid] > arr[high]: low = mid + 1 else: high = mid return arr[high]
1
222
mbpp
def find_Min(arr,low,high): while (low < high): mid = low + (high - low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
transformation_for_while_loop
def find_Min(arr, low, high): while low < high: mid = low + (high - low) // 2 if arr[mid] == arr[high]: high -= 1 elif arr[mid] > arr[high]: low = mid + 1 else: high = mid return arr[high]
1
222
mbpp
def find_Min(arr,low,high): while (low < high): mid = low + (high - low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
transformation_operand_swap
def find_Min(arr, low, high): while high > low: mid = low + (high - low) // 2 if arr[mid] == arr[high]: high -= 1 elif arr[mid] > arr[high]: low = mid + 1 else: high = mid return arr[high]
1
222
mbpp
def find_Min(arr,low,high): while (low < high): mid = low + (high - low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
transformation_rename_variable_cb
def find_Min(arr, low, mid2): while low < mid2: mid = low + (mid2 - low) // 2 if arr[mid] == arr[mid2]: mid2 -= 1 elif arr[mid] > arr[mid2]: low = mid + 1 else: mid2 = mid return arr[mid2]
1
222
mbpp
def find_Min(arr,low,high): while (low < high): mid = low + (high - low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
transformation_rename_variable_naive
def find_Min(arr, low, VAR_0): while low < VAR_0: mid = low + (VAR_0 - low) // 2 if arr[mid] == arr[VAR_0]: VAR_0 -= 1 elif arr[mid] > arr[VAR_0]: low = mid + 1 else: VAR_0 = mid return arr[VAR_0]
1
222
mbpp
def find_Min(arr,low,high): while (low < high): mid = low + (high - low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
transformation_rename_variable_rn
def find_Min(arr, low, S329): while low < S329: mid = low + (S329 - low) // 2 if arr[mid] == arr[S329]: S329 -= 1 elif arr[mid] > arr[S329]: low = mid + 1 else: S329 = mid return arr[S329]
1
222
mbpp
def find_Min(arr,low,high): while (low < high): mid = low + (high - low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
transformation_add_sub_variable
def find_Min(arr,low,high): while (low < high): mid = low - (high - low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
0
222
mbpp
def find_Min(arr,low,high): while (low < high): mid = low + (high - low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
transformation_sub_add_variable
def find_Min(arr,low,high): while (low < high): mid = low + (high + low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
0
222
mbpp
def find_Min(arr,low,high): while (low < high): mid = low + (high - low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
transformation_div_mul_variable
def find_Min(arr,low,high): while (low < high): mid = low + (high - low) */ 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
0
222
mbpp
def find_Min(arr,low,high): while (low < high): mid = low + (high - low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
transformation_lesser_greater_variable
def find_Min(arr,low,high): while (low > high): mid = low + (high - low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
0
222
mbpp
def find_Min(arr,low,high): while (low < high): mid = low + (high - low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
transformation_greater_lesser_variable
def find_Min(arr,low,high): while (low < high): mid = low + (high - low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] < arr[high]): low = mid + 1; else: high = mid; return arr[high];
0
222
mbpp
def find_Min(arr,low,high): while (low < high): mid = low + (high - low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
transformation_equalto_exclamation_variable
def find_Min(arr,low,high): while (low < high): mid = low + (high - low) // 2; if (arr[mid] != arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
0
222
mbpp
def find_Min(arr,low,high): while (low < high): mid = low + (high - low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
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
222
mbpp
def find_Min(arr,low,high): while (low < high): mid = low + (high - low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
transformation_dissimilar_code_injection_1
def similar_elements(test_tup1, test_tup2): res = tuple(set(test_tup1) & set(test_tup2)) return (res)
0
222
mbpp
def find_Min(arr,low,high): while (low < high): mid = low + (high - low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
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
222
mbpp
def find_Min(arr,low,high): while (low < high): mid = low + (high - low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
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
222
mbpp
def find_Min(arr,low,high): while (low < high): mid = low + (high - low) // 2; if (arr[mid] == arr[high]): high -= 1; elif (arr[mid] > arr[high]): low = mid + 1; else: high = mid; return arr[high];
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
222
mbpp
def min_of_three(a,b,c): if (a <= b) and (a <= c): smallest = a elif (b <= a) and (b <= c): smallest = b else: smallest = c return smallest
transformation_dead_code_insert
def min_of_three(a, b, c): if (a <= b) and (a <= c): for _i_9 in range(0): return smallest smallest = a elif (b <= a) and (b <= c): smallest = b else: smallest = c return smallest
1
224
mbpp
def min_of_three(a,b,c): if (a <= b) and (a <= c): smallest = a elif (b <= a) and (b <= c): smallest = b else: smallest = c return smallest
transformation_for_while_loop
def min_of_three(a, b, c): if (a <= b) and (a <= c): smallest = a elif (b <= a) and (b <= c): smallest = b else: smallest = c return smallest
1
224
mbpp
def min_of_three(a,b,c): if (a <= b) and (a <= c): smallest = a elif (b <= a) and (b <= c): smallest = b else: smallest = c return smallest
transformation_operand_swap
def min_of_three(a, b, c): if (b >= a) and (a <= c): smallest = a elif (b <= a) and (b <= c): smallest = b else: smallest = c return smallest
1
224
mbpp
def min_of_three(a,b,c): if (a <= b) and (a <= c): smallest = a elif (b <= a) and (b <= c): smallest = b else: smallest = c return smallest
transformation_rename_variable_cb
def min_of_three(a2, b, c): if (a2 <= b) and (a2 <= c): smallest = a2 elif (b <= a2) and (b <= c): smallest = b else: smallest = c return smallest
1
224
mbpp
def min_of_three(a,b,c): if (a <= b) and (a <= c): smallest = a elif (b <= a) and (b <= c): smallest = b else: smallest = c return smallest
transformation_rename_variable_naive
def min_of_three(VAR_0, b, c): if (VAR_0 <= b) and (VAR_0 <= c): smallest = VAR_0 elif (b <= VAR_0) and (b <= c): smallest = b else: smallest = c return smallest
1
224
mbpp
def min_of_three(a,b,c): if (a <= b) and (a <= c): smallest = a elif (b <= a) and (b <= c): smallest = b else: smallest = c return smallest
transformation_rename_variable_rn
def min_of_three(a, r, c): if (a <= r) and (a <= c): smallest = a elif (r <= a) and (r <= c): smallest = r else: smallest = c return smallest
1
224
mbpp
def min_of_three(a,b,c): if (a <= b) and (a <= c): smallest = a elif (b <= a) and (b <= c): smallest = b else: smallest = c return smallest
transformation_lesser_greater_variable
def min_of_three(a,b,c): if (a >= b) and (a <= c): smallest = a elif (b <= a) and (b <= c): smallest = b else: smallest = c return smallest
0
224
mbpp
def min_of_three(a,b,c): if (a <= b) and (a <= c): smallest = a elif (b <= a) and (b <= c): smallest = b else: smallest = c return smallest
transformation_and_or_variable
def min_of_three(a,b,c): if (a <= b) or (a <= c): smallest = a elif (b <= a) and (b <= c): smallest = b else: smallest = c return smallest
0
224
mbpp
def min_of_three(a,b,c): if (a <= b) and (a <= c): smallest = a elif (b <= a) and (b <= c): smallest = b else: smallest = c return smallest
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
224
mbpp
def min_of_three(a,b,c): if (a <= b) and (a <= c): smallest = a elif (b <= a) and (b <= c): smallest = b else: smallest = c return smallest
transformation_dissimilar_code_injection_1
def similar_elements(test_tup1, test_tup2): res = tuple(set(test_tup1) & set(test_tup2)) return (res)
0
224
mbpp
def min_of_three(a,b,c): if (a <= b) and (a <= c): smallest = a elif (b <= a) and (b <= c): smallest = b else: smallest = c return smallest
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
224
mbpp
def min_of_three(a,b,c): if (a <= b) and (a <= c): smallest = a elif (b <= a) and (b <= c): smallest = b else: smallest = c return smallest
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
224
mbpp
def min_of_three(a,b,c): if (a <= b) and (a <= c): smallest = a elif (b <= a) and (b <= c): smallest = b else: smallest = c return smallest
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
224
mbpp
def all_Bits_Set_In_The_Given_Range(n,l,r): num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)) new_num = n & num if (new_num == 0): return True return False
transformation_dead_code_insert
def all_Bits_Set_In_The_Given_Range(n, l, r): for _i_0 in range(0): num = ((1 << r) - 1) ^ ((1 << (l - 1)) - 1) num = ((1 << r) - 1) ^ ((1 << (l - 1)) - 1) new_num = n & num if new_num == 0: return True return False
1
225
mbpp
def all_Bits_Set_In_The_Given_Range(n,l,r): num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)) new_num = n & num if (new_num == 0): return True return False
transformation_for_while_loop
def all_Bits_Set_In_The_Given_Range(n, l, r): num = ((1 << r) - 1) ^ ((1 << (l - 1)) - 1) new_num = n & num if new_num == 0: return True return False
1
225
mbpp
def all_Bits_Set_In_The_Given_Range(n,l,r): num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)) new_num = n & num if (new_num == 0): return True return False
transformation_operand_swap
def all_Bits_Set_In_The_Given_Range(n, l, r): num = ((1 << r) - 1) ^ ((1 << (l - 1)) - 1) new_num = n & num if 0 == new_num: return True return False
1
225
mbpp
def all_Bits_Set_In_The_Given_Range(n,l,r): num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)) new_num = n & num if (new_num == 0): return True return False
transformation_rename_variable_cb
def all_Bits_Set_In_The_Given_Range(n, l, r): num = ((1 << r) - 1) ^ ((1 << (l - 1)) - 1) num2 = n & num if num2 == 0: return True return False
1
225
mbpp
def all_Bits_Set_In_The_Given_Range(n,l,r): num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)) new_num = n & num if (new_num == 0): return True return False
transformation_rename_variable_naive
def all_Bits_Set_In_The_Given_Range(n, l, VAR_0): num = ((1 << VAR_0) - 1) ^ ((1 << (l - 1)) - 1) new_num = n & num if new_num == 0: return True return False
1
225
mbpp
def all_Bits_Set_In_The_Given_Range(n,l,r): num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)) new_num = n & num if (new_num == 0): return True return False
transformation_rename_variable_rn
def all_Bits_Set_In_The_Given_Range(T, l, r): num = ((1 << r) - 1) ^ ((1 << (l - 1)) - 1) new_num = T & num if new_num == 0: return True return False
1
225
mbpp
def all_Bits_Set_In_The_Given_Range(n,l,r): num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)) new_num = n & num if (new_num == 0): return True return False
transformation_sub_add_variable
def all_Bits_Set_In_The_Given_Range(n,l,r): num = (((1 << r) + 1) ^ ((1 << (l - 1)) - 1)) new_num = n & num if (new_num == 0): return True return False
0
225
mbpp
def all_Bits_Set_In_The_Given_Range(n,l,r): num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)) new_num = n & num if (new_num == 0): return True return False
transformation_lesser_greater_variable
def all_Bits_Set_In_The_Given_Range(n,l,r): num = (((1 >< r) - 1) ^ ((1 << (l - 1)) - 1)) new_num = n & num if (new_num == 0): return True return False
0
225
mbpp
def all_Bits_Set_In_The_Given_Range(n,l,r): num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)) new_num = n & num if (new_num == 0): return True return False
transformation_equalto_exclamation_variable
def all_Bits_Set_In_The_Given_Range(n,l,r): num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)) new_num = n & num if (new_num != 0): return True return False
0
225
mbpp
def all_Bits_Set_In_The_Given_Range(n,l,r): num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)) new_num = n & num if (new_num == 0): return True return False
transformation_true_false_variable
def all_Bits_Set_In_The_Given_Range(n,l,r): num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)) new_num = n & num if (new_num == 0): return False return False
0
225
mbpp
def all_Bits_Set_In_The_Given_Range(n,l,r): num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)) new_num = n & num if (new_num == 0): return True return False
transformation_false_true_variable
def all_Bits_Set_In_The_Given_Range(n,l,r): num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)) new_num = n & num if (new_num == 0): return True return True
0
225
mbpp
def all_Bits_Set_In_The_Given_Range(n,l,r): num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)) new_num = n & num if (new_num == 0): 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
225
mbpp
def all_Bits_Set_In_The_Given_Range(n,l,r): num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)) new_num = n & num if (new_num == 0): 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
225
mbpp
def all_Bits_Set_In_The_Given_Range(n,l,r): num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)) new_num = n & num if (new_num == 0): 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
225
mbpp
def all_Bits_Set_In_The_Given_Range(n,l,r): num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)) new_num = n & num if (new_num == 0): 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
225
mbpp
def all_Bits_Set_In_The_Given_Range(n,l,r): num = (((1 << r) - 1) ^ ((1 << (l - 1)) - 1)) new_num = n & num if (new_num == 0): 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
225
mbpp