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 similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | transformation_dead_code_insert | def similar_elements(test_tup1, test_tup2):
for _i_7 in range(0):
res = tuple(set(test_tup1) & set(test_tup2))
res = tuple(set(test_tup1) & set(test_tup2))
return res | 1 | 1 | mbpp |
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | transformation_for_while_loop | def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return res | 1 | 1 | mbpp |
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | transformation_operand_swap | def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return res | 1 | 1 | mbpp |
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | transformation_rename_variable_naive | def similar_elements(test_tup1, test_tup2):
VAR_0 = tuple(set(test_tup1) & set(test_tup2))
return VAR_0 | 1 | 1 | mbpp |
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | transformation_rename_variable_rn | def similar_elements(test_tup1, test_tup2):
B2j = tuple(set(test_tup1) & set(test_tup2))
return B2j | 1 | 1 | mbpp |
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(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 | 1 | mbpp |
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | transformation_dissimilar_code_injection_1 | 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 | 1 | mbpp |
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | transformation_dissimilar_code_injection_2 | def heap_queue_largest(nums,n):
import heapq as hq
largest_nums = hq.nlargest(n, nums)
return largest_nums | 0 | 1 | mbpp |
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | transformation_dissimilar_code_injection_3 | 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 | 1 | mbpp |
def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | transformation_dissimilar_code_injection_4 | def differ_At_One_Bit_Pos(a,b):
def is_Power_Of_Two (x):
return x and (not(x & (x - 1)))
return is_Power_Of_Two(a ^ b) | 0 | 1 | mbpp |
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] | transformation_dead_code_insert | def count_ways(n):
A = [0] * (n + 1)
B = [0] * (n + 1)
A[0] = 1
while False:
B[0] = 0
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] | 1 | 4 | mbpp |
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] | transformation_for_while_loop | def count_ways(n):
A = [0] * (n + 1)
B = [0] * (n + 1)
A[0] = 1
A[1] = 0
B[0] = 0
B[1] = 1
i = 2
while i < n + 1:
A[i] = A[i - 2] + 2 * B[i - 1]
B[i] = A[i - 1] + B[i - 2]
i += 1
return A[n] | 1 | 4 | mbpp |
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] | transformation_operand_swap | 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] | 1 | 4 | mbpp |
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] | transformation_rename_variable_cb | 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 n2 in range(2, n + 1):
A[n2] = A[n2 - 2] + 2 * B[n2 - 1]
B[n2] = A[n2 - 1] + B[n2 - 2]
return A[n] | 1 | 4 | mbpp |
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] | transformation_rename_variable_naive | def count_ways(n):
VAR_0 = [0] * (n + 1)
B = [0] * (n + 1)
VAR_0[0] = 1
VAR_0[1] = 0
B[0] = 0
B[1] = 1
for i in range(2, n + 1):
VAR_0[i] = VAR_0[i - 2] + 2 * B[i - 1]
B[i] = VAR_0[i - 1] + B[i - 2]
return VAR_0[n] | 1 | 4 | mbpp |
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] | transformation_rename_variable_rn | 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] | 1 | 4 | mbpp |
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] | transformation_add_sub_variable | 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 | 4 | mbpp |
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] | transformation_sub_add_variable | 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 | 4 | mbpp |
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] | transformation_mul_div_variable | 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 | 4 | mbpp |
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] | 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 | 4 | mbpp |
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] | transformation_dissimilar_code_injection_1 | def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | 0 | 4 | mbpp |
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] | 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 | 4 | mbpp |
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] | 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 | 4 | mbpp |
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] | transformation_dissimilar_code_injection_4 | def differ_At_One_Bit_Pos(a,b):
def is_Power_Of_Two (x):
return x and (not(x & (x - 1)))
return is_Power_Of_Two(a ^ b) | 0 | 4 | mbpp |
def find_Rotations(str):
tmp = str + str
n = len(str)
for i in range(1,n + 1):
substring = tmp[i: i+n]
if (str == substring):
return i
return n | transformation_dead_code_insert | def find_Rotations(str):
tmp = str + str
n = len(str)
for i in range(1, n + 1):
_i_2 = 0
if _i_2 > _i_2:
return n
substring = tmp[i : i + n]
if str == substring:
return i
return n | 1 | 8 | mbpp |
def find_Rotations(str):
tmp = str + str
n = len(str)
for i in range(1,n + 1):
substring = tmp[i: i+n]
if (str == substring):
return i
return n | transformation_for_while_loop | def find_Rotations(str):
tmp = str + str
n = len(str)
i = 1
while i < n + 1:
substring = tmp[i : i + n]
if str == substring:
return i
i += 1
return n | 1 | 8 | mbpp |
def find_Rotations(str):
tmp = str + str
n = len(str)
for i in range(1,n + 1):
substring = tmp[i: i+n]
if (str == substring):
return i
return n | transformation_operand_swap | def find_Rotations(str):
tmp = str + str
n = len(str)
for i in range(1, n + 1):
substring = tmp[i : i + n]
if substring == str:
return i
return n | 1 | 8 | mbpp |
def find_Rotations(str):
tmp = str + str
n = len(str)
for i in range(1,n + 1):
substring = tmp[i: i+n]
if (str == substring):
return i
return n | transformation_rename_variable_cb | def find_Rotations(str):
tmp = str + str
n = len(str)
for i2 in range(1, n + 1):
substring = tmp[i2 : i2 + n]
if str == substring:
return i2
return n | 1 | 8 | mbpp |
def find_Rotations(str):
tmp = str + str
n = len(str)
for i in range(1,n + 1):
substring = tmp[i: i+n]
if (str == substring):
return i
return n | transformation_rename_variable_naive | def find_Rotations(str):
tmp = str + str
VAR_0 = len(str)
for i in range(1, VAR_0 + 1):
substring = tmp[i : i + VAR_0]
if str == substring:
return i
return VAR_0 | 1 | 8 | mbpp |
def find_Rotations(str):
tmp = str + str
n = len(str)
for i in range(1,n + 1):
substring = tmp[i: i+n]
if (str == substring):
return i
return n | transformation_rename_variable_rn | def find_Rotations(str):
tmp = str + str
n = len(str)
for l in range(1, n + 1):
substring = tmp[l : l + n]
if str == substring:
return l
return n | 1 | 8 | mbpp |
def find_Rotations(str):
tmp = str + str
n = len(str)
for i in range(1,n + 1):
substring = tmp[i: i+n]
if (str == substring):
return i
return n | transformation_add_sub_variable | def find_Rotations(str):
tmp = str - str
n = len(str)
for i in range(1,n + 1):
substring = tmp[i: i+n]
if (str == substring):
return i
return n | 0 | 8 | mbpp |
def find_Rotations(str):
tmp = str + str
n = len(str)
for i in range(1,n + 1):
substring = tmp[i: i+n]
if (str == substring):
return i
return n | transformation_equalto_exclamation_variable | def find_Rotations(str):
tmp = str + str
n = len(str)
for i in range(1,n + 1):
substring = tmp[i: i+n]
if (str != substring):
return i
return n | 0 | 8 | mbpp |
def find_Rotations(str):
tmp = str + str
n = len(str)
for i in range(1,n + 1):
substring = tmp[i: i+n]
if (str == substring):
return i
return 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 | 8 | mbpp |
def find_Rotations(str):
tmp = str + str
n = len(str)
for i in range(1,n + 1):
substring = tmp[i: i+n]
if (str == substring):
return i
return n | transformation_dissimilar_code_injection_1 | def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | 0 | 8 | mbpp |
def find_Rotations(str):
tmp = str + str
n = len(str)
for i in range(1,n + 1):
substring = tmp[i: i+n]
if (str == substring):
return i
return 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 | 8 | mbpp |
def find_Rotations(str):
tmp = str + str
n = len(str)
for i in range(1,n + 1):
substring = tmp[i: i+n]
if (str == substring):
return i
return 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 | 8 | mbpp |
def find_Rotations(str):
tmp = str + str
n = len(str)
for i in range(1,n + 1):
substring = tmp[i: i+n]
if (str == substring):
return i
return 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 | 8 | mbpp |
def small_nnum(list1,n):
import heapq
smallest=heapq.nsmallest(n,list1)
return smallest | transformation_dead_code_insert | def small_nnum(list1, n):
import heapq
for _i_0 in range(0):
return smallest
smallest = heapq.nsmallest(n, list1)
return smallest | 1 | 9 | mbpp |
def small_nnum(list1,n):
import heapq
smallest=heapq.nsmallest(n,list1)
return smallest | transformation_for_while_loop | def small_nnum(list1, n):
import heapq
smallest = heapq.nsmallest(n, list1)
return smallest | 1 | 9 | mbpp |
def small_nnum(list1,n):
import heapq
smallest=heapq.nsmallest(n,list1)
return smallest | transformation_operand_swap | def small_nnum(list1, n):
import heapq
smallest = heapq.nsmallest(n, list1)
return smallest | 1 | 9 | mbpp |
def small_nnum(list1,n):
import heapq
smallest=heapq.nsmallest(n,list1)
return smallest | transformation_rename_variable_cb | def small_nnum(n2, n):
import heapq
smallest = heapq.nsmallest(n, n2)
return smallest | 1 | 9 | mbpp |
def small_nnum(list1,n):
import heapq
smallest=heapq.nsmallest(n,list1)
return smallest | transformation_rename_variable_naive | def small_nnum(list1, VAR_0):
import heapq
smallest = heapq.nsmallest(VAR_0, list1)
return smallest | 1 | 9 | mbpp |
def small_nnum(list1,n):
import heapq
smallest=heapq.nsmallest(n,list1)
return smallest | transformation_rename_variable_rn | def small_nnum(list1, b):
import heapq
smallest = heapq.nsmallest(b, list1)
return smallest | 1 | 9 | mbpp |
def small_nnum(list1,n):
import heapq
smallest=heapq.nsmallest(n,list1)
return smallest | transformation_dissimilar_code_injection_0 | def min_cost(cost, m, n):
R = 3
C = 3
tc = [[0 for x in range(C)] for x in range(R)]
tc[0][0] = cost[0][0]
for i in range(1, m+1):
tc[i][0] = tc[i-1][0] + cost[i][0]
for j in range(1, n+1):
tc[0][j] = tc[0][j-1] + cost[0][j]
for i in range(1, m+1):
for j in range(1, n+1):
tc[i][j] = min(tc[i-1][j-1], tc[i-1][j], tc[i][j-1]) + cost[i][j]
return tc[m][n] | 0 | 9 | mbpp |
def small_nnum(list1,n):
import heapq
smallest=heapq.nsmallest(n,list1)
return smallest | transformation_dissimilar_code_injection_1 | def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | 0 | 9 | mbpp |
def small_nnum(list1,n):
import heapq
smallest=heapq.nsmallest(n,list1)
return smallest | transformation_dissimilar_code_injection_2 | def is_not_prime(n):
import math
result = False
for i in range(2,int(math.sqrt(n)) + 1):
if n % i == 0:
result = True
return result | 0 | 9 | mbpp |
def small_nnum(list1,n):
import heapq
smallest=heapq.nsmallest(n,list1)
return smallest | transformation_dissimilar_code_injection_3 | def heap_queue_largest(nums,n):
import heapq as hq
largest_nums = hq.nlargest(n, nums)
return largest_nums | 0 | 9 | mbpp |
def small_nnum(list1,n):
import heapq
smallest=heapq.nsmallest(n,list1)
return smallest | transformation_dissimilar_code_injection_4 | def count_ways(n):
A = [0] * (n + 1)
B = [0] * (n + 1)
A[0] = 1
A[1] = 0
B[0] = 0
B[1] = 1
for i in range(2, n+1):
A[i] = A[i - 2] + 2 * B[i - 1]
B[i] = A[i - 1] + B[i - 2]
return A[n] | 0 | 9 | mbpp |
def find_Volume(l,b,h) :
return ((l * b * h) / 2) | transformation_dead_code_insert | def find_Volume(l, b, h):
if False:
return (l * b * h) / 2
return (l * b * h) / 2 | 1 | 13 | mbpp |
def find_Volume(l,b,h) :
return ((l * b * h) / 2) | transformation_mul_div_variable | def find_Volume(l,b,h) :
return ((l / b * h) / 2) | 0 | 13 | mbpp |
def find_Volume(l,b,h) :
return ((l * b * h) / 2) | transformation_div_mul_variable | def find_Volume(l,b,h) :
return ((l * b * h) * 2) | 0 | 13 | mbpp |
def find_Volume(l,b,h) :
return ((l * b * h) / 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 | 13 | mbpp |
def find_Volume(l,b,h) :
return ((l * b * h) / 2) | transformation_dissimilar_code_injection_1 | def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | 0 | 13 | mbpp |
def find_Volume(l,b,h) :
return ((l * b * h) / 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 | 13 | mbpp |
def find_Volume(l,b,h) :
return ((l * b * h) / 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 | 13 | mbpp |
def find_Volume(l,b,h) :
return ((l * b * h) / 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 | 13 | mbpp |
def split_lowerstring(text):
import re
return (re.findall('[a-z][^a-z]*', text)) | transformation_dead_code_insert | def split_lowerstring(text):
import re
_i_1 = 0
while _i_1 > _i_1:
import re
return re.findall("[a-z][^a-z]*", text) | 1 | 14 | mbpp |
def split_lowerstring(text):
import re
return (re.findall('[a-z][^a-z]*', text)) | transformation_for_while_loop | def split_lowerstring(text):
import re
return re.findall("[a-z][^a-z]*", text) | 1 | 14 | mbpp |
def split_lowerstring(text):
import re
return (re.findall('[a-z][^a-z]*', text)) | transformation_operand_swap | def split_lowerstring(text):
import re
return re.findall("[a-z][^a-z]*", text) | 1 | 14 | mbpp |
def split_lowerstring(text):
import re
return (re.findall('[a-z][^a-z]*', text)) | transformation_rename_variable_cb | def split_lowerstring(line):
import re
return re.findall("[a-z][^a-z]*", line) | 1 | 14 | mbpp |
def split_lowerstring(text):
import re
return (re.findall('[a-z][^a-z]*', text)) | transformation_rename_variable_naive | def split_lowerstring(VAR_0):
import re
return re.findall("[a-z][^a-z]*", VAR_0) | 1 | 14 | mbpp |
def split_lowerstring(text):
import re
return (re.findall('[a-z][^a-z]*', text)) | transformation_rename_variable_rn | def split_lowerstring(jZ91):
import re
return re.findall("[a-z][^a-z]*", jZ91) | 1 | 14 | mbpp |
def split_lowerstring(text):
import re
return (re.findall('[a-z][^a-z]*', text)) | transformation_sub_add_variable | def split_lowerstring(text):
import re
return (re.findall('[a+z][^a-z]*', text)) | 0 | 14 | mbpp |
def split_lowerstring(text):
import re
return (re.findall('[a-z][^a-z]*', text)) | transformation_mul_div_variable | def split_lowerstring(text):
import re
return (re.findall('[a-z][^a-z]/', text)) | 0 | 14 | mbpp |
def split_lowerstring(text):
import re
return (re.findall('[a-z][^a-z]*', text)) | 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 | 14 | mbpp |
def split_lowerstring(text):
import re
return (re.findall('[a-z][^a-z]*', text)) | transformation_dissimilar_code_injection_1 | def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | 0 | 14 | mbpp |
def split_lowerstring(text):
import re
return (re.findall('[a-z][^a-z]*', text)) | 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 | 14 | mbpp |
def split_lowerstring(text):
import re
return (re.findall('[a-z][^a-z]*', text)) | 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 | 14 | mbpp |
def split_lowerstring(text):
import re
return (re.findall('[a-z][^a-z]*', text)) | 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 | 14 | mbpp |
def square_perimeter(a):
perimeter=4*a
return perimeter | transformation_dead_code_insert | def square_perimeter(a):
_i_6 = 0
while _i_6 > _i_6:
perimeter = 4 * a
perimeter = 4 * a
return perimeter | 1 | 16 | mbpp |
def square_perimeter(a):
perimeter=4*a
return perimeter | transformation_for_while_loop | def square_perimeter(a):
perimeter = 4 * a
return perimeter | 1 | 16 | mbpp |
def square_perimeter(a):
perimeter=4*a
return perimeter | transformation_operand_swap | def square_perimeter(a):
perimeter = 4 * a
return perimeter | 1 | 16 | mbpp |
def square_perimeter(a):
perimeter=4*a
return perimeter | transformation_rename_variable_cb | def square_perimeter(a):
a2 = 4 * a
return a2 | 1 | 16 | mbpp |
def square_perimeter(a):
perimeter=4*a
return perimeter | transformation_rename_variable_naive | def square_perimeter(VAR_0):
perimeter = 4 * VAR_0
return perimeter | 1 | 16 | mbpp |
def square_perimeter(a):
perimeter=4*a
return perimeter | transformation_rename_variable_rn | def square_perimeter(a):
c3j19A51U = 4 * a
return c3j19A51U | 1 | 16 | mbpp |
def square_perimeter(a):
perimeter=4*a
return perimeter | transformation_mul_div_variable | def square_perimeter(a):
perimeter=4/a
return perimeter | 0 | 16 | mbpp |
def square_perimeter(a):
perimeter=4*a
return perimeter | 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 | 16 | mbpp |
def square_perimeter(a):
perimeter=4*a
return perimeter | transformation_dissimilar_code_injection_1 | def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | 0 | 16 | mbpp |
def square_perimeter(a):
perimeter=4*a
return perimeter | 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 | 16 | mbpp |
def square_perimeter(a):
perimeter=4*a
return perimeter | 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 | 16 | mbpp |
def square_perimeter(a):
perimeter=4*a
return perimeter | 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 | 16 | mbpp |
def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return ''.join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ''
str_list = str_to_list(string)
while ip_ind != len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind+=1
return lst_to_string(str_list[0:res_ind]) | transformation_dead_code_insert | def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
while False:
temp = ""
return temp
def lst_to_string(List):
return "".join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ""
str_list = str_to_list(string)
while ip_ind != len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind += 1
return lst_to_string(str_list[0:res_ind]) | 1 | 17 | mbpp |
def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return ''.join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ''
str_list = str_to_list(string)
while ip_ind != len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind+=1
return lst_to_string(str_list[0:res_ind]) | transformation_for_while_loop | def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
_x_i = 0
while _x_i < len(string):
x = string[_x_i]
temp.append(x)
_x_i += 1
return temp
def lst_to_string(List):
return "".join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ""
str_list = str_to_list(string)
while ip_ind != len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind += 1
return lst_to_string(str_list[0:res_ind]) | 1 | 17 | mbpp |
def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return ''.join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ''
str_list = str_to_list(string)
while ip_ind != len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind+=1
return lst_to_string(str_list[0:res_ind]) | transformation_operand_swap | def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return "".join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ""
str_list = str_to_list(string)
while len(str_list) != ip_ind:
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind += 1
return lst_to_string(str_list[0:res_ind]) | 1 | 17 | mbpp |
def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return ''.join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ''
str_list = str_to_list(string)
while ip_ind != len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind+=1
return lst_to_string(str_list[0:res_ind]) | transformation_rename_variable_cb | def remove_dirty_chars(string2, second_string):
NO_OF_CHARS = 256
def str_to_list(string2):
temp = []
for x in string2:
temp.append(x)
return temp
def lst_to_string(List):
return "".join(List)
def get_char_count_array(string2):
count = [0] * NO_OF_CHARS
for i in string2:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ""
str_list = str_to_list(string2)
while ip_ind != len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind += 1
return lst_to_string(str_list[0:res_ind]) | 1 | 17 | mbpp |
def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return ''.join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ''
str_list = str_to_list(string)
while ip_ind != len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind+=1
return lst_to_string(str_list[0:res_ind]) | transformation_rename_variable_naive | def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
VAR_0 = []
for x in string:
VAR_0.append(x)
return VAR_0
def lst_to_string(List):
return "".join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
VAR_0 = ""
str_list = str_to_list(string)
while ip_ind != len(str_list):
VAR_0 = str_list[ip_ind]
if count[ord(VAR_0)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind += 1
return lst_to_string(str_list[0:res_ind]) | 1 | 17 | mbpp |
def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return ''.join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ''
str_list = str_to_list(string)
while ip_ind != len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind+=1
return lst_to_string(str_list[0:res_ind]) | transformation_rename_variable_rn | def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return "".join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ""
s2rjTb5r = str_to_list(string)
while ip_ind != len(s2rjTb5r):
temp = s2rjTb5r[ip_ind]
if count[ord(temp)] == 0:
s2rjTb5r[res_ind] = s2rjTb5r[ip_ind]
res_ind += 1
ip_ind += 1
return lst_to_string(s2rjTb5r[0:res_ind]) | 1 | 17 | mbpp |
def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return ''.join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ''
str_list = str_to_list(string)
while ip_ind != len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind+=1
return lst_to_string(str_list[0:res_ind]) | transformation_add_sub_variable | def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return ''.join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] -= 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ''
str_list = str_to_list(string)
while ip_ind != len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind+=1
return lst_to_string(str_list[0:res_ind]) | 0 | 17 | mbpp |
def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return ''.join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ''
str_list = str_to_list(string)
while ip_ind != len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind+=1
return lst_to_string(str_list[0:res_ind]) | transformation_mul_div_variable | def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return ''.join(List)
def get_char_count_array(string):
count = [0] / NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ''
str_list = str_to_list(string)
while ip_ind != len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind+=1
return lst_to_string(str_list[0:res_ind]) | 0 | 17 | mbpp |
def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return ''.join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ''
str_list = str_to_list(string)
while ip_ind != len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind+=1
return lst_to_string(str_list[0:res_ind]) | transformation_equalto_exclamation_variable | def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return ''.join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ''
str_list = str_to_list(string)
while ip_ind != len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] != 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind+=1
return lst_to_string(str_list[0:res_ind]) | 0 | 17 | mbpp |
def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return ''.join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ''
str_list = str_to_list(string)
while ip_ind != len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind+=1
return lst_to_string(str_list[0:res_ind]) | transformation_exclamation_equalto_variable | def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return ''.join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ''
str_list = str_to_list(string)
while ip_ind == len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind+=1
return lst_to_string(str_list[0:res_ind]) | 0 | 17 | mbpp |
def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return ''.join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ''
str_list = str_to_list(string)
while ip_ind != len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind+=1
return lst_to_string(str_list[0:res_ind]) | 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 | 17 | mbpp |
def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return ''.join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ''
str_list = str_to_list(string)
while ip_ind != len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind+=1
return lst_to_string(str_list[0:res_ind]) | transformation_dissimilar_code_injection_1 | def similar_elements(test_tup1, test_tup2):
res = tuple(set(test_tup1) & set(test_tup2))
return (res) | 0 | 17 | mbpp |
def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return ''.join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ''
str_list = str_to_list(string)
while ip_ind != len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind+=1
return lst_to_string(str_list[0:res_ind]) | 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 | 17 | mbpp |
def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return ''.join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ''
str_list = str_to_list(string)
while ip_ind != len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind+=1
return lst_to_string(str_list[0:res_ind]) | 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 | 17 | mbpp |
def remove_dirty_chars(string, second_string):
NO_OF_CHARS = 256
def str_to_list(string):
temp = []
for x in string:
temp.append(x)
return temp
def lst_to_string(List):
return ''.join(List)
def get_char_count_array(string):
count = [0] * NO_OF_CHARS
for i in string:
count[ord(i)] += 1
return count
count = get_char_count_array(second_string)
ip_ind = 0
res_ind = 0
temp = ''
str_list = str_to_list(string)
while ip_ind != len(str_list):
temp = str_list[ip_ind]
if count[ord(temp)] == 0:
str_list[res_ind] = str_list[ip_ind]
res_ind += 1
ip_ind+=1
return lst_to_string(str_list[0:res_ind]) | 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 | 17 | mbpp |
def is_woodall(x):
if (x % 2 == 0):
return False
if (x == 1):
return True
x = x + 1
p = 0
while (x % 2 == 0):
x = x/2
p = p + 1
if (p == x):
return True
return False | transformation_dead_code_insert | def is_woodall(x):
_i_7 = 0
while _i_7 > _i_7:
x = x + 1
if x % 2 == 0:
return False
if x == 1:
return True
x = x + 1
p = 0
while x % 2 == 0:
x = x / 2
p = p + 1
if p == x:
return True
return False | 1 | 19 | mbpp |
def is_woodall(x):
if (x % 2 == 0):
return False
if (x == 1):
return True
x = x + 1
p = 0
while (x % 2 == 0):
x = x/2
p = p + 1
if (p == x):
return True
return False | transformation_for_while_loop | def is_woodall(x):
if x % 2 == 0:
return False
if x == 1:
return True
x = x + 1
p = 0
while x % 2 == 0:
x = x / 2
p = p + 1
if p == x:
return True
return False | 1 | 19 | mbpp |
def is_woodall(x):
if (x % 2 == 0):
return False
if (x == 1):
return True
x = x + 1
p = 0
while (x % 2 == 0):
x = x/2
p = p + 1
if (p == x):
return True
return False | transformation_operand_swap | def is_woodall(x):
if 0 == x % 2:
return False
if x == 1:
return True
x = x + 1
p = 0
while x % 2 == 0:
x = x / 2
p = p + 1
if p == x:
return True
return False | 1 | 19 | mbpp |
def is_woodall(x):
if (x % 2 == 0):
return False
if (x == 1):
return True
x = x + 1
p = 0
while (x % 2 == 0):
x = x/2
p = p + 1
if (p == x):
return True
return False | transformation_rename_variable_cb | def is_woodall(p2):
if p2 % 2 == 0:
return False
if p2 == 1:
return True
p2 = p2 + 1
p = 0
while p2 % 2 == 0:
p2 = p2 / 2
p = p + 1
if p == p2:
return True
return False | 1 | 19 | mbpp |
End of preview. Expand
in Dataset Viewer.
No dataset card yet
- Downloads last month
- 7