original_code
stringclasses 565
values | transformation
stringclasses 24
values | transformed_code
stringlengths 35
955
| label
int64 0
1
| groups
int64 1
971
| dataset
stringclasses 1
value |
---|---|---|---|---|---|
def check_Even_Parity(x):
parity = 0
while (x != 0):
x = x & (x - 1)
parity += 1
if (parity % 2 == 0):
return True
else:
return False
|
transformation_rename_variable_cb
|
def check_Even_Parity(p):
parity = 0
while p != 0:
p = p & (p - 1)
parity += 1
if parity % 2 == 0:
return True
else:
return False
| 1 | 852 |
mbpp
|
def check_Even_Parity(x):
parity = 0
while (x != 0):
x = x & (x - 1)
parity += 1
if (parity % 2 == 0):
return True
else:
return False
|
transformation_rename_variable_naive
|
def check_Even_Parity(VAR_0):
parity = 0
while VAR_0 != 0:
VAR_0 = VAR_0 & (VAR_0 - 1)
parity += 1
if parity % 2 == 0:
return True
else:
return False
| 1 | 852 |
mbpp
|
def check_Even_Parity(x):
parity = 0
while (x != 0):
x = x & (x - 1)
parity += 1
if (parity % 2 == 0):
return True
else:
return False
|
transformation_rename_variable_rn
|
def check_Even_Parity(k):
parity = 0
while k != 0:
k = k & (k - 1)
parity += 1
if parity % 2 == 0:
return True
else:
return False
| 1 | 852 |
mbpp
|
def check_Even_Parity(x):
parity = 0
while (x != 0):
x = x & (x - 1)
parity += 1
if (parity % 2 == 0):
return True
else:
return False
|
transformation_add_sub_variable
|
def check_Even_Parity(x):
parity = 0
while (x != 0):
x = x & (x - 1)
parity -= 1
if (parity % 2 == 0):
return True
else:
return False
| 0 | 852 |
mbpp
|
def check_Even_Parity(x):
parity = 0
while (x != 0):
x = x & (x - 1)
parity += 1
if (parity % 2 == 0):
return True
else:
return False
|
transformation_sub_add_variable
|
def check_Even_Parity(x):
parity = 0
while (x != 0):
x = x & (x + 1)
parity += 1
if (parity % 2 == 0):
return True
else:
return False
| 0 | 852 |
mbpp
|
def check_Even_Parity(x):
parity = 0
while (x != 0):
x = x & (x - 1)
parity += 1
if (parity % 2 == 0):
return True
else:
return False
|
transformation_equalto_exclamation_variable
|
def check_Even_Parity(x):
parity = 0
while (x != 0):
x = x & (x - 1)
parity += 1
if (parity % 2 != 0):
return True
else:
return False
| 0 | 852 |
mbpp
|
def check_Even_Parity(x):
parity = 0
while (x != 0):
x = x & (x - 1)
parity += 1
if (parity % 2 == 0):
return True
else:
return False
|
transformation_exclamation_equalto_variable
|
def check_Even_Parity(x):
parity = 0
while (x == 0):
x = x & (x - 1)
parity += 1
if (parity % 2 == 0):
return True
else:
return False
| 0 | 852 |
mbpp
|
def check_Even_Parity(x):
parity = 0
while (x != 0):
x = x & (x - 1)
parity += 1
if (parity % 2 == 0):
return True
else:
return False
|
transformation_true_false_variable
|
def check_Even_Parity(x):
parity = 0
while (x != 0):
x = x & (x - 1)
parity += 1
if (parity % 2 == 0):
return False
else:
return False
| 0 | 852 |
mbpp
|
def check_Even_Parity(x):
parity = 0
while (x != 0):
x = x & (x - 1)
parity += 1
if (parity % 2 == 0):
return True
else:
return False
|
transformation_false_true_variable
|
def check_Even_Parity(x):
parity = 0
while (x != 0):
x = x & (x - 1)
parity += 1
if (parity % 2 == 0):
return True
else:
return True
| 0 | 852 |
mbpp
|
def check_Even_Parity(x):
parity = 0
while (x != 0):
x = x & (x - 1)
parity += 1
if (parity % 2 == 0):
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 | 852 |
mbpp
|
def check_Even_Parity(x):
parity = 0
while (x != 0):
x = x & (x - 1)
parity += 1
if (parity % 2 == 0):
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 | 852 |
mbpp
|
def check_Even_Parity(x):
parity = 0
while (x != 0):
x = x & (x - 1)
parity += 1
if (parity % 2 == 0):
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 | 852 |
mbpp
|
def check_Even_Parity(x):
parity = 0
while (x != 0):
x = x & (x - 1)
parity += 1
if (parity % 2 == 0):
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 | 852 |
mbpp
|
def check_Even_Parity(x):
parity = 0
while (x != 0):
x = x & (x - 1)
parity += 1
if (parity % 2 == 0):
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 | 852 |
mbpp
|
def listify_list(list1):
result = list(map(list,list1))
return result
|
transformation_dead_code_insert
|
def listify_list(list1):
if False:
return result
result = list(map(list, list1))
return result
| 1 | 854 |
mbpp
|
def listify_list(list1):
result = list(map(list,list1))
return result
|
transformation_for_while_loop
|
def listify_list(list1):
result = list(map(list, list1))
return result
| 1 | 854 |
mbpp
|
def listify_list(list1):
result = list(map(list,list1))
return result
|
transformation_operand_swap
|
def listify_list(list1):
result = list(map(list, list1))
return result
| 1 | 854 |
mbpp
|
def listify_list(list1):
result = list(map(list,list1))
return result
|
transformation_rename_variable_cb
|
def listify_list(lines):
result = list(map(list, lines))
return result
| 1 | 854 |
mbpp
|
def listify_list(list1):
result = list(map(list,list1))
return result
|
transformation_rename_variable_naive
|
def listify_list(VAR_0):
result = list(map(list, VAR_0))
return result
| 1 | 854 |
mbpp
|
def listify_list(list1):
result = list(map(list,list1))
return result
|
transformation_rename_variable_rn
|
def listify_list(UY5U1):
result = list(map(list, UY5U1))
return result
| 1 | 854 |
mbpp
|
def listify_list(list1):
result = list(map(list,list1))
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 | 854 |
mbpp
|
def listify_list(list1):
result = list(map(list,list1))
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 | 854 |
mbpp
|
def listify_list(list1):
result = list(map(list,list1))
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 | 854 |
mbpp
|
def listify_list(list1):
result = list(map(list,list1))
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 | 854 |
mbpp
|
def listify_list(list1):
result = list(map(list,list1))
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 | 854 |
mbpp
|
def sub_lists(my_list):
from itertools import combinations
subs = []
for i in range(0, len(my_list)+1):
temp = [list(x) for x in combinations(my_list, i)]
if len(temp)>0:
subs.extend(temp)
return subs
|
transformation_dead_code_insert
|
def sub_lists(my_list):
_i_8 = 0
while _i_8 < _i_8:
temp = [list(x) for x in combinations(my_list, i)]
from itertools import combinations
subs = []
for i in range(0, len(my_list) + 1):
temp = [list(x) for x in combinations(my_list, i)]
if len(temp) > 0:
subs.extend(temp)
return subs
| 1 | 856 |
mbpp
|
def sub_lists(my_list):
from itertools import combinations
subs = []
for i in range(0, len(my_list)+1):
temp = [list(x) for x in combinations(my_list, i)]
if len(temp)>0:
subs.extend(temp)
return subs
|
transformation_for_while_loop
|
def sub_lists(my_list):
from itertools import combinations
subs = []
i = 0
while i < len(my_list) + 1:
temp = [list(x) for x in combinations(my_list, i)]
if len(temp) > 0:
subs.extend(temp)
i += 1
return subs
| 1 | 856 |
mbpp
|
def sub_lists(my_list):
from itertools import combinations
subs = []
for i in range(0, len(my_list)+1):
temp = [list(x) for x in combinations(my_list, i)]
if len(temp)>0:
subs.extend(temp)
return subs
|
transformation_operand_swap
|
def sub_lists(my_list):
from itertools import combinations
subs = []
for i in range(0, len(my_list) + 1):
temp = [list(x) for x in combinations(my_list, i)]
if 0 < len(temp):
subs.extend(temp)
return subs
| 1 | 856 |
mbpp
|
def sub_lists(my_list):
from itertools import combinations
subs = []
for i in range(0, len(my_list)+1):
temp = [list(x) for x in combinations(my_list, i)]
if len(temp)>0:
subs.extend(temp)
return subs
|
transformation_rename_variable_cb
|
def sub_lists(s):
from itertools import combinations
subs = []
for i in range(0, len(s) + 1):
temp = [list(x) for x in combinations(s, i)]
if len(temp) > 0:
subs.extend(temp)
return subs
| 1 | 856 |
mbpp
|
def sub_lists(my_list):
from itertools import combinations
subs = []
for i in range(0, len(my_list)+1):
temp = [list(x) for x in combinations(my_list, i)]
if len(temp)>0:
subs.extend(temp)
return subs
|
transformation_rename_variable_naive
|
def sub_lists(my_list):
from itertools import combinations
subs = []
for i in range(0, len(my_list) + 1):
VAR_0 = [list(x) for x in combinations(my_list, i)]
if len(VAR_0) > 0:
subs.extend(VAR_0)
return subs
| 1 | 856 |
mbpp
|
def sub_lists(my_list):
from itertools import combinations
subs = []
for i in range(0, len(my_list)+1):
temp = [list(x) for x in combinations(my_list, i)]
if len(temp)>0:
subs.extend(temp)
return subs
|
transformation_rename_variable_rn
|
def sub_lists(Pb2tGGk):
from itertools import combinations
subs = []
for i in range(0, len(Pb2tGGk) + 1):
temp = [list(x) for x in combinations(Pb2tGGk, i)]
if len(temp) > 0:
subs.extend(temp)
return subs
| 1 | 856 |
mbpp
|
def sub_lists(my_list):
from itertools import combinations
subs = []
for i in range(0, len(my_list)+1):
temp = [list(x) for x in combinations(my_list, i)]
if len(temp)>0:
subs.extend(temp)
return subs
|
transformation_add_sub_variable
|
def sub_lists(my_list):
from itertools import combinations
subs = []
for i in range(0, len(my_list)-1):
temp = [list(x) for x in combinations(my_list, i)]
if len(temp)>0:
subs.extend(temp)
return subs
| 0 | 856 |
mbpp
|
def sub_lists(my_list):
from itertools import combinations
subs = []
for i in range(0, len(my_list)+1):
temp = [list(x) for x in combinations(my_list, i)]
if len(temp)>0:
subs.extend(temp)
return subs
|
transformation_greater_lesser_variable
|
def sub_lists(my_list):
from itertools import combinations
subs = []
for i in range(0, len(my_list)+1):
temp = [list(x) for x in combinations(my_list, i)]
if len(temp)<0:
subs.extend(temp)
return subs
| 0 | 856 |
mbpp
|
def sub_lists(my_list):
from itertools import combinations
subs = []
for i in range(0, len(my_list)+1):
temp = [list(x) for x in combinations(my_list, i)]
if len(temp)>0:
subs.extend(temp)
return subs
|
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 | 856 |
mbpp
|
def sub_lists(my_list):
from itertools import combinations
subs = []
for i in range(0, len(my_list)+1):
temp = [list(x) for x in combinations(my_list, i)]
if len(temp)>0:
subs.extend(temp)
return subs
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 856 |
mbpp
|
def sub_lists(my_list):
from itertools import combinations
subs = []
for i in range(0, len(my_list)+1):
temp = [list(x) for x in combinations(my_list, i)]
if len(temp)>0:
subs.extend(temp)
return subs
|
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 | 856 |
mbpp
|
def sub_lists(my_list):
from itertools import combinations
subs = []
for i in range(0, len(my_list)+1):
temp = [list(x) for x in combinations(my_list, i)]
if len(temp)>0:
subs.extend(temp)
return subs
|
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 | 856 |
mbpp
|
def sub_lists(my_list):
from itertools import combinations
subs = []
for i in range(0, len(my_list)+1):
temp = [list(x) for x in combinations(my_list, i)]
if len(temp)>0:
subs.extend(temp)
return subs
|
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 | 856 |
mbpp
|
def anagram_lambda(texts,str):
from collections import Counter
result = list(filter(lambda x: (Counter(str) == Counter(x)), texts))
return result
|
transformation_dead_code_insert
|
def anagram_lambda(texts, str):
from collections import Counter
_i_7 = 0
while _i_7 > _i_7:
from collections import Counter
result = list(filter(lambda x: (Counter(str) == Counter(x)), texts))
return result
| 1 | 858 |
mbpp
|
def anagram_lambda(texts,str):
from collections import Counter
result = list(filter(lambda x: (Counter(str) == Counter(x)), texts))
return result
|
transformation_for_while_loop
|
def anagram_lambda(texts, str):
from collections import Counter
result = list(filter(lambda x: (Counter(str) == Counter(x)), texts))
return result
| 1 | 858 |
mbpp
|
def anagram_lambda(texts,str):
from collections import Counter
result = list(filter(lambda x: (Counter(str) == Counter(x)), texts))
return result
|
transformation_operand_swap
|
def anagram_lambda(texts, str):
from collections import Counter
result = list(filter(lambda x: (Counter(x) == Counter(str)), texts))
return result
| 1 | 858 |
mbpp
|
def anagram_lambda(texts,str):
from collections import Counter
result = list(filter(lambda x: (Counter(str) == Counter(x)), texts))
return result
|
transformation_rename_variable_cb
|
def anagram_lambda(texts, str):
from collections import Counter
result = list(filter(lambda t: (Counter(str) == Counter(t)), texts))
return result
| 1 | 858 |
mbpp
|
def anagram_lambda(texts,str):
from collections import Counter
result = list(filter(lambda x: (Counter(str) == Counter(x)), texts))
return result
|
transformation_rename_variable_naive
|
def anagram_lambda(texts, str):
from collections import Counter
result = list(filter(lambda VAR_0: (Counter(str) == Counter(VAR_0)), texts))
return result
| 1 | 858 |
mbpp
|
def anagram_lambda(texts,str):
from collections import Counter
result = list(filter(lambda x: (Counter(str) == Counter(x)), texts))
return result
|
transformation_rename_variable_rn
|
def anagram_lambda(S6B6N, str):
from collections import Counter
result = list(filter(lambda x: (Counter(str) == Counter(x)), S6B6N))
return result
| 1 | 858 |
mbpp
|
def anagram_lambda(texts,str):
from collections import Counter
result = list(filter(lambda x: (Counter(str) == Counter(x)), texts))
return result
|
transformation_equalto_exclamation_variable
|
def anagram_lambda(texts,str):
from collections import Counter
result = list(filter(lambda x: (Counter(str) != Counter(x)), texts))
return result
| 0 | 858 |
mbpp
|
def anagram_lambda(texts,str):
from collections import Counter
result = list(filter(lambda x: (Counter(str) == Counter(x)), texts))
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 | 858 |
mbpp
|
def anagram_lambda(texts,str):
from collections import Counter
result = list(filter(lambda x: (Counter(str) == Counter(x)), texts))
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 | 858 |
mbpp
|
def anagram_lambda(texts,str):
from collections import Counter
result = list(filter(lambda x: (Counter(str) == Counter(x)), texts))
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 | 858 |
mbpp
|
def anagram_lambda(texts,str):
from collections import Counter
result = list(filter(lambda x: (Counter(str) == Counter(x)), texts))
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 | 858 |
mbpp
|
def anagram_lambda(texts,str):
from collections import Counter
result = list(filter(lambda x: (Counter(str) == Counter(x)), texts))
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 | 858 |
mbpp
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 and v[i] == v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
|
transformation_dead_code_insert
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
for _i_8 in range(0):
return ans
if arr[i] != arr[i - 1]:
v.append(arr[i])
for i in range(len(v)):
if i > 0 and v[i] == v[i - 1] + 1:
count += 1
else:
count = 1
ans = max(ans, count)
return ans
| 1 | 860 |
mbpp
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 and v[i] == v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
|
transformation_for_while_loop
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
i = 1
while i < n:
if arr[i] != arr[i - 1]:
v.append(arr[i])
i += 1
for i in range(len(v)):
if i > 0 and v[i] == v[i - 1] + 1:
count += 1
else:
count = 1
ans = max(ans, count)
return ans
| 1 | 860 |
mbpp
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 and v[i] == v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
|
transformation_operand_swap
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if arr[i - 1] != arr[i]:
v.append(arr[i])
for i in range(len(v)):
if i > 0 and v[i] == v[i - 1] + 1:
count += 1
else:
count = 1
ans = max(ans, count)
return ans
| 1 | 860 |
mbpp
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 and v[i] == v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
|
transformation_rename_variable_cb
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for n2 in range(1, n):
if arr[n2] != arr[n2 - 1]:
v.append(arr[n2])
for n2 in range(len(v)):
if n2 > 0 and v[n2] == v[n2 - 1] + 1:
count += 1
else:
count = 1
ans = max(ans, count)
return ans
| 1 | 860 |
mbpp
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 and v[i] == v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
|
transformation_rename_variable_naive
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for VAR_0 in range(1, n):
if arr[VAR_0] != arr[VAR_0 - 1]:
v.append(arr[VAR_0])
for VAR_0 in range(len(v)):
if VAR_0 > 0 and v[VAR_0] == v[VAR_0 - 1] + 1:
count += 1
else:
count = 1
ans = max(ans, count)
return ans
| 1 | 860 |
mbpp
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 and v[i] == v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
|
transformation_rename_variable_rn
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for w in range(1, n):
if arr[w] != arr[w - 1]:
v.append(arr[w])
for w in range(len(v)):
if w > 0 and v[w] == v[w - 1] + 1:
count += 1
else:
count = 1
ans = max(ans, count)
return ans
| 1 | 860 |
mbpp
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 and v[i] == v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
|
transformation_add_sub_variable
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 and v[i] == v[i - 1] - 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
| 0 | 860 |
mbpp
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 and v[i] == v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
|
transformation_sub_add_variable
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i + 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 and v[i] == v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
| 0 | 860 |
mbpp
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 and v[i] == v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
|
transformation_greater_lesser_variable
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i < 0 and v[i] == v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
| 0 | 860 |
mbpp
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 and v[i] == v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
|
transformation_equalto_exclamation_variable
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 and v[i] != v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
| 0 | 860 |
mbpp
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 and v[i] == v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
|
transformation_exclamation_equalto_variable
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] == arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 and v[i] == v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
| 0 | 860 |
mbpp
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 and v[i] == v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
|
transformation_and_or_variable
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 or v[i] == v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
| 0 | 860 |
mbpp
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 and v[i] == v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
|
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 | 860 |
mbpp
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 and v[i] == v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 860 |
mbpp
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 and v[i] == v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
|
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 | 860 |
mbpp
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 and v[i] == v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
|
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 | 860 |
mbpp
|
def find_longest_conseq_subseq(arr, n):
ans = 0
count = 0
arr.sort()
v = []
v.append(arr[0])
for i in range(1, n):
if (arr[i] != arr[i - 1]):
v.append(arr[i])
for i in range(len(v)):
if (i > 0 and v[i] == v[i - 1] + 1):
count += 1
else:
count = 1
ans = max(ans, count)
return ans
|
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 | 860 |
mbpp
|
def palindrome_lambda(texts):
result = list(filter(lambda x: (x == "".join(reversed(x))), texts))
return result
|
transformation_dead_code_insert
|
def palindrome_lambda(texts):
_i_8 = 0
while _i_8 < _i_8:
return result
result = list(filter(lambda x: (x == "".join(reversed(x))), texts))
return result
| 1 | 861 |
mbpp
|
def palindrome_lambda(texts):
result = list(filter(lambda x: (x == "".join(reversed(x))), texts))
return result
|
transformation_for_while_loop
|
def palindrome_lambda(texts):
result = list(filter(lambda x: (x == "".join(reversed(x))), texts))
return result
| 1 | 861 |
mbpp
|
def palindrome_lambda(texts):
result = list(filter(lambda x: (x == "".join(reversed(x))), texts))
return result
|
transformation_operand_swap
|
def palindrome_lambda(texts):
result = list(filter(lambda x: ("".join(reversed(x)) == x), texts))
return result
| 1 | 861 |
mbpp
|
def palindrome_lambda(texts):
result = list(filter(lambda x: (x == "".join(reversed(x))), texts))
return result
|
transformation_rename_variable_cb
|
def palindrome_lambda(texts):
result = list(filter(lambda s: (s == "".join(reversed(s))), texts))
return result
| 1 | 861 |
mbpp
|
def palindrome_lambda(texts):
result = list(filter(lambda x: (x == "".join(reversed(x))), texts))
return result
|
transformation_rename_variable_naive
|
def palindrome_lambda(texts):
result = list(filter(lambda VAR_0: (VAR_0 == "".join(reversed(VAR_0))), texts))
return result
| 1 | 861 |
mbpp
|
def palindrome_lambda(texts):
result = list(filter(lambda x: (x == "".join(reversed(x))), texts))
return result
|
transformation_rename_variable_rn
|
def palindrome_lambda(texts):
result = list(filter(lambda Z: (Z == "".join(reversed(Z))), texts))
return result
| 1 | 861 |
mbpp
|
def palindrome_lambda(texts):
result = list(filter(lambda x: (x == "".join(reversed(x))), texts))
return result
|
transformation_equalto_exclamation_variable
|
def palindrome_lambda(texts):
result = list(filter(lambda x: (x != "".join(reversed(x))), texts))
return result
| 0 | 861 |
mbpp
|
def palindrome_lambda(texts):
result = list(filter(lambda x: (x == "".join(reversed(x))), texts))
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 | 861 |
mbpp
|
def palindrome_lambda(texts):
result = list(filter(lambda x: (x == "".join(reversed(x))), texts))
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 | 861 |
mbpp
|
def palindrome_lambda(texts):
result = list(filter(lambda x: (x == "".join(reversed(x))), texts))
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 | 861 |
mbpp
|
def palindrome_lambda(texts):
result = list(filter(lambda x: (x == "".join(reversed(x))), texts))
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 | 861 |
mbpp
|
def palindrome_lambda(texts):
result = list(filter(lambda x: (x == "".join(reversed(x))), texts))
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 | 861 |
mbpp
|
def ntimes_list(nums,n):
result = map(lambda x:n*x, nums)
return list(result)
|
transformation_dead_code_insert
|
def ntimes_list(nums, n):
_i_8 = 0
if _i_8 > _i_8:
return list(result)
result = map(lambda x: n * x, nums)
return list(result)
| 1 | 862 |
mbpp
|
def ntimes_list(nums,n):
result = map(lambda x:n*x, nums)
return list(result)
|
transformation_for_while_loop
|
def ntimes_list(nums, n):
result = map(lambda x: n * x, nums)
return list(result)
| 1 | 862 |
mbpp
|
def ntimes_list(nums,n):
result = map(lambda x:n*x, nums)
return list(result)
|
transformation_operand_swap
|
def ntimes_list(nums, n):
result = map(lambda x: n * x, nums)
return list(result)
| 1 | 862 |
mbpp
|
def ntimes_list(nums,n):
result = map(lambda x:n*x, nums)
return list(result)
|
transformation_rename_variable_cb
|
def ntimes_list(nums, n):
result = map(lambda x2: n * x2, nums)
return list(result)
| 1 | 862 |
mbpp
|
def ntimes_list(nums,n):
result = map(lambda x:n*x, nums)
return list(result)
|
transformation_rename_variable_naive
|
def ntimes_list(VAR_0, n):
result = map(lambda x: n * x, VAR_0)
return list(result)
| 1 | 862 |
mbpp
|
def ntimes_list(nums,n):
result = map(lambda x:n*x, nums)
return list(result)
|
transformation_rename_variable_rn
|
def ntimes_list(nums, n):
result = map(lambda X: n * X, nums)
return list(result)
| 1 | 862 |
mbpp
|
def ntimes_list(nums,n):
result = map(lambda x:n*x, nums)
return list(result)
|
transformation_mul_div_variable
|
def ntimes_list(nums,n):
result = map(lambda x:n/x, nums)
return list(result)
| 0 | 862 |
mbpp
|
def ntimes_list(nums,n):
result = map(lambda x:n*x, nums)
return list(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 | 862 |
mbpp
|
def ntimes_list(nums,n):
result = map(lambda x:n*x, nums)
return list(result)
|
transformation_dissimilar_code_injection_1
|
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res)
| 0 | 862 |
mbpp
|
def ntimes_list(nums,n):
result = map(lambda x:n*x, nums)
return list(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 | 862 |
mbpp
|
def ntimes_list(nums,n):
result = map(lambda x:n*x, nums)
return list(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 | 862 |
mbpp
|
def ntimes_list(nums,n):
result = map(lambda x:n*x, nums)
return list(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 | 862 |
mbpp
|
def check_monthnumb(monthname2):
if(monthname2=="January" or monthname2=="March"or monthname2=="May" or monthname2=="July" or monthname2=="Augest" or monthname2=="October" or monthname2=="December"):
return True
else:
return False
|
transformation_dead_code_insert
|
def check_monthnumb(monthname2):
if (
monthname2 == "January"
or monthname2 == "March"
or monthname2 == "May"
or monthname2 == "July"
or monthname2 == "Augest"
or monthname2 == "October"
or monthname2 == "December"
):
if False:
return False
return True
else:
return False
| 1 | 863 |
mbpp
|
def check_monthnumb(monthname2):
if(monthname2=="January" or monthname2=="March"or monthname2=="May" or monthname2=="July" or monthname2=="Augest" or monthname2=="October" or monthname2=="December"):
return True
else:
return False
|
transformation_for_while_loop
|
def check_monthnumb(monthname2):
if (
monthname2 == "January"
or monthname2 == "March"
or monthname2 == "May"
or monthname2 == "July"
or monthname2 == "Augest"
or monthname2 == "October"
or monthname2 == "December"
):
return True
else:
return False
| 1 | 863 |
mbpp
|
def check_monthnumb(monthname2):
if(monthname2=="January" or monthname2=="March"or monthname2=="May" or monthname2=="July" or monthname2=="Augest" or monthname2=="October" or monthname2=="December"):
return True
else:
return False
|
transformation_operand_swap
|
def check_monthnumb(monthname2):
if (
monthname2 == "January"
or monthname2 == "March"
or monthname2 == "May"
or monthname2 == "July"
or monthname2 == "Augest"
or monthname2 == "October"
or "December" == monthname2
):
return True
else:
return False
| 1 | 863 |
mbpp
|
def check_monthnumb(monthname2):
if(monthname2=="January" or monthname2=="March"or monthname2=="May" or monthname2=="July" or monthname2=="Augest" or monthname2=="October" or monthname2=="December"):
return True
else:
return False
|
transformation_rename_variable_cb
|
def check_monthnumb(month):
if (
month == "January"
or month == "March"
or month == "May"
or month == "July"
or month == "Augest"
or month == "October"
or month == "December"
):
return True
else:
return False
| 1 | 863 |
mbpp
|
def check_monthnumb(monthname2):
if(monthname2=="January" or monthname2=="March"or monthname2=="May" or monthname2=="July" or monthname2=="Augest" or monthname2=="October" or monthname2=="December"):
return True
else:
return False
|
transformation_rename_variable_naive
|
def check_monthnumb(VAR_0):
if (
VAR_0 == "January"
or VAR_0 == "March"
or VAR_0 == "May"
or VAR_0 == "July"
or VAR_0 == "Augest"
or VAR_0 == "October"
or VAR_0 == "December"
):
return True
else:
return False
| 1 | 863 |
mbpp
|
def check_monthnumb(monthname2):
if(monthname2=="January" or monthname2=="March"or monthname2=="May" or monthname2=="July" or monthname2=="Augest" or monthname2=="October" or monthname2=="December"):
return True
else:
return False
|
transformation_rename_variable_rn
|
def check_monthnumb(CzG09Yu8kJ):
if (
CzG09Yu8kJ == "January"
or CzG09Yu8kJ == "March"
or CzG09Yu8kJ == "May"
or CzG09Yu8kJ == "July"
or CzG09Yu8kJ == "Augest"
or CzG09Yu8kJ == "October"
or CzG09Yu8kJ == "December"
):
return True
else:
return False
| 1 | 863 |
mbpp
|
def check_monthnumb(monthname2):
if(monthname2=="January" or monthname2=="March"or monthname2=="May" or monthname2=="July" or monthname2=="Augest" or monthname2=="October" or monthname2=="December"):
return True
else:
return False
|
transformation_equalto_exclamation_variable
|
def check_monthnumb(monthname2):
if(monthname2!="January" or monthname2=="March"or monthname2=="May" or monthname2=="July" or monthname2=="Augest" or monthname2=="October" or monthname2=="December"):
return True
else:
return False
| 0 | 863 |
mbpp
|
def check_monthnumb(monthname2):
if(monthname2=="January" or monthname2=="March"or monthname2=="May" or monthname2=="July" or monthname2=="Augest" or monthname2=="October" or monthname2=="December"):
return True
else:
return False
|
transformation_true_false_variable
|
def check_monthnumb(monthname2):
if(monthname2=="January" or monthname2=="March"or monthname2=="May" or monthname2=="July" or monthname2=="Augest" or monthname2=="October" or monthname2=="December"):
return False
else:
return False
| 0 | 863 |
mbpp
|
def check_monthnumb(monthname2):
if(monthname2=="January" or monthname2=="March"or monthname2=="May" or monthname2=="July" or monthname2=="Augest" or monthname2=="October" or monthname2=="December"):
return True
else:
return False
|
transformation_false_true_variable
|
def check_monthnumb(monthname2):
if(monthname2=="January" or monthname2=="March"or monthname2=="May" or monthname2=="July" or monthname2=="Augest" or monthname2=="October" or monthname2=="December"):
return True
else:
return True
| 0 | 863 |
mbpp
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.