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 odd_bit_set_number(n):
count = 0;res = 0;temp = n
while temp > 0:
if count % 2 == 0:
res |= (1 << count)
count += 1
temp >>= 1
return (n | res) | transformation_for_while_loop | def odd_bit_set_number(n):
count = 0
res = 0
temp = n
while temp > 0:
if count % 2 == 0:
res |= 1 << count
count += 1
temp >>= 1
return n | res | 1 | 47 | mbpp |
def odd_bit_set_number(n):
count = 0;res = 0;temp = n
while temp > 0:
if count % 2 == 0:
res |= (1 << count)
count += 1
temp >>= 1
return (n | res) | transformation_operand_swap | def odd_bit_set_number(n):
count = 0
res = 0
temp = n
while 0 < temp:
if count % 2 == 0:
res |= 1 << count
count += 1
temp >>= 1
return n | res | 1 | 47 | mbpp |
def odd_bit_set_number(n):
count = 0;res = 0;temp = n
while temp > 0:
if count % 2 == 0:
res |= (1 << count)
count += 1
temp >>= 1
return (n | res) | transformation_rename_variable_cb | def odd_bit_set_number(n):
temp2 = 0
res = 0
temp = n
while temp > 0:
if temp2 % 2 == 0:
res |= 1 << temp2
temp2 += 1
temp >>= 1
return n | res | 1 | 47 | mbpp |
def odd_bit_set_number(n):
count = 0;res = 0;temp = n
while temp > 0:
if count % 2 == 0:
res |= (1 << count)
count += 1
temp >>= 1
return (n | res) | transformation_rename_variable_naive | def odd_bit_set_number(n):
VAR_0 = 0
res = 0
temp = n
while temp > 0:
if VAR_0 % 2 == 0:
res |= 1 << VAR_0
VAR_0 += 1
temp >>= 1
return n | res | 1 | 47 | mbpp |
def odd_bit_set_number(n):
count = 0;res = 0;temp = n
while temp > 0:
if count % 2 == 0:
res |= (1 << count)
count += 1
temp >>= 1
return (n | res) | transformation_rename_variable_rn | def odd_bit_set_number(n):
tob11 = 0
res = 0
temp = n
while temp > 0:
if tob11 % 2 == 0:
res |= 1 << tob11
tob11 += 1
temp >>= 1
return n | res | 1 | 47 | mbpp |
def odd_bit_set_number(n):
count = 0;res = 0;temp = n
while temp > 0:
if count % 2 == 0:
res |= (1 << count)
count += 1
temp >>= 1
return (n | res) | transformation_add_sub_variable | def odd_bit_set_number(n):
count = 0;res = 0;temp = n
while temp > 0:
if count % 2 == 0:
res |= (1 << count)
count -= 1
temp >>= 1
return (n | res) | 0 | 47 | mbpp |
def odd_bit_set_number(n):
count = 0;res = 0;temp = n
while temp > 0:
if count % 2 == 0:
res |= (1 << count)
count += 1
temp >>= 1
return (n | res) | transformation_lesser_greater_variable | def odd_bit_set_number(n):
count = 0;res = 0;temp = n
while temp > 0:
if count % 2 == 0:
res |= (1 >< count)
count += 1
temp >>= 1
return (n | res) | 0 | 47 | mbpp |
def odd_bit_set_number(n):
count = 0;res = 0;temp = n
while temp > 0:
if count % 2 == 0:
res |= (1 << count)
count += 1
temp >>= 1
return (n | res) | transformation_greater_lesser_variable | def odd_bit_set_number(n):
count = 0;res = 0;temp = n
while temp < 0:
if count % 2 == 0:
res |= (1 << count)
count += 1
temp >>= 1
return (n | res) | 0 | 47 | mbpp |
def odd_bit_set_number(n):
count = 0;res = 0;temp = n
while temp > 0:
if count % 2 == 0:
res |= (1 << count)
count += 1
temp >>= 1
return (n | res) | transformation_equalto_exclamation_variable | def odd_bit_set_number(n):
count = 0;res = 0;temp = n
while temp > 0:
if count % 2 != 0:
res |= (1 << count)
count += 1
temp >>= 1
return (n | res) | 0 | 47 | mbpp |
def odd_bit_set_number(n):
count = 0;res = 0;temp = n
while temp > 0:
if count % 2 == 0:
res |= (1 << count)
count += 1
temp >>= 1
return (n | 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 | 47 | mbpp |
def odd_bit_set_number(n):
count = 0;res = 0;temp = n
while temp > 0:
if count % 2 == 0:
res |= (1 << count)
count += 1
temp >>= 1
return (n | res) | transformation_dissimilar_code_injection_1 | def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | 0 | 47 | mbpp |
def odd_bit_set_number(n):
count = 0;res = 0;temp = n
while temp > 0:
if count % 2 == 0:
res |= (1 << count)
count += 1
temp >>= 1
return (n | 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 | 47 | mbpp |
def odd_bit_set_number(n):
count = 0;res = 0;temp = n
while temp > 0:
if count % 2 == 0:
res |= (1 << count)
count += 1
temp >>= 1
return (n | 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 | 47 | mbpp |
def odd_bit_set_number(n):
count = 0;res = 0;temp = n
while temp > 0:
if count % 2 == 0:
res |= (1 << count)
count += 1
temp >>= 1
return (n | 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 | 47 | mbpp |
def specified_element(nums, N):
result = [i[N] for i in nums]
return result
| transformation_dead_code_insert | def specified_element(nums, N):
result = [i[N] for i in nums]
while False:
return result
return result | 1 | 48 | mbpp |
def specified_element(nums, N):
result = [i[N] for i in nums]
return result
| transformation_for_while_loop | def specified_element(nums, N):
result = [i[N] for i in nums]
return result | 1 | 48 | mbpp |
def specified_element(nums, N):
result = [i[N] for i in nums]
return result
| transformation_operand_swap | def specified_element(nums, N):
result = [i[N] for i in nums]
return result | 1 | 48 | mbpp |
def specified_element(nums, N):
result = [i[N] for i in nums]
return result
| transformation_rename_variable_cb | def specified_element(nums, N):
result = [i2[N] for i2 in nums]
return result | 1 | 48 | mbpp |
def specified_element(nums, N):
result = [i[N] for i in nums]
return result
| transformation_rename_variable_naive | def specified_element(VAR_0, N):
result = [i[N] for i in VAR_0]
return result | 1 | 48 | mbpp |
def specified_element(nums, N):
result = [i[N] for i in nums]
return result
| transformation_rename_variable_rn | def specified_element(nums, N):
result = [Z[N] for Z in nums]
return result | 1 | 48 | mbpp |
def specified_element(nums, N):
result = [i[N] for i in nums]
return result
| transformation_dissimilar_code_injection_0 | def min_cost(cost, m, n):
R = 3
C = 3
tc = [[0 for x in range(C)] for x in range(R)]
tc[0][0] = cost[0][0]
for i in range(1, m+1):
tc[i][0] = tc[i-1][0] + cost[i][0]
for j in range(1, n+1):
tc[0][j] = tc[0][j-1] + cost[0][j]
for i in range(1, m+1):
for j in range(1, n+1):
tc[i][j] = min(tc[i-1][j-1], tc[i-1][j], tc[i][j-1]) + cost[i][j]
return tc[m][n] | 0 | 48 | mbpp |
def specified_element(nums, N):
result = [i[N] for i in nums]
return result
| transformation_dissimilar_code_injection_1 | def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | 0 | 48 | mbpp |
def specified_element(nums, N):
result = [i[N] for i in nums]
return result
| transformation_dissimilar_code_injection_2 | def is_not_prime(n):
import math
result = False
for i in range(2,int(math.sqrt(n)) + 1):
if n % i == 0:
result = True
return result | 0 | 48 | mbpp |
def specified_element(nums, N):
result = [i[N] for i in nums]
return result
| transformation_dissimilar_code_injection_3 | def heap_queue_largest(nums,n):
import heapq as hq
largest_nums = hq.nlargest(n, nums)
return largest_nums | 0 | 48 | mbpp |
def specified_element(nums, N):
result = [i[N] for i in nums]
return result
| transformation_dissimilar_code_injection_4 | def count_ways(n):
A = [0] * (n + 1)
B = [0] * (n + 1)
A[0] = 1
A[1] = 0
B[0] = 0
B[1] = 1
for i in range(2, n+1):
A[i] = A[i - 2] + 2 * B[i - 1]
B[i] = A[i - 1] + B[i - 2]
return A[n] | 0 | 48 | mbpp |
def check_equilateral(x,y,z):
if x == y == z:
return True
else:
return False | transformation_dead_code_insert | def check_equilateral(x, y, z):
if x == y == z:
for _i_3 in range(0):
return False
return True
else:
return False | 1 | 50 | mbpp |
def check_equilateral(x,y,z):
if x == y == z:
return True
else:
return False | transformation_for_while_loop | def check_equilateral(x, y, z):
if x == y == z:
return True
else:
return False | 1 | 50 | mbpp |
def check_equilateral(x,y,z):
if x == y == z:
return True
else:
return False | transformation_operand_swap | def check_equilateral(x, y, z):
if x == y == z:
return True
else:
return False | 1 | 50 | mbpp |
def check_equilateral(x,y,z):
if x == y == z:
return True
else:
return False | transformation_rename_variable_cb | def check_equilateral(x2, y, z):
if x2 == y == z:
return True
else:
return False | 1 | 50 | mbpp |
def check_equilateral(x,y,z):
if x == y == z:
return True
else:
return False | transformation_rename_variable_naive | def check_equilateral(VAR_0, y, z):
if VAR_0 == y == z:
return True
else:
return False | 1 | 50 | mbpp |
def check_equilateral(x,y,z):
if x == y == z:
return True
else:
return False | transformation_rename_variable_rn | def check_equilateral(v, y, z):
if v == y == z:
return True
else:
return False | 1 | 50 | mbpp |
def check_equilateral(x,y,z):
if x == y == z:
return True
else:
return False | transformation_equalto_exclamation_variable | def check_equilateral(x,y,z):
if x != y == z:
return True
else:
return False | 0 | 50 | mbpp |
def check_equilateral(x,y,z):
if x == y == z:
return True
else:
return False | transformation_true_false_variable | def check_equilateral(x,y,z):
if x == y == z:
return False
else:
return False | 0 | 50 | mbpp |
def check_equilateral(x,y,z):
if x == y == z:
return True
else:
return False | transformation_false_true_variable | def check_equilateral(x,y,z):
if x == y == z:
return True
else:
return True | 0 | 50 | mbpp |
def check_equilateral(x,y,z):
if x == y == z:
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 | 50 | mbpp |
def check_equilateral(x,y,z):
if x == y == z:
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 | 50 | mbpp |
def check_equilateral(x,y,z):
if x == y == z:
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 | 50 | mbpp |
def check_equilateral(x,y,z):
if x == y == z:
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 | 50 | mbpp |
def check_equilateral(x,y,z):
if x == y == z:
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 | 50 | mbpp |
def check_Equality(str):
if (str[0] == str[-1]):
return ("Equal")
else:
return ("Not Equal") | transformation_dead_code_insert | def check_Equality(str):
if str[0] == str[-1]:
_i_5 = 0
while _i_5 < _i_5:
return "Not Equal"
return "Equal"
else:
return "Not Equal" | 1 | 52 | mbpp |
def check_Equality(str):
if (str[0] == str[-1]):
return ("Equal")
else:
return ("Not Equal") | transformation_for_while_loop | def check_Equality(str):
if str[0] == str[-1]:
return "Equal"
else:
return "Not Equal" | 1 | 52 | mbpp |
def check_Equality(str):
if (str[0] == str[-1]):
return ("Equal")
else:
return ("Not Equal") | transformation_operand_swap | def check_Equality(str):
if str[-1] == str[0]:
return "Equal"
else:
return "Not Equal" | 1 | 52 | mbpp |
def check_Equality(str):
if (str[0] == str[-1]):
return ("Equal")
else:
return ("Not Equal") | transformation_rename_variable_cb | def check_Equality(str):
if str[0] == str[-1]:
return "Equal"
else:
return "Not Equal" | 1 | 52 | mbpp |
def check_Equality(str):
if (str[0] == str[-1]):
return ("Equal")
else:
return ("Not Equal") | transformation_rename_variable_naive | def check_Equality(str):
if str[0] == str[-1]:
return "Equal"
else:
return "Not Equal" | 1 | 52 | mbpp |
def check_Equality(str):
if (str[0] == str[-1]):
return ("Equal")
else:
return ("Not Equal") | transformation_rename_variable_rn | def check_Equality(str):
if str[0] == str[-1]:
return "Equal"
else:
return "Not Equal" | 1 | 52 | mbpp |
def check_Equality(str):
if (str[0] == str[-1]):
return ("Equal")
else:
return ("Not Equal") | transformation_sub_add_variable | def check_Equality(str):
if (str[0] == str[+1]):
return ("Equal")
else:
return ("Not Equal") | 0 | 52 | mbpp |
def check_Equality(str):
if (str[0] == str[-1]):
return ("Equal")
else:
return ("Not Equal") | transformation_equalto_exclamation_variable | def check_Equality(str):
if (str[0] != str[-1]):
return ("Equal")
else:
return ("Not Equal") | 0 | 52 | mbpp |
def check_Equality(str):
if (str[0] == str[-1]):
return ("Equal")
else:
return ("Not Equal") | 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 | 52 | mbpp |
def check_Equality(str):
if (str[0] == str[-1]):
return ("Equal")
else:
return ("Not Equal") | transformation_dissimilar_code_injection_1 | def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | 0 | 52 | mbpp |
def check_Equality(str):
if (str[0] == str[-1]):
return ("Equal")
else:
return ("Not Equal") | 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 | 52 | mbpp |
def check_Equality(str):
if (str[0] == str[-1]):
return ("Equal")
else:
return ("Not Equal") | 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 | 52 | mbpp |
def check_Equality(str):
if (str[0] == str[-1]):
return ("Equal")
else:
return ("Not Equal") | 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 | 52 | mbpp |
def counting_sort(my_list):
max_value = 0
for i in range(len(my_list)):
if my_list[i] > max_value:
max_value = my_list[i]
buckets = [0] * (max_value + 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list | transformation_dead_code_insert | def counting_sort(my_list):
max_value = 0
for i in range(len(my_list)):
if my_list[i] > max_value:
_i_5 = 0
if _i_5 > _i_5:
my_list[i] = j
max_value = my_list[i]
buckets = [0] * (max_value + 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list | 1 | 53 | mbpp |
def counting_sort(my_list):
max_value = 0
for i in range(len(my_list)):
if my_list[i] > max_value:
max_value = my_list[i]
buckets = [0] * (max_value + 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list | transformation_for_while_loop | def counting_sort(my_list):
max_value = 0
i = 0
while i < len(my_list):
if my_list[i] > max_value:
max_value = my_list[i]
i += 1
buckets = [0] * (max_value + 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list | 1 | 53 | mbpp |
def counting_sort(my_list):
max_value = 0
for i in range(len(my_list)):
if my_list[i] > max_value:
max_value = my_list[i]
buckets = [0] * (max_value + 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list | transformation_operand_swap | def counting_sort(my_list):
max_value = 0
for i in range(len(my_list)):
if max_value < my_list[i]:
max_value = my_list[i]
buckets = [0] * (max_value + 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list | 1 | 53 | mbpp |
def counting_sort(my_list):
max_value = 0
for i in range(len(my_list)):
if my_list[i] > max_value:
max_value = my_list[i]
buckets = [0] * (max_value + 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list | transformation_rename_variable_cb | def counting_sort(my_list):
max_value = 0
for i2 in range(len(my_list)):
if my_list[i2] > max_value:
max_value = my_list[i2]
buckets = [0] * (max_value + 1)
for i2 in my_list:
buckets[i2] += 1
i2 = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[i2] = j
i2 += 1
return my_list | 1 | 53 | mbpp |
def counting_sort(my_list):
max_value = 0
for i in range(len(my_list)):
if my_list[i] > max_value:
max_value = my_list[i]
buckets = [0] * (max_value + 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list | transformation_rename_variable_naive | def counting_sort(my_list):
max_value = 0
for VAR_0 in range(len(my_list)):
if my_list[VAR_0] > max_value:
max_value = my_list[VAR_0]
buckets = [0] * (max_value + 1)
for VAR_0 in my_list:
buckets[VAR_0] += 1
VAR_0 = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[VAR_0] = j
VAR_0 += 1
return my_list | 1 | 53 | mbpp |
def counting_sort(my_list):
max_value = 0
for i in range(len(my_list)):
if my_list[i] > max_value:
max_value = my_list[i]
buckets = [0] * (max_value + 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list | transformation_rename_variable_rn | def counting_sort(my_list):
max_value = 0
for X in range(len(my_list)):
if my_list[X] > max_value:
max_value = my_list[X]
buckets = [0] * (max_value + 1)
for X in my_list:
buckets[X] += 1
X = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[X] = j
X += 1
return my_list | 1 | 53 | mbpp |
def counting_sort(my_list):
max_value = 0
for i in range(len(my_list)):
if my_list[i] > max_value:
max_value = my_list[i]
buckets = [0] * (max_value + 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list | transformation_add_sub_variable | def counting_sort(my_list):
max_value = 0
for i in range(len(my_list)):
if my_list[i] > max_value:
max_value = my_list[i]
buckets = [0] * (max_value - 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list | 0 | 53 | mbpp |
def counting_sort(my_list):
max_value = 0
for i in range(len(my_list)):
if my_list[i] > max_value:
max_value = my_list[i]
buckets = [0] * (max_value + 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list | transformation_mul_div_variable | def counting_sort(my_list):
max_value = 0
for i in range(len(my_list)):
if my_list[i] > max_value:
max_value = my_list[i]
buckets = [0] / (max_value + 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list | 0 | 53 | mbpp |
def counting_sort(my_list):
max_value = 0
for i in range(len(my_list)):
if my_list[i] > max_value:
max_value = my_list[i]
buckets = [0] * (max_value + 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list | transformation_greater_lesser_variable | def counting_sort(my_list):
max_value = 0
for i in range(len(my_list)):
if my_list[i] < max_value:
max_value = my_list[i]
buckets = [0] * (max_value + 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list | 0 | 53 | mbpp |
def counting_sort(my_list):
max_value = 0
for i in range(len(my_list)):
if my_list[i] > max_value:
max_value = my_list[i]
buckets = [0] * (max_value + 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list | transformation_dissimilar_code_injection_0 | def min_cost(cost, m, n):
R = 3
C = 3
tc = [[0 for x in range(C)] for x in range(R)]
tc[0][0] = cost[0][0]
for i in range(1, m+1):
tc[i][0] = tc[i-1][0] + cost[i][0]
for j in range(1, n+1):
tc[0][j] = tc[0][j-1] + cost[0][j]
for i in range(1, m+1):
for j in range(1, n+1):
tc[i][j] = min(tc[i-1][j-1], tc[i-1][j], tc[i][j-1]) + cost[i][j]
return tc[m][n] | 0 | 53 | mbpp |
def counting_sort(my_list):
max_value = 0
for i in range(len(my_list)):
if my_list[i] > max_value:
max_value = my_list[i]
buckets = [0] * (max_value + 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list | transformation_dissimilar_code_injection_1 | def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | 0 | 53 | mbpp |
def counting_sort(my_list):
max_value = 0
for i in range(len(my_list)):
if my_list[i] > max_value:
max_value = my_list[i]
buckets = [0] * (max_value + 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list | transformation_dissimilar_code_injection_2 | def is_not_prime(n):
import math
result = False
for i in range(2,int(math.sqrt(n)) + 1):
if n % i == 0:
result = True
return result | 0 | 53 | mbpp |
def counting_sort(my_list):
max_value = 0
for i in range(len(my_list)):
if my_list[i] > max_value:
max_value = my_list[i]
buckets = [0] * (max_value + 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list | transformation_dissimilar_code_injection_3 | def heap_queue_largest(nums,n):
import heapq as hq
largest_nums = hq.nlargest(n, nums)
return largest_nums | 0 | 53 | mbpp |
def counting_sort(my_list):
max_value = 0
for i in range(len(my_list)):
if my_list[i] > max_value:
max_value = my_list[i]
buckets = [0] * (max_value + 1)
for i in my_list:
buckets[i] += 1
i = 0
for j in range(max_value + 1):
for a in range(buckets[j]):
my_list[i] = j
i += 1
return my_list | transformation_dissimilar_code_injection_4 | def count_ways(n):
A = [0] * (n + 1)
B = [0] * (n + 1)
A[0] = 1
A[1] = 0
B[0] = 0
B[1] = 1
for i in range(2, n+1):
A[i] = A[i - 2] + 2 * B[i - 1]
B[i] = A[i - 1] + B[i - 2]
return A[n] | 0 | 53 | mbpp |
def opposite_Signs(x,y):
return ((x ^ y) < 0); | transformation_dead_code_insert | def opposite_Signs(x, y):
if False:
return (x ^ y) < 0
return (x ^ y) < 0 | 1 | 57 | mbpp |
def opposite_Signs(x,y):
return ((x ^ y) < 0); | transformation_lesser_greater_variable | def opposite_Signs(x,y):
return ((x ^ y) > 0); | 0 | 57 | mbpp |
def opposite_Signs(x,y):
return ((x ^ y) < 0); | 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 | 57 | mbpp |
def opposite_Signs(x,y):
return ((x ^ y) < 0); | transformation_dissimilar_code_injection_1 | def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | 0 | 57 | mbpp |
def opposite_Signs(x,y):
return ((x ^ y) < 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 | 57 | mbpp |
def opposite_Signs(x,y):
return ((x ^ y) < 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 | 57 | mbpp |
def opposite_Signs(x,y):
return ((x ^ y) < 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 | 57 | mbpp |
def is_octagonal(n):
return 3 * n * n - 2 * n | transformation_dead_code_insert | def is_octagonal(n):
_i_2 = 0
while _i_2 > _i_2:
return 3 * n * n - 2 * n
return 3 * n * n - 2 * n | 1 | 58 | mbpp |
def is_octagonal(n):
return 3 * n * n - 2 * n | transformation_sub_add_variable | def is_octagonal(n):
return 3 * n * n + 2 * n | 0 | 58 | mbpp |
def is_octagonal(n):
return 3 * n * n - 2 * n | transformation_mul_div_variable | def is_octagonal(n):
return 3 / n * n - 2 * n | 0 | 58 | mbpp |
def is_octagonal(n):
return 3 * n * n - 2 * 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 | 58 | mbpp |
def is_octagonal(n):
return 3 * n * n - 2 * n | transformation_dissimilar_code_injection_1 | def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | 0 | 58 | mbpp |
def is_octagonal(n):
return 3 * n * n - 2 * 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 | 58 | mbpp |
def is_octagonal(n):
return 3 * n * n - 2 * 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 | 58 | mbpp |
def is_octagonal(n):
return 3 * n * n - 2 * 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 | 58 | mbpp |
def max_difference(test_list):
temp = [abs(b - a) for a, b in test_list]
res = max(temp)
return (res) | transformation_dead_code_insert | def max_difference(test_list):
temp = [abs(b - a) for a, b in test_list]
_i_7 = 0
if _i_7 > _i_7:
temp = [abs(b - a) for a, b in test_list]
res = max(temp)
return res | 1 | 62 | mbpp |
def max_difference(test_list):
temp = [abs(b - a) for a, b in test_list]
res = max(temp)
return (res) | transformation_for_while_loop | def max_difference(test_list):
temp = [abs(b - a) for a, b in test_list]
res = max(temp)
return res | 1 | 62 | mbpp |
def max_difference(test_list):
temp = [abs(b - a) for a, b in test_list]
res = max(temp)
return (res) | transformation_operand_swap | def max_difference(test_list):
temp = [abs(b - a) for a, b in test_list]
res = max(temp)
return res | 1 | 62 | mbpp |
def max_difference(test_list):
temp = [abs(b - a) for a, b in test_list]
res = max(temp)
return (res) | transformation_rename_variable_cb | def max_difference(test_list):
temp = [abs(b - a2) for a2, b in test_list]
res = max(temp)
return res | 1 | 62 | mbpp |
def max_difference(test_list):
temp = [abs(b - a) for a, b in test_list]
res = max(temp)
return (res) | transformation_rename_variable_naive | def max_difference(test_list):
VAR_0 = [abs(b - a) for a, b in test_list]
res = max(VAR_0)
return res | 1 | 62 | mbpp |
def max_difference(test_list):
temp = [abs(b - a) for a, b in test_list]
res = max(temp)
return (res) | transformation_rename_variable_rn | def max_difference(b4Ixw475g):
temp = [abs(b - a) for a, b in b4Ixw475g]
res = max(temp)
return res | 1 | 62 | mbpp |
def max_difference(test_list):
temp = [abs(b - a) for a, b in test_list]
res = max(temp)
return (res) | transformation_sub_add_variable | def max_difference(test_list):
temp = [abs(b + a) for a, b in test_list]
res = max(temp)
return (res) | 0 | 62 | mbpp |
def max_difference(test_list):
temp = [abs(b - a) for a, b in test_list]
res = max(temp)
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 | 62 | mbpp |
def max_difference(test_list):
temp = [abs(b - a) for a, b in test_list]
res = max(temp)
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 | 62 | mbpp |
def max_difference(test_list):
temp = [abs(b - a) for a, b in test_list]
res = max(temp)
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 | 62 | mbpp |
def max_difference(test_list):
temp = [abs(b - a) for a, b in test_list]
res = max(temp)
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 | 62 | mbpp |
def max_difference(test_list):
temp = [abs(b - a) for a, b in test_list]
res = max(temp)
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 | 62 | mbpp |
def pos_count(list):
pos_count= 0
for num in list:
if num >= 0:
pos_count += 1
return pos_count | transformation_dead_code_insert | def pos_count(list):
_i_4 = 0
if _i_4 > _i_4:
if num >= 0:
pos_count += 1
pos_count = 0
for num in list:
if num >= 0:
pos_count += 1
return pos_count | 1 | 64 | mbpp |
def pos_count(list):
pos_count= 0
for num in list:
if num >= 0:
pos_count += 1
return pos_count | transformation_for_while_loop | def pos_count(list):
pos_count = 0
_num_i = 0
while _num_i < len(list):
num = list[_num_i]
if num >= 0:
pos_count += 1
_num_i += 1
return pos_count | 1 | 64 | mbpp |
def pos_count(list):
pos_count= 0
for num in list:
if num >= 0:
pos_count += 1
return pos_count | transformation_operand_swap | def pos_count(list):
pos_count = 0
for num in list:
if 0 <= num:
pos_count += 1
return pos_count | 1 | 64 | mbpp |
def pos_count(list):
pos_count= 0
for num in list:
if num >= 0:
pos_count += 1
return pos_count | transformation_rename_variable_cb | def pos_count(list):
pos_count = 0
for line in list:
if line >= 0:
pos_count += 1
return pos_count | 1 | 64 | mbpp |
def pos_count(list):
pos_count= 0
for num in list:
if num >= 0:
pos_count += 1
return pos_count | transformation_rename_variable_naive | def pos_count(list):
pos_count = 0
for VAR_0 in list:
if VAR_0 >= 0:
pos_count += 1
return pos_count | 1 | 64 | mbpp |
def pos_count(list):
pos_count= 0
for num in list:
if num >= 0:
pos_count += 1
return pos_count | transformation_rename_variable_rn | def pos_count(list):
pos_count = 0
for dA0 in list:
if dA0 >= 0:
pos_count += 1
return pos_count | 1 | 64 | mbpp |
def pos_count(list):
pos_count= 0
for num in list:
if num >= 0:
pos_count += 1
return pos_count | transformation_add_sub_variable | def pos_count(list):
pos_count= 0
for num in list:
if num >= 0:
pos_count -= 1
return pos_count | 0 | 64 | mbpp |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.