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 is_nonagonal(n):
return int(n * (7 * n - 5) / 2)
|
transformation_dissimilar_code_injection_0
|
def min_cost(cost, m, n):
R = 3
C = 3
tc = [[0 for x in range(C)] for x in range(R)]
tc[0][0] = cost[0][0]
for i in range(1, m+1):
tc[i][0] = tc[i-1][0] + cost[i][0]
for j in range(1, n+1):
tc[0][j] = tc[0][j-1] + cost[0][j]
for i in range(1, m+1):
for j in range(1, n+1):
tc[i][j] = min(tc[i-1][j-1], tc[i-1][j], tc[i][j-1]) + cost[i][j]
return tc[m][n]
| 0 | 638 |
mbpp
|
def is_nonagonal(n):
return int(n * (7 * n - 5) / 2)
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 638 |
mbpp
|
def is_nonagonal(n):
return int(n * (7 * n - 5) / 2)
|
transformation_dissimilar_code_injection_2
|
def is_not_prime(n):
import math
result = False
for i in range(2,int(math.sqrt(n)) + 1):
if n % i == 0:
result = True
return result
| 0 | 638 |
mbpp
|
def is_nonagonal(n):
return int(n * (7 * n - 5) / 2)
|
transformation_dissimilar_code_injection_3
|
def heap_queue_largest(nums,n):
import heapq as hq
largest_nums = hq.nlargest(n, nums)
return largest_nums
| 0 | 638 |
mbpp
|
def is_nonagonal(n):
return int(n * (7 * n - 5) / 2)
|
transformation_dissimilar_code_injection_4
|
def count_ways(n):
A = [0] * (n + 1)
B = [0] * (n + 1)
A[0] = 1
A[1] = 0
B[0] = 0
B[1] = 1
for i in range(2, n+1):
A[i] = A[i - 2] + 2 * B[i - 1]
B[i] = A[i - 1] + B[i - 2]
return A[n]
| 0 | 638 |
mbpp
|
def remove_similar_row(test_list):
res = set([tuple(set(sub)) for sub in test_list])
return (res)
|
transformation_dead_code_insert
|
def remove_similar_row(test_list):
_i_2 = 0
while _i_2 > _i_2:
return res
res = set([tuple(set(sub)) for sub in test_list])
return res
| 1 | 639 |
mbpp
|
def remove_similar_row(test_list):
res = set([tuple(set(sub)) for sub in test_list])
return (res)
|
transformation_for_while_loop
|
def remove_similar_row(test_list):
res = set([tuple(set(sub)) for sub in test_list])
return res
| 1 | 639 |
mbpp
|
def remove_similar_row(test_list):
res = set([tuple(set(sub)) for sub in test_list])
return (res)
|
transformation_operand_swap
|
def remove_similar_row(test_list):
res = set([tuple(set(sub)) for sub in test_list])
return res
| 1 | 639 |
mbpp
|
def remove_similar_row(test_list):
res = set([tuple(set(sub)) for sub in test_list])
return (res)
|
transformation_rename_variable_naive
|
def remove_similar_row(VAR_0):
res = set([tuple(set(sub)) for sub in VAR_0])
return res
| 1 | 639 |
mbpp
|
def remove_similar_row(test_list):
res = set([tuple(set(sub)) for sub in test_list])
return (res)
|
transformation_rename_variable_rn
|
def remove_similar_row(test_list):
res = set([tuple(set(XL3)) for XL3 in test_list])
return res
| 1 | 639 |
mbpp
|
def remove_similar_row(test_list):
res = set([tuple(set(sub)) for sub in test_list])
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 | 639 |
mbpp
|
def remove_similar_row(test_list):
res = set([tuple(set(sub)) for sub in test_list])
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 | 639 |
mbpp
|
def remove_similar_row(test_list):
res = set([tuple(set(sub)) for sub in test_list])
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 | 639 |
mbpp
|
def remove_similar_row(test_list):
res = set([tuple(set(sub)) for sub in test_list])
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 | 639 |
mbpp
|
def remove_similar_row(test_list):
res = set([tuple(set(sub)) for sub in test_list])
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 | 639 |
mbpp
|
def text_match_wordz_middle(text):
import re
patterns = '\Bz\B'
if re.search(patterns, text):
return 'Found a match!'
else:
return('Not matched!')
|
transformation_dead_code_insert
|
def text_match_wordz_middle(text):
_i_7 = 0
if _i_7 < _i_7:
return "Found a match!"
import re
patterns = "BzB"
if re.search(patterns, text):
return "Found a match!"
else:
return "Not matched!"
| 1 | 640 |
mbpp
|
def text_match_wordz_middle(text):
import re
patterns = '\Bz\B'
if re.search(patterns, text):
return 'Found a match!'
else:
return('Not matched!')
|
transformation_for_while_loop
|
def text_match_wordz_middle(text):
import re
patterns = "BzB"
if re.search(patterns, text):
return "Found a match!"
else:
return "Not matched!"
| 1 | 640 |
mbpp
|
def text_match_wordz_middle(text):
import re
patterns = '\Bz\B'
if re.search(patterns, text):
return 'Found a match!'
else:
return('Not matched!')
|
transformation_operand_swap
|
def text_match_wordz_middle(text):
import re
patterns = "BzB"
if re.search(patterns, text):
return "Found a match!"
else:
return "Not matched!"
| 1 | 640 |
mbpp
|
def text_match_wordz_middle(text):
import re
patterns = '\Bz\B'
if re.search(patterns, text):
return 'Found a match!'
else:
return('Not matched!')
|
transformation_rename_variable_naive
|
def text_match_wordz_middle(VAR_0):
import re
patterns = "BzB"
if re.search(patterns, VAR_0):
return "Found a match!"
else:
return "Not matched!"
| 1 | 640 |
mbpp
|
def text_match_wordz_middle(text):
import re
patterns = '\Bz\B'
if re.search(patterns, text):
return 'Found a match!'
else:
return('Not matched!')
|
transformation_rename_variable_rn
|
def text_match_wordz_middle(Gf33):
import re
patterns = "BzB"
if re.search(patterns, Gf33):
return "Found a match!"
else:
return "Not matched!"
| 1 | 640 |
mbpp
|
def text_match_wordz_middle(text):
import re
patterns = '\Bz\B'
if re.search(patterns, text):
return 'Found a match!'
else:
return('Not matched!')
|
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 | 640 |
mbpp
|
def text_match_wordz_middle(text):
import re
patterns = '\Bz\B'
if re.search(patterns, text):
return 'Found a match!'
else:
return('Not matched!')
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 640 |
mbpp
|
def text_match_wordz_middle(text):
import re
patterns = '\Bz\B'
if re.search(patterns, text):
return 'Found a match!'
else:
return('Not matched!')
|
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 | 640 |
mbpp
|
def text_match_wordz_middle(text):
import re
patterns = '\Bz\B'
if re.search(patterns, text):
return 'Found a match!'
else:
return('Not matched!')
|
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 | 640 |
mbpp
|
def text_match_wordz_middle(text):
import re
patterns = '\Bz\B'
if re.search(patterns, text):
return 'Found a match!'
else:
return('Not matched!')
|
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 | 640 |
mbpp
|
def reverse_Array_Upto_K(input, k):
return (input[k-1::-1] + input[k:])
|
transformation_add_sub_variable
|
def reverse_Array_Upto_K(input, k):
return (input[k-1::-1] - input[k:])
| 0 | 641 |
mbpp
|
def reverse_Array_Upto_K(input, k):
return (input[k-1::-1] + input[k:])
|
transformation_sub_add_variable
|
def reverse_Array_Upto_K(input, k):
return (input[k+1::-1] + input[k:])
| 0 | 641 |
mbpp
|
def reverse_Array_Upto_K(input, k):
return (input[k-1::-1] + input[k:])
|
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 | 641 |
mbpp
|
def reverse_Array_Upto_K(input, k):
return (input[k-1::-1] + input[k:])
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 641 |
mbpp
|
def reverse_Array_Upto_K(input, k):
return (input[k-1::-1] + input[k:])
|
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 | 641 |
mbpp
|
def reverse_Array_Upto_K(input, k):
return (input[k-1::-1] + input[k:])
|
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 | 641 |
mbpp
|
def reverse_Array_Upto_K(input, k):
return (input[k-1::-1] + input[k:])
|
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 | 641 |
mbpp
|
def find_k_product(test_list, K):
def get_product(val) :
res = 1
for ele in val:
res *= ele
return res
res = get_product([sub[K] for sub in test_list])
return (res)
|
transformation_dead_code_insert
|
def find_k_product(test_list, K):
def get_product(val):
_i_4 = 0
while _i_4 > _i_4:
res = get_product([sub[K] for sub in test_list])
res = 1
for ele in val:
res *= ele
return res
res = get_product([sub[K] for sub in test_list])
return res
| 1 | 642 |
mbpp
|
def find_k_product(test_list, K):
def get_product(val) :
res = 1
for ele in val:
res *= ele
return res
res = get_product([sub[K] for sub in test_list])
return (res)
|
transformation_for_while_loop
|
def find_k_product(test_list, K):
def get_product(val):
res = 1
_ele_i = 0
while _ele_i < len(val):
ele = val[_ele_i]
res *= ele
_ele_i += 1
return res
res = get_product([sub[K] for sub in test_list])
return res
| 1 | 642 |
mbpp
|
def find_k_product(test_list, K):
def get_product(val) :
res = 1
for ele in val:
res *= ele
return res
res = get_product([sub[K] for sub in test_list])
return (res)
|
transformation_operand_swap
|
def find_k_product(test_list, K):
def get_product(val):
res = 1
for ele in val:
res *= ele
return res
res = get_product([sub[K] for sub in test_list])
return res
| 1 | 642 |
mbpp
|
def find_k_product(test_list, K):
def get_product(val) :
res = 1
for ele in val:
res *= ele
return res
res = get_product([sub[K] for sub in test_list])
return (res)
|
transformation_rename_variable_cb
|
def find_k_product(test_list, K):
def get_product(val):
K2 = 1
for ele in val:
K2 *= ele
return K2
K2 = get_product([sub[K] for sub in test_list])
return K2
| 1 | 642 |
mbpp
|
def find_k_product(test_list, K):
def get_product(val) :
res = 1
for ele in val:
res *= ele
return res
res = get_product([sub[K] for sub in test_list])
return (res)
|
transformation_rename_variable_naive
|
def find_k_product(test_list, K):
def get_product(val):
VAR_0 = 1
for ele in val:
VAR_0 *= ele
return VAR_0
VAR_0 = get_product([sub[K] for sub in test_list])
return VAR_0
| 1 | 642 |
mbpp
|
def find_k_product(test_list, K):
def get_product(val) :
res = 1
for ele in val:
res *= ele
return res
res = get_product([sub[K] for sub in test_list])
return (res)
|
transformation_rename_variable_rn
|
def find_k_product(test_list, K):
def get_product(val):
T3r = 1
for ele in val:
T3r *= ele
return T3r
T3r = get_product([sub[K] for sub in test_list])
return T3r
| 1 | 642 |
mbpp
|
def find_k_product(test_list, K):
def get_product(val) :
res = 1
for ele in val:
res *= ele
return res
res = get_product([sub[K] for sub in test_list])
return (res)
|
transformation_mul_div_variable
|
def find_k_product(test_list, K):
def get_product(val) :
res = 1
for ele in val:
res /= ele
return res
res = get_product([sub[K] for sub in test_list])
return (res)
| 0 | 642 |
mbpp
|
def find_k_product(test_list, K):
def get_product(val) :
res = 1
for ele in val:
res *= ele
return res
res = get_product([sub[K] for sub in test_list])
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 | 642 |
mbpp
|
def find_k_product(test_list, K):
def get_product(val) :
res = 1
for ele in val:
res *= ele
return res
res = get_product([sub[K] for sub in test_list])
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 | 642 |
mbpp
|
def find_k_product(test_list, K):
def get_product(val) :
res = 1
for ele in val:
res *= ele
return res
res = get_product([sub[K] for sub in test_list])
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 | 642 |
mbpp
|
def find_k_product(test_list, K):
def get_product(val) :
res = 1
for ele in val:
res *= ele
return res
res = get_product([sub[K] for sub in test_list])
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 | 642 |
mbpp
|
def find_k_product(test_list, K):
def get_product(val) :
res = 1
for ele in val:
res *= ele
return res
res = get_product([sub[K] for sub in test_list])
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 | 642 |
mbpp
|
def exchange_elements(lst):
from itertools import zip_longest, chain, tee
lst1, lst2 = tee(iter(lst), 2)
return list(chain.from_iterable(zip_longest(lst[1::2], lst[::2])))
|
transformation_dead_code_insert
|
def exchange_elements(lst):
from itertools import zip_longest, chain, tee
for _i_7 in range(0):
from itertools import zip_longest, chain, tee
lst1, lst2 = tee(iter(lst), 2)
return list(chain.from_iterable(zip_longest(lst[1::2], lst[::2])))
| 1 | 645 |
mbpp
|
def exchange_elements(lst):
from itertools import zip_longest, chain, tee
lst1, lst2 = tee(iter(lst), 2)
return list(chain.from_iterable(zip_longest(lst[1::2], lst[::2])))
|
transformation_for_while_loop
|
def exchange_elements(lst):
from itertools import zip_longest, chain, tee
lst1, lst2 = tee(iter(lst), 2)
return list(chain.from_iterable(zip_longest(lst[1::2], lst[::2])))
| 1 | 645 |
mbpp
|
def exchange_elements(lst):
from itertools import zip_longest, chain, tee
lst1, lst2 = tee(iter(lst), 2)
return list(chain.from_iterable(zip_longest(lst[1::2], lst[::2])))
|
transformation_operand_swap
|
def exchange_elements(lst):
from itertools import zip_longest, chain, tee
lst1, lst2 = tee(iter(lst), 2)
return list(chain.from_iterable(zip_longest(lst[1::2], lst[::2])))
| 1 | 645 |
mbpp
|
def exchange_elements(lst):
from itertools import zip_longest, chain, tee
lst1, lst2 = tee(iter(lst), 2)
return list(chain.from_iterable(zip_longest(lst[1::2], lst[::2])))
|
transformation_rename_variable_cb
|
def exchange_elements(e):
from itertools import zip_longest, chain, tee
lst1, lst2 = tee(iter(e), 2)
return list(chain.from_iterable(zip_longest(e[1::2], e[::2])))
| 1 | 645 |
mbpp
|
def exchange_elements(lst):
from itertools import zip_longest, chain, tee
lst1, lst2 = tee(iter(lst), 2)
return list(chain.from_iterable(zip_longest(lst[1::2], lst[::2])))
|
transformation_rename_variable_naive
|
def exchange_elements(VAR_0):
from itertools import zip_longest, chain, tee
lst1, lst2 = tee(iter(VAR_0), 2)
return list(chain.from_iterable(zip_longest(VAR_0[1::2], VAR_0[::2])))
| 1 | 645 |
mbpp
|
def exchange_elements(lst):
from itertools import zip_longest, chain, tee
lst1, lst2 = tee(iter(lst), 2)
return list(chain.from_iterable(zip_longest(lst[1::2], lst[::2])))
|
transformation_rename_variable_rn
|
def exchange_elements(oO5):
from itertools import zip_longest, chain, tee
lst1, lst2 = tee(iter(oO5), 2)
return list(chain.from_iterable(zip_longest(oO5[1::2], oO5[::2])))
| 1 | 645 |
mbpp
|
def exchange_elements(lst):
from itertools import zip_longest, chain, tee
lst1, lst2 = tee(iter(lst), 2)
return list(chain.from_iterable(zip_longest(lst[1::2], lst[::2])))
|
transformation_dissimilar_code_injection_0
|
def min_cost(cost, m, n):
R = 3
C = 3
tc = [[0 for x in range(C)] for x in range(R)]
tc[0][0] = cost[0][0]
for i in range(1, m+1):
tc[i][0] = tc[i-1][0] + cost[i][0]
for j in range(1, n+1):
tc[0][j] = tc[0][j-1] + cost[0][j]
for i in range(1, m+1):
for j in range(1, n+1):
tc[i][j] = min(tc[i-1][j-1], tc[i-1][j], tc[i][j-1]) + cost[i][j]
return tc[m][n]
| 0 | 645 |
mbpp
|
def exchange_elements(lst):
from itertools import zip_longest, chain, tee
lst1, lst2 = tee(iter(lst), 2)
return list(chain.from_iterable(zip_longest(lst[1::2], lst[::2])))
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 645 |
mbpp
|
def exchange_elements(lst):
from itertools import zip_longest, chain, tee
lst1, lst2 = tee(iter(lst), 2)
return list(chain.from_iterable(zip_longest(lst[1::2], lst[::2])))
|
transformation_dissimilar_code_injection_2
|
def is_not_prime(n):
import math
result = False
for i in range(2,int(math.sqrt(n)) + 1):
if n % i == 0:
result = True
return result
| 0 | 645 |
mbpp
|
def exchange_elements(lst):
from itertools import zip_longest, chain, tee
lst1, lst2 = tee(iter(lst), 2)
return list(chain.from_iterable(zip_longest(lst[1::2], lst[::2])))
|
transformation_dissimilar_code_injection_3
|
def heap_queue_largest(nums,n):
import heapq as hq
largest_nums = hq.nlargest(n, nums)
return largest_nums
| 0 | 645 |
mbpp
|
def exchange_elements(lst):
from itertools import zip_longest, chain, tee
lst1, lst2 = tee(iter(lst), 2)
return list(chain.from_iterable(zip_longest(lst[1::2], lst[::2])))
|
transformation_dissimilar_code_injection_4
|
def count_ways(n):
A = [0] * (n + 1)
B = [0] * (n + 1)
A[0] = 1
A[1] = 0
B[0] = 0
B[1] = 1
for i in range(2, n+1):
A[i] = A[i - 2] + 2 * B[i - 1]
B[i] = A[i - 1] + B[i - 2]
return A[n]
| 0 | 645 |
mbpp
|
def sum_Range_list(nums, m, n):
sum_range = 0
for i in range(m, n+1, 1):
sum_range += nums[i]
return sum_range
|
transformation_dead_code_insert
|
def sum_Range_list(nums, m, n):
sum_range = 0
_i_5 = 0
if _i_5 > _i_5:
sum_range = 0
for i in range(m, n + 1, 1):
sum_range += nums[i]
return sum_range
| 1 | 646 |
mbpp
|
def sum_Range_list(nums, m, n):
sum_range = 0
for i in range(m, n+1, 1):
sum_range += nums[i]
return sum_range
|
transformation_for_while_loop
|
def sum_Range_list(nums, m, n):
sum_range = 0
i = m
while i < n + 1:
sum_range += nums[i]
i += 1
return sum_range
| 1 | 646 |
mbpp
|
def sum_Range_list(nums, m, n):
sum_range = 0
for i in range(m, n+1, 1):
sum_range += nums[i]
return sum_range
|
transformation_operand_swap
|
def sum_Range_list(nums, m, n):
sum_range = 0
for i in range(m, n + 1, 1):
sum_range += nums[i]
return sum_range
| 1 | 646 |
mbpp
|
def sum_Range_list(nums, m, n):
sum_range = 0
for i in range(m, n+1, 1):
sum_range += nums[i]
return sum_range
|
transformation_rename_variable_cb
|
def sum_Range_list(nums, m, n):
ret = 0
for i in range(m, n + 1, 1):
ret += nums[i]
return ret
| 1 | 646 |
mbpp
|
def sum_Range_list(nums, m, n):
sum_range = 0
for i in range(m, n+1, 1):
sum_range += nums[i]
return sum_range
|
transformation_rename_variable_naive
|
def sum_Range_list(nums, m, n):
VAR_0 = 0
for i in range(m, n + 1, 1):
VAR_0 += nums[i]
return VAR_0
| 1 | 646 |
mbpp
|
def sum_Range_list(nums, m, n):
sum_range = 0
for i in range(m, n+1, 1):
sum_range += nums[i]
return sum_range
|
transformation_rename_variable_rn
|
def sum_Range_list(nums, m, n):
gY7ss1202 = 0
for i in range(m, n + 1, 1):
gY7ss1202 += nums[i]
return gY7ss1202
| 1 | 646 |
mbpp
|
def sum_Range_list(nums, m, n):
sum_range = 0
for i in range(m, n+1, 1):
sum_range += nums[i]
return sum_range
|
transformation_add_sub_variable
|
def sum_Range_list(nums, m, n):
sum_range = 0
for i in range(m, n-1, 1):
sum_range += nums[i]
return sum_range
| 0 | 646 |
mbpp
|
def sum_Range_list(nums, m, n):
sum_range = 0
for i in range(m, n+1, 1):
sum_range += nums[i]
return sum_range
|
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 | 646 |
mbpp
|
def sum_Range_list(nums, m, n):
sum_range = 0
for i in range(m, n+1, 1):
sum_range += nums[i]
return sum_range
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 646 |
mbpp
|
def sum_Range_list(nums, m, n):
sum_range = 0
for i in range(m, n+1, 1):
sum_range += nums[i]
return sum_range
|
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 | 646 |
mbpp
|
def sum_Range_list(nums, m, n):
sum_range = 0
for i in range(m, n+1, 1):
sum_range += nums[i]
return sum_range
|
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 | 646 |
mbpp
|
def sum_Range_list(nums, m, n):
sum_range = 0
for i in range(m, n+1, 1):
sum_range += nums[i]
return sum_range
|
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 | 646 |
mbpp
|
def are_Equal(arr1,arr2,n,m):
if (n != m):
return False
arr1.sort()
arr2.sort()
for i in range(0,n - 1):
if (arr1[i] != arr2[i]):
return False
return True
|
transformation_dead_code_insert
|
def are_Equal(arr1, arr2, n, m):
_i_8 = 0
while _i_8 < _i_8:
return False
if n != m:
return False
arr1.sort()
arr2.sort()
for i in range(0, n - 1):
if arr1[i] != arr2[i]:
return False
return True
| 1 | 647 |
mbpp
|
def are_Equal(arr1,arr2,n,m):
if (n != m):
return False
arr1.sort()
arr2.sort()
for i in range(0,n - 1):
if (arr1[i] != arr2[i]):
return False
return True
|
transformation_for_while_loop
|
def are_Equal(arr1, arr2, n, m):
if n != m:
return False
arr1.sort()
arr2.sort()
i = 0
while i < n - 1:
if arr1[i] != arr2[i]:
return False
i += 1
return True
| 1 | 647 |
mbpp
|
def are_Equal(arr1,arr2,n,m):
if (n != m):
return False
arr1.sort()
arr2.sort()
for i in range(0,n - 1):
if (arr1[i] != arr2[i]):
return False
return True
|
transformation_operand_swap
|
def are_Equal(arr1, arr2, n, m):
if m != n:
return False
arr1.sort()
arr2.sort()
for i in range(0, n - 1):
if arr1[i] != arr2[i]:
return False
return True
| 1 | 647 |
mbpp
|
def are_Equal(arr1,arr2,n,m):
if (n != m):
return False
arr1.sort()
arr2.sort()
for i in range(0,n - 1):
if (arr1[i] != arr2[i]):
return False
return True
|
transformation_rename_variable_cb
|
def are_Equal(arr1, arr2, n, m):
if n != m:
return False
arr1.sort()
arr2.sort()
for i2 in range(0, n - 1):
if arr1[i2] != arr2[i2]:
return False
return True
| 1 | 647 |
mbpp
|
def are_Equal(arr1,arr2,n,m):
if (n != m):
return False
arr1.sort()
arr2.sort()
for i in range(0,n - 1):
if (arr1[i] != arr2[i]):
return False
return True
|
transformation_rename_variable_naive
|
def are_Equal(VAR_0, arr2, n, m):
if n != m:
return False
VAR_0.sort()
arr2.sort()
for i in range(0, n - 1):
if VAR_0[i] != arr2[i]:
return False
return True
| 1 | 647 |
mbpp
|
def are_Equal(arr1,arr2,n,m):
if (n != m):
return False
arr1.sort()
arr2.sort()
for i in range(0,n - 1):
if (arr1[i] != arr2[i]):
return False
return True
|
transformation_rename_variable_rn
|
def are_Equal(arr1, arr2, n, m):
if n != m:
return False
arr1.sort()
arr2.sort()
for J in range(0, n - 1):
if arr1[J] != arr2[J]:
return False
return True
| 1 | 647 |
mbpp
|
def are_Equal(arr1,arr2,n,m):
if (n != m):
return False
arr1.sort()
arr2.sort()
for i in range(0,n - 1):
if (arr1[i] != arr2[i]):
return False
return True
|
transformation_sub_add_variable
|
def are_Equal(arr1,arr2,n,m):
if (n != m):
return False
arr1.sort()
arr2.sort()
for i in range(0,n + 1):
if (arr1[i] != arr2[i]):
return False
return True
| 0 | 647 |
mbpp
|
def are_Equal(arr1,arr2,n,m):
if (n != m):
return False
arr1.sort()
arr2.sort()
for i in range(0,n - 1):
if (arr1[i] != arr2[i]):
return False
return True
|
transformation_exclamation_equalto_variable
|
def are_Equal(arr1,arr2,n,m):
if (n == m):
return False
arr1.sort()
arr2.sort()
for i in range(0,n - 1):
if (arr1[i] != arr2[i]):
return False
return True
| 0 | 647 |
mbpp
|
def are_Equal(arr1,arr2,n,m):
if (n != m):
return False
arr1.sort()
arr2.sort()
for i in range(0,n - 1):
if (arr1[i] != arr2[i]):
return False
return True
|
transformation_true_false_variable
|
def are_Equal(arr1,arr2,n,m):
if (n != m):
return False
arr1.sort()
arr2.sort()
for i in range(0,n - 1):
if (arr1[i] != arr2[i]):
return False
return False
| 0 | 647 |
mbpp
|
def are_Equal(arr1,arr2,n,m):
if (n != m):
return False
arr1.sort()
arr2.sort()
for i in range(0,n - 1):
if (arr1[i] != arr2[i]):
return False
return True
|
transformation_false_true_variable
|
def are_Equal(arr1,arr2,n,m):
if (n != m):
return True
arr1.sort()
arr2.sort()
for i in range(0,n - 1):
if (arr1[i] != arr2[i]):
return False
return True
| 0 | 647 |
mbpp
|
def are_Equal(arr1,arr2,n,m):
if (n != m):
return False
arr1.sort()
arr2.sort()
for i in range(0,n - 1):
if (arr1[i] != arr2[i]):
return False
return True
|
transformation_dissimilar_code_injection_0
|
def min_cost(cost, m, n):
R = 3
C = 3
tc = [[0 for x in range(C)] for x in range(R)]
tc[0][0] = cost[0][0]
for i in range(1, m+1):
tc[i][0] = tc[i-1][0] + cost[i][0]
for j in range(1, n+1):
tc[0][j] = tc[0][j-1] + cost[0][j]
for i in range(1, m+1):
for j in range(1, n+1):
tc[i][j] = min(tc[i-1][j-1], tc[i-1][j], tc[i][j-1]) + cost[i][j]
return tc[m][n]
| 0 | 647 |
mbpp
|
def are_Equal(arr1,arr2,n,m):
if (n != m):
return False
arr1.sort()
arr2.sort()
for i in range(0,n - 1):
if (arr1[i] != arr2[i]):
return False
return True
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 647 |
mbpp
|
def are_Equal(arr1,arr2,n,m):
if (n != m):
return False
arr1.sort()
arr2.sort()
for i in range(0,n - 1):
if (arr1[i] != arr2[i]):
return False
return True
|
transformation_dissimilar_code_injection_2
|
def is_not_prime(n):
import math
result = False
for i in range(2,int(math.sqrt(n)) + 1):
if n % i == 0:
result = True
return result
| 0 | 647 |
mbpp
|
def are_Equal(arr1,arr2,n,m):
if (n != m):
return False
arr1.sort()
arr2.sort()
for i in range(0,n - 1):
if (arr1[i] != arr2[i]):
return False
return True
|
transformation_dissimilar_code_injection_3
|
def heap_queue_largest(nums,n):
import heapq as hq
largest_nums = hq.nlargest(n, nums)
return largest_nums
| 0 | 647 |
mbpp
|
def are_Equal(arr1,arr2,n,m):
if (n != m):
return False
arr1.sort()
arr2.sort()
for i in range(0,n - 1):
if (arr1[i] != arr2[i]):
return False
return True
|
transformation_dissimilar_code_injection_4
|
def count_ways(n):
A = [0] * (n + 1)
B = [0] * (n + 1)
A[0] = 1
A[1] = 0
B[0] = 0
B[1] = 1
for i in range(2, n+1):
A[i] = A[i - 2] + 2 * B[i - 1]
B[i] = A[i - 1] + B[i - 2]
return A[n]
| 0 | 647 |
mbpp
|
def check_subset(test_tup1, test_tup2):
res = set(test_tup2).issubset(test_tup1)
return (res)
|
transformation_dead_code_insert
|
def check_subset(test_tup1, test_tup2):
if False:
res = set(test_tup2).issubset(test_tup1)
res = set(test_tup2).issubset(test_tup1)
return res
| 1 | 648 |
mbpp
|
def check_subset(test_tup1, test_tup2):
res = set(test_tup2).issubset(test_tup1)
return (res)
|
transformation_for_while_loop
|
def check_subset(test_tup1, test_tup2):
res = set(test_tup2).issubset(test_tup1)
return res
| 1 | 648 |
mbpp
|
def check_subset(test_tup1, test_tup2):
res = set(test_tup2).issubset(test_tup1)
return (res)
|
transformation_operand_swap
|
def check_subset(test_tup1, test_tup2):
res = set(test_tup2).issubset(test_tup1)
return res
| 1 | 648 |
mbpp
|
def check_subset(test_tup1, test_tup2):
res = set(test_tup2).issubset(test_tup1)
return (res)
|
transformation_rename_variable_naive
|
def check_subset(test_tup1, test_tup2):
VAR_0 = set(test_tup2).issubset(test_tup1)
return VAR_0
| 1 | 648 |
mbpp
|
def check_subset(test_tup1, test_tup2):
res = set(test_tup2).issubset(test_tup1)
return (res)
|
transformation_rename_variable_rn
|
def check_subset(test_tup1, test_tup2):
PNS = set(test_tup2).issubset(test_tup1)
return PNS
| 1 | 648 |
mbpp
|
def check_subset(test_tup1, test_tup2):
res = set(test_tup2).issubset(test_tup1)
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 | 648 |
mbpp
|
def check_subset(test_tup1, test_tup2):
res = set(test_tup2).issubset(test_tup1)
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 | 648 |
mbpp
|
def check_subset(test_tup1, test_tup2):
res = set(test_tup2).issubset(test_tup1)
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 | 648 |
mbpp
|
def check_subset(test_tup1, test_tup2):
res = set(test_tup2).issubset(test_tup1)
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 | 648 |
mbpp
|
def check_subset(test_tup1, test_tup2):
res = set(test_tup2).issubset(test_tup1)
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 | 648 |
mbpp
|
def rectangle_perimeter(l,b):
perimeter=2*(l+b)
return perimeter
|
transformation_dead_code_insert
|
def rectangle_perimeter(l, b):
for _i_7 in range(0):
return perimeter
perimeter = 2 * (l + b)
return perimeter
| 1 | 651 |
mbpp
|
def rectangle_perimeter(l,b):
perimeter=2*(l+b)
return perimeter
|
transformation_for_while_loop
|
def rectangle_perimeter(l, b):
perimeter = 2 * (l + b)
return perimeter
| 1 | 651 |
mbpp
|
def rectangle_perimeter(l,b):
perimeter=2*(l+b)
return perimeter
|
transformation_operand_swap
|
def rectangle_perimeter(l, b):
perimeter = 2 * (l + b)
return perimeter
| 1 | 651 |
mbpp
|
def rectangle_perimeter(l,b):
perimeter=2*(l+b)
return perimeter
|
transformation_rename_variable_cb
|
def rectangle_perimeter(a, b):
perimeter = 2 * (a + b)
return perimeter
| 1 | 651 |
mbpp
|
def rectangle_perimeter(l,b):
perimeter=2*(l+b)
return perimeter
|
transformation_rename_variable_naive
|
def rectangle_perimeter(VAR_0, b):
perimeter = 2 * (VAR_0 + b)
return perimeter
| 1 | 651 |
mbpp
|
def rectangle_perimeter(l,b):
perimeter=2*(l+b)
return perimeter
|
transformation_rename_variable_rn
|
def rectangle_perimeter(J, b):
perimeter = 2 * (J + b)
return perimeter
| 1 | 651 |
mbpp
|
def rectangle_perimeter(l,b):
perimeter=2*(l+b)
return perimeter
|
transformation_add_sub_variable
|
def rectangle_perimeter(l,b):
perimeter=2*(l-b)
return perimeter
| 0 | 651 |
mbpp
|
def rectangle_perimeter(l,b):
perimeter=2*(l+b)
return perimeter
|
transformation_mul_div_variable
|
def rectangle_perimeter(l,b):
perimeter=2/(l+b)
return perimeter
| 0 | 651 |
mbpp
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.