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_Missing_Positive(arr,n):
ptr = 0
for i in range(n):
if arr[i] == 1:
ptr = 1
break
if ptr == 0:
return(1)
for i in range(n):
if arr[i] <= 0 or arr[i] > n:
arr[i] = 1
for i in range(n):
arr[(arr[i] - 1) % n] += n
for i in range(n):
if arr[i] <= n:
return(i + 1)
return(n + 1) | transformation_equalto_exclamation_variable | def first_Missing_Positive(arr,n):
ptr = 0
for i in range(n):
if arr[i] != 1:
ptr = 1
break
if ptr == 0:
return(1)
for i in range(n):
if arr[i] <= 0 or arr[i] > n:
arr[i] = 1
for i in range(n):
arr[(arr[i] - 1) % n] += n
for i in range(n):
if arr[i] <= n:
return(i + 1)
return(n + 1) | 0 | 186 | mbpp |
def first_Missing_Positive(arr,n):
ptr = 0
for i in range(n):
if arr[i] == 1:
ptr = 1
break
if ptr == 0:
return(1)
for i in range(n):
if arr[i] <= 0 or arr[i] > n:
arr[i] = 1
for i in range(n):
arr[(arr[i] - 1) % n] += n
for i in range(n):
if arr[i] <= n:
return(i + 1)
return(n + 1) | transformation_or_and_variable | def first_Missing_Positive(arr,n):
ptr = 0
for i in range(n):
if arr[i] == 1:
ptr = 1
break
if ptr == 0:
return(1)
for i in range(n):
if arr[i] <= 0 and arr[i] > n:
arr[i] = 1
for i in range(n):
arr[(arr[i] - 1) % n] += n
for i in range(n):
if arr[i] <= n:
return(i + 1)
return(n + 1) | 0 | 186 | mbpp |
def first_Missing_Positive(arr,n):
ptr = 0
for i in range(n):
if arr[i] == 1:
ptr = 1
break
if ptr == 0:
return(1)
for i in range(n):
if arr[i] <= 0 or arr[i] > n:
arr[i] = 1
for i in range(n):
arr[(arr[i] - 1) % n] += n
for i in range(n):
if arr[i] <= n:
return(i + 1)
return(n + 1) | transformation_dissimilar_code_injection_0 | def min_cost(cost, m, n):
R = 3
C = 3
tc = [[0 for x in range(C)] for x in range(R)]
tc[0][0] = cost[0][0]
for i in range(1, m+1):
tc[i][0] = tc[i-1][0] + cost[i][0]
for j in range(1, n+1):
tc[0][j] = tc[0][j-1] + cost[0][j]
for i in range(1, m+1):
for j in range(1, n+1):
tc[i][j] = min(tc[i-1][j-1], tc[i-1][j], tc[i][j-1]) + cost[i][j]
return tc[m][n] | 0 | 186 | mbpp |
def first_Missing_Positive(arr,n):
ptr = 0
for i in range(n):
if arr[i] == 1:
ptr = 1
break
if ptr == 0:
return(1)
for i in range(n):
if arr[i] <= 0 or arr[i] > n:
arr[i] = 1
for i in range(n):
arr[(arr[i] - 1) % n] += n
for i in range(n):
if arr[i] <= n:
return(i + 1)
return(n + 1) | transformation_dissimilar_code_injection_1 | def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | 0 | 186 | mbpp |
def first_Missing_Positive(arr,n):
ptr = 0
for i in range(n):
if arr[i] == 1:
ptr = 1
break
if ptr == 0:
return(1)
for i in range(n):
if arr[i] <= 0 or arr[i] > n:
arr[i] = 1
for i in range(n):
arr[(arr[i] - 1) % n] += n
for i in range(n):
if arr[i] <= n:
return(i + 1)
return(n + 1) | transformation_dissimilar_code_injection_2 | def is_not_prime(n):
import math
result = False
for i in range(2,int(math.sqrt(n)) + 1):
if n % i == 0:
result = True
return result | 0 | 186 | mbpp |
def first_Missing_Positive(arr,n):
ptr = 0
for i in range(n):
if arr[i] == 1:
ptr = 1
break
if ptr == 0:
return(1)
for i in range(n):
if arr[i] <= 0 or arr[i] > n:
arr[i] = 1
for i in range(n):
arr[(arr[i] - 1) % n] += n
for i in range(n):
if arr[i] <= n:
return(i + 1)
return(n + 1) | transformation_dissimilar_code_injection_3 | def heap_queue_largest(nums,n):
import heapq as hq
largest_nums = hq.nlargest(n, nums)
return largest_nums | 0 | 186 | mbpp |
def first_Missing_Positive(arr,n):
ptr = 0
for i in range(n):
if arr[i] == 1:
ptr = 1
break
if ptr == 0:
return(1)
for i in range(n):
if arr[i] <= 0 or arr[i] > n:
arr[i] = 1
for i in range(n):
arr[(arr[i] - 1) % n] += n
for i in range(n):
if arr[i] <= n:
return(i + 1)
return(n + 1) | transformation_dissimilar_code_injection_4 | def count_ways(n):
A = [0] * (n + 1)
B = [0] * (n + 1)
A[0] = 1
A[1] = 0
B[0] = 0
B[1] = 1
for i in range(2, n+1):
A[i] = A[i - 2] + 2 * B[i - 1]
B[i] = A[i - 1] + B[i - 2]
return A[n] | 0 | 186 | mbpp |
def count_Intgral_Points(x1,y1,x2,y2):
return ((y2 - y1 - 1) * (x2 - x1 - 1)) | transformation_sub_add_variable | def count_Intgral_Points(x1,y1,x2,y2):
return ((y2 + y1 - 1) * (x2 - x1 - 1)) | 0 | 187 | mbpp |
def count_Intgral_Points(x1,y1,x2,y2):
return ((y2 - y1 - 1) * (x2 - x1 - 1)) | transformation_mul_div_variable | def count_Intgral_Points(x1,y1,x2,y2):
return ((y2 - y1 - 1) / (x2 - x1 - 1)) | 0 | 187 | mbpp |
def count_Intgral_Points(x1,y1,x2,y2):
return ((y2 - y1 - 1) * (x2 - x1 - 1)) | transformation_dissimilar_code_injection_0 | def min_cost(cost, m, n):
R = 3
C = 3
tc = [[0 for x in range(C)] for x in range(R)]
tc[0][0] = cost[0][0]
for i in range(1, m+1):
tc[i][0] = tc[i-1][0] + cost[i][0]
for j in range(1, n+1):
tc[0][j] = tc[0][j-1] + cost[0][j]
for i in range(1, m+1):
for j in range(1, n+1):
tc[i][j] = min(tc[i-1][j-1], tc[i-1][j], tc[i][j-1]) + cost[i][j]
return tc[m][n] | 0 | 187 | mbpp |
def count_Intgral_Points(x1,y1,x2,y2):
return ((y2 - y1 - 1) * (x2 - x1 - 1)) | transformation_dissimilar_code_injection_1 | def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | 0 | 187 | mbpp |
def count_Intgral_Points(x1,y1,x2,y2):
return ((y2 - y1 - 1) * (x2 - x1 - 1)) | transformation_dissimilar_code_injection_2 | def is_not_prime(n):
import math
result = False
for i in range(2,int(math.sqrt(n)) + 1):
if n % i == 0:
result = True
return result | 0 | 187 | mbpp |
def count_Intgral_Points(x1,y1,x2,y2):
return ((y2 - y1 - 1) * (x2 - x1 - 1)) | transformation_dissimilar_code_injection_3 | def heap_queue_largest(nums,n):
import heapq as hq
largest_nums = hq.nlargest(n, nums)
return largest_nums | 0 | 187 | mbpp |
def count_Intgral_Points(x1,y1,x2,y2):
return ((y2 - y1 - 1) * (x2 - x1 - 1)) | transformation_dissimilar_code_injection_4 | def count_ways(n):
A = [0] * (n + 1)
B = [0] * (n + 1)
A[0] = 1
A[1] = 0
B[0] = 0
B[1] = 1
for i in range(2, n+1):
A[i] = A[i - 2] + 2 * B[i - 1]
B[i] = A[i - 1] + B[i - 2]
return A[n] | 0 | 187 | mbpp |
def check_monthnumber(monthname3):
if monthname3 =="April" or monthname3== "June" or monthname3== "September" or monthname3== "November":
return True
else:
return False | transformation_dead_code_insert | def check_monthnumber(monthname3):
if (
monthname3 == "April"
or monthname3 == "June"
or monthname3 == "September"
or monthname3 == "November"
):
for _i_6 in range(0):
return True
return True
else:
return False | 1 | 188 | mbpp |
def check_monthnumber(monthname3):
if monthname3 =="April" or monthname3== "June" or monthname3== "September" or monthname3== "November":
return True
else:
return False | transformation_for_while_loop | def check_monthnumber(monthname3):
if (
monthname3 == "April"
or monthname3 == "June"
or monthname3 == "September"
or monthname3 == "November"
):
return True
else:
return False | 1 | 188 | mbpp |
def check_monthnumber(monthname3):
if monthname3 =="April" or monthname3== "June" or monthname3== "September" or monthname3== "November":
return True
else:
return False | transformation_operand_swap | def check_monthnumber(monthname3):
if (
monthname3 == "April"
or monthname3 == "June"
or monthname3 == "September"
or "November" == monthname3
):
return True
else:
return False | 1 | 188 | mbpp |
def check_monthnumber(monthname3):
if monthname3 =="April" or monthname3== "June" or monthname3== "September" or monthname3== "November":
return True
else:
return False | transformation_rename_variable_cb | def check_monthnumber(month):
if (
month == "April"
or month == "June"
or month == "September"
or month == "November"
):
return True
else:
return False | 1 | 188 | mbpp |
def check_monthnumber(monthname3):
if monthname3 =="April" or monthname3== "June" or monthname3== "September" or monthname3== "November":
return True
else:
return False | transformation_rename_variable_naive | def check_monthnumber(VAR_0):
if (
VAR_0 == "April"
or VAR_0 == "June"
or VAR_0 == "September"
or VAR_0 == "November"
):
return True
else:
return False | 1 | 188 | mbpp |
def check_monthnumber(monthname3):
if monthname3 =="April" or monthname3== "June" or monthname3== "September" or monthname3== "November":
return True
else:
return False | transformation_rename_variable_rn | def check_monthnumber(v1fiU87Nw9):
if (
v1fiU87Nw9 == "April"
or v1fiU87Nw9 == "June"
or v1fiU87Nw9 == "September"
or v1fiU87Nw9 == "November"
):
return True
else:
return False | 1 | 188 | mbpp |
def check_monthnumber(monthname3):
if monthname3 =="April" or monthname3== "June" or monthname3== "September" or monthname3== "November":
return True
else:
return False | transformation_equalto_exclamation_variable | def check_monthnumber(monthname3):
if monthname3 !="April" or monthname3== "June" or monthname3== "September" or monthname3== "November":
return True
else:
return False | 0 | 188 | mbpp |
def check_monthnumber(monthname3):
if monthname3 =="April" or monthname3== "June" or monthname3== "September" or monthname3== "November":
return True
else:
return False | transformation_true_false_variable | def check_monthnumber(monthname3):
if monthname3 =="April" or monthname3== "June" or monthname3== "September" or monthname3== "November":
return False
else:
return False | 0 | 188 | mbpp |
def check_monthnumber(monthname3):
if monthname3 =="April" or monthname3== "June" or monthname3== "September" or monthname3== "November":
return True
else:
return False | transformation_false_true_variable | def check_monthnumber(monthname3):
if monthname3 =="April" or monthname3== "June" or monthname3== "September" or monthname3== "November":
return True
else:
return True | 0 | 188 | mbpp |
def check_monthnumber(monthname3):
if monthname3 =="April" or monthname3== "June" or monthname3== "September" or monthname3== "November":
return True
else:
return False | transformation_or_and_variable | def check_monthnumber(monthname3):
if monthname3 =="April" and monthname3== "June" or monthname3== "September" or monthname3== "November":
return True
else:
return False | 0 | 188 | mbpp |
def check_monthnumber(monthname3):
if monthname3 =="April" or monthname3== "June" or monthname3== "September" or monthname3== "November":
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 | 188 | mbpp |
def check_monthnumber(monthname3):
if monthname3 =="April" or monthname3== "June" or monthname3== "September" or monthname3== "November":
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 | 188 | mbpp |
def check_monthnumber(monthname3):
if monthname3 =="April" or monthname3== "June" or monthname3== "September" or monthname3== "November":
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 | 188 | mbpp |
def check_monthnumber(monthname3):
if monthname3 =="April" or monthname3== "June" or monthname3== "September" or monthname3== "November":
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 | 188 | mbpp |
def check_monthnumber(monthname3):
if monthname3 =="April" or monthname3== "June" or monthname3== "September" or monthname3== "November":
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 | 188 | mbpp |
def check_String(str):
flag_l = False
flag_n = False
for i in str:
if i.isalpha():
flag_l = True
if i.isdigit():
flag_n = True
return flag_l and flag_n | transformation_dead_code_insert | def check_String(str):
_i_3 = 0
if _i_3 < _i_3:
if i.isdigit():
flag_n = True
flag_l = False
flag_n = False
for i in str:
if i.isalpha():
flag_l = True
if i.isdigit():
flag_n = True
return flag_l and flag_n | 1 | 189 | mbpp |
def check_String(str):
flag_l = False
flag_n = False
for i in str:
if i.isalpha():
flag_l = True
if i.isdigit():
flag_n = True
return flag_l and flag_n | transformation_for_while_loop | def check_String(str):
flag_l = False
flag_n = False
_i_i = 0
while _i_i < len(str):
i = str[_i_i]
if i.isalpha():
flag_l = True
if i.isdigit():
flag_n = True
_i_i += 1
return flag_l and flag_n | 1 | 189 | mbpp |
def check_String(str):
flag_l = False
flag_n = False
for i in str:
if i.isalpha():
flag_l = True
if i.isdigit():
flag_n = True
return flag_l and flag_n | transformation_operand_swap | def check_String(str):
flag_l = False
flag_n = False
for i in str:
if i.isalpha():
flag_l = True
if i.isdigit():
flag_n = True
return flag_l and flag_n | 1 | 189 | mbpp |
def check_String(str):
flag_l = False
flag_n = False
for i in str:
if i.isalpha():
flag_l = True
if i.isdigit():
flag_n = True
return flag_l and flag_n | transformation_rename_variable_cb | def check_String(str):
flag_l = False
flag_n = False
for a in str:
if a.isalpha():
flag_l = True
if a.isdigit():
flag_n = True
return flag_l and flag_n | 1 | 189 | mbpp |
def check_String(str):
flag_l = False
flag_n = False
for i in str:
if i.isalpha():
flag_l = True
if i.isdigit():
flag_n = True
return flag_l and flag_n | transformation_rename_variable_naive | def check_String(str):
flag_l = False
VAR_0 = False
for i in str:
if i.isalpha():
flag_l = True
if i.isdigit():
VAR_0 = True
return flag_l and VAR_0 | 1 | 189 | mbpp |
def check_String(str):
flag_l = False
flag_n = False
for i in str:
if i.isalpha():
flag_l = True
if i.isdigit():
flag_n = True
return flag_l and flag_n | transformation_rename_variable_rn | def check_String(str):
flag_l = False
flag_n = False
for C in str:
if C.isalpha():
flag_l = True
if C.isdigit():
flag_n = True
return flag_l and flag_n | 1 | 189 | mbpp |
def check_String(str):
flag_l = False
flag_n = False
for i in str:
if i.isalpha():
flag_l = True
if i.isdigit():
flag_n = True
return flag_l and flag_n | transformation_true_false_variable | def check_String(str):
flag_l = False
flag_n = False
for i in str:
if i.isalpha():
flag_l = False
if i.isdigit():
flag_n = True
return flag_l and flag_n | 0 | 189 | mbpp |
def check_String(str):
flag_l = False
flag_n = False
for i in str:
if i.isalpha():
flag_l = True
if i.isdigit():
flag_n = True
return flag_l and flag_n | transformation_false_true_variable | def check_String(str):
flag_l = True
flag_n = False
for i in str:
if i.isalpha():
flag_l = True
if i.isdigit():
flag_n = True
return flag_l and flag_n | 0 | 189 | mbpp |
def check_String(str):
flag_l = False
flag_n = False
for i in str:
if i.isalpha():
flag_l = True
if i.isdigit():
flag_n = True
return flag_l and flag_n | transformation_and_or_variable | def check_String(str):
flag_l = False
flag_n = False
for i in str:
if i.isalpha():
flag_l = True
if i.isdigit():
flag_n = True
return flag_l or flag_n | 0 | 189 | mbpp |
def check_String(str):
flag_l = False
flag_n = False
for i in str:
if i.isalpha():
flag_l = True
if i.isdigit():
flag_n = True
return flag_l and flag_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 | 189 | mbpp |
def check_String(str):
flag_l = False
flag_n = False
for i in str:
if i.isalpha():
flag_l = True
if i.isdigit():
flag_n = True
return flag_l and flag_n | transformation_dissimilar_code_injection_1 | def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | 0 | 189 | mbpp |
def check_String(str):
flag_l = False
flag_n = False
for i in str:
if i.isalpha():
flag_l = True
if i.isdigit():
flag_n = True
return flag_l and flag_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 | 189 | mbpp |
def check_String(str):
flag_l = False
flag_n = False
for i in str:
if i.isalpha():
flag_l = True
if i.isdigit():
flag_n = True
return flag_l and flag_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 | 189 | mbpp |
def check_String(str):
flag_l = False
flag_n = False
for i in str:
if i.isalpha():
flag_l = True
if i.isdigit():
flag_n = True
return flag_l and flag_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 | 189 | mbpp |
def remove_tuple(test_tup):
res = tuple(set(test_tup))
return (res) | transformation_dead_code_insert | def remove_tuple(test_tup):
_i_3 = 0
if _i_3 > _i_3:
res = tuple(set(test_tup))
res = tuple(set(test_tup))
return res | 1 | 190 | mbpp |
def remove_tuple(test_tup):
res = tuple(set(test_tup))
return (res) | transformation_for_while_loop | def remove_tuple(test_tup):
res = tuple(set(test_tup))
return res | 1 | 190 | mbpp |
def remove_tuple(test_tup):
res = tuple(set(test_tup))
return (res) | transformation_operand_swap | def remove_tuple(test_tup):
res = tuple(set(test_tup))
return res | 1 | 190 | mbpp |
def remove_tuple(test_tup):
res = tuple(set(test_tup))
return (res) | transformation_rename_variable_cb | def remove_tuple(lines):
res = tuple(set(lines))
return res | 1 | 190 | mbpp |
def remove_tuple(test_tup):
res = tuple(set(test_tup))
return (res) | transformation_rename_variable_naive | def remove_tuple(VAR_0):
res = tuple(set(VAR_0))
return res | 1 | 190 | mbpp |
def remove_tuple(test_tup):
res = tuple(set(test_tup))
return (res) | transformation_rename_variable_rn | def remove_tuple(ecZ26sn3):
res = tuple(set(ecZ26sn3))
return res | 1 | 190 | mbpp |
def remove_tuple(test_tup):
res = tuple(set(test_tup))
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 | 190 | mbpp |
def remove_tuple(test_tup):
res = tuple(set(test_tup))
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 | 190 | mbpp |
def remove_tuple(test_tup):
res = tuple(set(test_tup))
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 | 190 | mbpp |
def remove_tuple(test_tup):
res = tuple(set(test_tup))
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 | 190 | mbpp |
def remove_tuple(test_tup):
res = tuple(set(test_tup))
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 | 190 | mbpp |
def octal_To_Decimal(n):
num = n;
dec_value = 0;
base = 1;
temp = num;
while (temp):
last_digit = temp % 10;
temp = int(temp / 10);
dec_value += last_digit*base;
base = base * 8;
return dec_value; | transformation_dead_code_insert | def octal_To_Decimal(n):
num = n
dec_value = 0
base = 1
temp = num
for _i_2 in range(0):
temp = int(temp / 10)
while temp:
last_digit = temp % 10
temp = int(temp / 10)
dec_value += last_digit * base
base = base * 8
return dec_value | 1 | 191 | mbpp |
def octal_To_Decimal(n):
num = n;
dec_value = 0;
base = 1;
temp = num;
while (temp):
last_digit = temp % 10;
temp = int(temp / 10);
dec_value += last_digit*base;
base = base * 8;
return dec_value; | transformation_for_while_loop | def octal_To_Decimal(n):
num = n
dec_value = 0
base = 1
temp = num
while temp:
last_digit = temp % 10
temp = int(temp / 10)
dec_value += last_digit * base
base = base * 8
return dec_value | 1 | 191 | mbpp |
def octal_To_Decimal(n):
num = n;
dec_value = 0;
base = 1;
temp = num;
while (temp):
last_digit = temp % 10;
temp = int(temp / 10);
dec_value += last_digit*base;
base = base * 8;
return dec_value; | transformation_operand_swap | def octal_To_Decimal(n):
num = n
dec_value = 0
base = 1
temp = num
while temp:
last_digit = temp % 10
temp = int(temp / 10)
dec_value += last_digit * base
base = base * 8
return dec_value | 1 | 191 | mbpp |
def octal_To_Decimal(n):
num = n;
dec_value = 0;
base = 1;
temp = num;
while (temp):
last_digit = temp % 10;
temp = int(temp / 10);
dec_value += last_digit*base;
base = base * 8;
return dec_value; | transformation_rename_variable_cb | def octal_To_Decimal(n):
num = n
dec_value = 0
base = 1
d = num
while d:
last_digit = d % 10
d = int(d / 10)
dec_value += last_digit * base
base = base * 8
return dec_value | 1 | 191 | mbpp |
def octal_To_Decimal(n):
num = n;
dec_value = 0;
base = 1;
temp = num;
while (temp):
last_digit = temp % 10;
temp = int(temp / 10);
dec_value += last_digit*base;
base = base * 8;
return dec_value; | transformation_rename_variable_naive | def octal_To_Decimal(n):
num = n
dec_value = 0
base = 1
VAR_0 = num
while VAR_0:
last_digit = VAR_0 % 10
VAR_0 = int(VAR_0 / 10)
dec_value += last_digit * base
base = base * 8
return dec_value | 1 | 191 | mbpp |
def octal_To_Decimal(n):
num = n;
dec_value = 0;
base = 1;
temp = num;
while (temp):
last_digit = temp % 10;
temp = int(temp / 10);
dec_value += last_digit*base;
base = base * 8;
return dec_value; | transformation_rename_variable_rn | def octal_To_Decimal(n):
num = n
dec_value = 0
base = 1
y9dc = num
while y9dc:
last_digit = y9dc % 10
y9dc = int(y9dc / 10)
dec_value += last_digit * base
base = base * 8
return dec_value | 1 | 191 | mbpp |
def octal_To_Decimal(n):
num = n;
dec_value = 0;
base = 1;
temp = num;
while (temp):
last_digit = temp % 10;
temp = int(temp / 10);
dec_value += last_digit*base;
base = base * 8;
return dec_value; | transformation_add_sub_variable | def octal_To_Decimal(n):
num = n;
dec_value = 0;
base = 1;
temp = num;
while (temp):
last_digit = temp % 10;
temp = int(temp / 10);
dec_value -= last_digit*base;
base = base * 8;
return dec_value; | 0 | 191 | mbpp |
def octal_To_Decimal(n):
num = n;
dec_value = 0;
base = 1;
temp = num;
while (temp):
last_digit = temp % 10;
temp = int(temp / 10);
dec_value += last_digit*base;
base = base * 8;
return dec_value; | transformation_mul_div_variable | def octal_To_Decimal(n):
num = n;
dec_value = 0;
base = 1;
temp = num;
while (temp):
last_digit = temp % 10;
temp = int(temp / 10);
dec_value += last_digit/base;
base = base * 8;
return dec_value; | 0 | 191 | mbpp |
def octal_To_Decimal(n):
num = n;
dec_value = 0;
base = 1;
temp = num;
while (temp):
last_digit = temp % 10;
temp = int(temp / 10);
dec_value += last_digit*base;
base = base * 8;
return dec_value; | transformation_div_mul_variable | def octal_To_Decimal(n):
num = n;
dec_value = 0;
base = 1;
temp = num;
while (temp):
last_digit = temp % 10;
temp = int(temp * 10);
dec_value += last_digit*base;
base = base * 8;
return dec_value; | 0 | 191 | mbpp |
def octal_To_Decimal(n):
num = n;
dec_value = 0;
base = 1;
temp = num;
while (temp):
last_digit = temp % 10;
temp = int(temp / 10);
dec_value += last_digit*base;
base = base * 8;
return dec_value; | 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 | 191 | mbpp |
def octal_To_Decimal(n):
num = n;
dec_value = 0;
base = 1;
temp = num;
while (temp):
last_digit = temp % 10;
temp = int(temp / 10);
dec_value += last_digit*base;
base = base * 8;
return dec_value; | transformation_dissimilar_code_injection_1 | def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | 0 | 191 | mbpp |
def octal_To_Decimal(n):
num = n;
dec_value = 0;
base = 1;
temp = num;
while (temp):
last_digit = temp % 10;
temp = int(temp / 10);
dec_value += last_digit*base;
base = base * 8;
return dec_value; | 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 | 191 | mbpp |
def octal_To_Decimal(n):
num = n;
dec_value = 0;
base = 1;
temp = num;
while (temp):
last_digit = temp % 10;
temp = int(temp / 10);
dec_value += last_digit*base;
base = base * 8;
return dec_value; | 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 | 191 | mbpp |
def octal_To_Decimal(n):
num = n;
dec_value = 0;
base = 1;
temp = num;
while (temp):
last_digit = temp % 10;
temp = int(temp / 10);
dec_value += last_digit*base;
base = base * 8;
return dec_value; | 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 | 191 | mbpp |
def find_exponentio(test_tup1, test_tup2):
res = tuple(ele1 ** ele2 for ele1, ele2 in zip(test_tup1, test_tup2))
return (res) | transformation_dead_code_insert | def find_exponentio(test_tup1, test_tup2):
for _i_4 in range(0):
return res
res = tuple(ele1 ** ele2 for ele1, ele2 in zip(test_tup1, test_tup2))
return res | 1 | 194 | mbpp |
def find_exponentio(test_tup1, test_tup2):
res = tuple(ele1 ** ele2 for ele1, ele2 in zip(test_tup1, test_tup2))
return (res) | transformation_for_while_loop | def find_exponentio(test_tup1, test_tup2):
res = tuple(ele1 ** ele2 for ele1, ele2 in zip(test_tup1, test_tup2))
return res | 1 | 194 | mbpp |
def find_exponentio(test_tup1, test_tup2):
res = tuple(ele1 ** ele2 for ele1, ele2 in zip(test_tup1, test_tup2))
return (res) | transformation_operand_swap | def find_exponentio(test_tup1, test_tup2):
res = tuple(ele1 ** ele2 for ele1, ele2 in zip(test_tup1, test_tup2))
return res | 1 | 194 | mbpp |
def find_exponentio(test_tup1, test_tup2):
res = tuple(ele1 ** ele2 for ele1, ele2 in zip(test_tup1, test_tup2))
return (res) | transformation_rename_variable_cb | def find_exponentio(test, test_tup2):
res = tuple(ele1 ** ele2 for ele1, ele2 in zip(test, test_tup2))
return res | 1 | 194 | mbpp |
def find_exponentio(test_tup1, test_tup2):
res = tuple(ele1 ** ele2 for ele1, ele2 in zip(test_tup1, test_tup2))
return (res) | transformation_rename_variable_naive | def find_exponentio(test_tup1, test_tup2):
res = tuple(ele1 ** VAR_0 for ele1, VAR_0 in zip(test_tup1, test_tup2))
return res | 1 | 194 | mbpp |
def find_exponentio(test_tup1, test_tup2):
res = tuple(ele1 ** ele2 for ele1, ele2 in zip(test_tup1, test_tup2))
return (res) | transformation_rename_variable_rn | def find_exponentio(E6js03z45, test_tup2):
res = tuple(ele1 ** ele2 for ele1, ele2 in zip(E6js03z45, test_tup2))
return res | 1 | 194 | mbpp |
def find_exponentio(test_tup1, test_tup2):
res = tuple(ele1 ** ele2 for ele1, ele2 in zip(test_tup1, test_tup2))
return (res) | transformation_mul_div_variable | def find_exponentio(test_tup1, test_tup2):
res = tuple(ele1 /* ele2 for ele1, ele2 in zip(test_tup1, test_tup2))
return (res) | 0 | 194 | mbpp |
def find_exponentio(test_tup1, test_tup2):
res = tuple(ele1 ** ele2 for ele1, ele2 in zip(test_tup1, test_tup2))
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 | 194 | mbpp |
def find_exponentio(test_tup1, test_tup2):
res = tuple(ele1 ** ele2 for ele1, ele2 in zip(test_tup1, test_tup2))
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 | 194 | mbpp |
def find_exponentio(test_tup1, test_tup2):
res = tuple(ele1 ** ele2 for ele1, ele2 in zip(test_tup1, test_tup2))
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 | 194 | mbpp |
def find_exponentio(test_tup1, test_tup2):
res = tuple(ele1 ** ele2 for ele1, ele2 in zip(test_tup1, test_tup2))
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 | 194 | mbpp |
def find_exponentio(test_tup1, test_tup2):
res = tuple(ele1 ** ele2 for ele1, ele2 in zip(test_tup1, test_tup2))
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 | 194 | mbpp |
def largest_triangle(a,b):
import math
if (a < 0 or b < 0):
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b);
return area | transformation_dead_code_insert | def largest_triangle(a, b):
if False:
return -1
import math
if a < 0 or b < 0:
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b)
return area | 1 | 195 | mbpp |
def largest_triangle(a,b):
import math
if (a < 0 or b < 0):
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b);
return area | transformation_for_while_loop | def largest_triangle(a, b):
import math
if a < 0 or b < 0:
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b)
return area | 1 | 195 | mbpp |
def largest_triangle(a,b):
import math
if (a < 0 or b < 0):
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b);
return area | transformation_operand_swap | def largest_triangle(a, b):
import math
if 0 > a or b < 0:
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b)
return area | 1 | 195 | mbpp |
def largest_triangle(a,b):
import math
if (a < 0 or b < 0):
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b);
return area | transformation_rename_variable_cb | def largest_triangle(m, b):
import math
if m < 0 or b < 0:
return -1
area = (3 * math.sqrt(3) * pow(m, 2)) / (4 * b)
return area | 1 | 195 | mbpp |
def largest_triangle(a,b):
import math
if (a < 0 or b < 0):
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b);
return area | transformation_rename_variable_naive | def largest_triangle(a, VAR_0):
import math
if a < 0 or VAR_0 < 0:
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * VAR_0)
return area | 1 | 195 | mbpp |
def largest_triangle(a,b):
import math
if (a < 0 or b < 0):
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b);
return area | transformation_rename_variable_rn | def largest_triangle(i, b):
import math
if i < 0 or b < 0:
return -1
area = (3 * math.sqrt(3) * pow(i, 2)) / (4 * b)
return area | 1 | 195 | mbpp |
def largest_triangle(a,b):
import math
if (a < 0 or b < 0):
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b);
return area | transformation_sub_add_variable | def largest_triangle(a,b):
import math
if (a < 0 or b < 0):
return +1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b);
return area | 0 | 195 | mbpp |
def largest_triangle(a,b):
import math
if (a < 0 or b < 0):
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b);
return area | transformation_mul_div_variable | def largest_triangle(a,b):
import math
if (a < 0 or b < 0):
return -1
area = (3 / math.sqrt(3) * pow(a, 2)) / (4 * b);
return area | 0 | 195 | mbpp |
def largest_triangle(a,b):
import math
if (a < 0 or b < 0):
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b);
return area | transformation_div_mul_variable | def largest_triangle(a,b):
import math
if (a < 0 or b < 0):
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) * (4 * b);
return area | 0 | 195 | mbpp |
def largest_triangle(a,b):
import math
if (a < 0 or b < 0):
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b);
return area | transformation_lesser_greater_variable | def largest_triangle(a,b):
import math
if (a > 0 or b < 0):
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b);
return area | 0 | 195 | mbpp |
def largest_triangle(a,b):
import math
if (a < 0 or b < 0):
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b);
return area | transformation_or_and_variable | def largest_triangle(a,b):
import math
if (a < 0 and b < 0):
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b);
return area | 0 | 195 | mbpp |
def largest_triangle(a,b):
import math
if (a < 0 or b < 0):
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b);
return area | 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 | 195 | mbpp |
def largest_triangle(a,b):
import math
if (a < 0 or b < 0):
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b);
return area | transformation_dissimilar_code_injection_1 | def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | 0 | 195 | mbpp |
def largest_triangle(a,b):
import math
if (a < 0 or b < 0):
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b);
return area | 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 | 195 | mbpp |
def largest_triangle(a,b):
import math
if (a < 0 or b < 0):
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b);
return area | 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 | 195 | mbpp |
def largest_triangle(a,b):
import math
if (a < 0 or b < 0):
return -1
area = (3 * math.sqrt(3) * pow(a, 2)) / (4 * b);
return area | 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 | 195 | mbpp |
def position_max(list1):
max_val = max(list1)
max_result = [i for i, j in enumerate(list1) if j == max_val]
return max_result | transformation_dead_code_insert | def position_max(list1):
max_val = max(list1)
for _i_2 in range(0):
max_result = [i for i, j in enumerate(list1) if j == max_val]
max_result = [i for i, j in enumerate(list1) if j == max_val]
return max_result | 1 | 197 | mbpp |
def position_max(list1):
max_val = max(list1)
max_result = [i for i, j in enumerate(list1) if j == max_val]
return max_result | transformation_for_while_loop | def position_max(list1):
max_val = max(list1)
max_result = [i for i, j in enumerate(list1) if j == max_val]
return max_result | 1 | 197 | mbpp |
def position_max(list1):
max_val = max(list1)
max_result = [i for i, j in enumerate(list1) if j == max_val]
return max_result | transformation_operand_swap | def position_max(list1):
max_val = max(list1)
max_result = [i for i, j in enumerate(list1) if max_val == j]
return max_result | 1 | 197 | mbpp |
def position_max(list1):
max_val = max(list1)
max_result = [i for i, j in enumerate(list1) if j == max_val]
return max_result | transformation_rename_variable_cb | def position_max(positions):
max_val = max(positions)
max_result = [i for i, j in enumerate(positions) if j == max_val]
return max_result | 1 | 197 | mbpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.