id
stringlengths
35
39
content
stringlengths
44
3.85k
max_stars_repo_path
stringlengths
52
57
refactory_data_question_3_correct_3_054
def remove_extras(lst): result = [] for elem in lst: if elem not in result: result.append(elem) return result
./refactory/data/question_3/code/correct/correct_3_054.py
refactory_data_question_3_correct_3_124
def remove_extras(lst): newlst=[] for i in lst: if i not in newlst: newlst+= [i,] return newlst
./refactory/data/question_3/code/correct/correct_3_124.py
refactory_data_question_3_correct_3_050
def remove_extras(lst): result = [] for i in lst: if i not in result: result += [i] return result
./refactory/data/question_3/code/correct/correct_3_050.py
refactory_data_question_3_correct_3_443
def remove_extras(lst): new_lst = [] for i in lst: if i not in new_lst: new_lst.append(i) return new_lst
./refactory/data/question_3/code/correct/correct_3_443.py
refactory_data_question_3_correct_3_114
def remove_extras(values): output = [] for value in values: if value not in output: output.append(value) return output
./refactory/data/question_3/code/correct/correct_3_114.py
refactory_data_question_3_correct_3_488
def remove_extras(lst): new_list = [] for i in lst: if i not in new_list: new_list.append(i) return new_list
./refactory/data/question_3/code/correct/correct_3_488.py
refactory_data_question_3_correct_3_283
def remove_extras(lst): # your code here out = [] for ele in lst: if not ele in out: out.append(ele) return out
./refactory/data/question_3/code/correct/correct_3_283.py
refactory_data_question_3_correct_3_462
def remove_extras(lst): newlist = [] for element in lst: if newlist.count(element)==0: newlist.append(element) return newlist pass
./refactory/data/question_3/code/correct/correct_3_462.py
refactory_data_question_3_wrong_3_029
def remove_extras(lst): for i in lst: remove_mutiple(i, lst) return lst def remove_multiple(n, lst): if lst.count(n) == 1: return lst else: lst.reverse() lst.remove(n) lst.reverse() return remove_multiple(n, lst)
./refactory/data/question_3/code/fail/wrong_3_029.py
refactory_data_question_3_wrong_3_245
def remove_extras(lst): i=1 while True: if lst[i] in lst[:i]: del lst[i] continue if lst[i]==lst[-1]: break i=i+1 return lst
./refactory/data/question_3/code/fail/wrong_3_245.py
refactory_data_question_3_wrong_3_012
def remove_extras(lst): result = [] for i in lst and not result: result += result + i return result
./refactory/data/question_3/code/fail/wrong_3_012.py
refactory_data_question_3_wrong_3_021
def remove_extras(lst): i = 0 while i < len(lst): j = i + 1 while j < len(lst): if lst[i] == lst[j]: lst = lst[:j] + lst[j+1:] j += 1 i += 1 return lst
./refactory/data/question_3/code/fail/wrong_3_021.py
refactory_data_question_3_wrong_3_290
def remove_extras(lst): new_list=[] for e in lst: if not is_same(element,new_list): new_list.append(element) else: continue return new_list def is_same(test,lst): for e in lst: if e == test: return True else: continue return False
./refactory/data/question_3/code/fail/wrong_3_290.py
refactory_data_question_3_wrong_3_192
def remove_extras(lst): count=0 rev_lst=lst.reverse() ori_len=len(lst) for i in range(ori_len): if rev_lst[i] in rev_lst[i+1:]: lst.pop(ori_len-i-1) return lst
./refactory/data/question_3/code/fail/wrong_3_192.py
refactory_data_question_3_wrong_3_020
def remove_extras(lst): i = 0 while i < len(lst): j = i + 1 while j < len(lst): if lst[i] == lst[j]: lst = lst[:j] + lst[j+1:] j += 1 return lst
./refactory/data/question_3/code/fail/wrong_3_020.py
refactory_data_question_3_wrong_3_189
def remove_extras(lst): for i in lst: lst.remove(i) lst.remove(i) return lst
./refactory/data/question_3/code/fail/wrong_3_189.py
refactory_data_question_3_reference
def remove_extras(lst): newlist = [] for i in lst: if i not in newlist: newlist.append(i) return newlist
./refactory/data/question_3/code/reference/reference.py
refactory_data_question_3_wrong_3_246
def remove_extras(lst): i=1 while i!=len(lst): if lst[i] in lst[:i]: del lst[i] continue i+=1 return lst
./refactory/data/question_3/code/wrong/wrong_3_246.py
refactory_data_question_3_wrong_3_239
def remove_extras(lst): l=len(lst) for i in range(l-1): for j in range(i+1,l): if lst[i]==lst[j]: del lst[j] return lst
./refactory/data/question_3/code/wrong/wrong_3_239.py
refactory_data_question_3_wrong_3_298
def remove_extras(lst): new = [] x = 0 for x in range(len(lst)): if lst[x] in new: new += [lst[x]] else: continue return new
./refactory/data/question_3/code/wrong/wrong_3_298.py
refactory_data_question_3_wrong_3_194
def remove_extras(lst): new_list = [] for item in lst: if item not in new_list: new_list.append.item return new_list
./refactory/data/question_3/code/wrong/wrong_3_194.py
refactory_data_question_3_wrong_3_196
def remove_extras(lst): new_lst = [] for i in lst: if i not in new_lst: new_lst = new_lst + i else: continue return new_lst
./refactory/data/question_3/code/wrong/wrong_3_196.py
refactory_data_question_3_wrong_3_104
def remove_extras(lst): a = [] for i in lst: if i not in a: a.append(i) return i
./refactory/data/question_3/code/wrong/wrong_3_104.py
refactory_data_question_3_wrong_3_031
def remove_extras(lst): return list(set(lst))
./refactory/data/question_3/code/wrong/wrong_3_031.py
refactory_data_question_3_wrong_3_046
def remove_extras(lst): a = [] for i in lst: if i not in a: a += i return a
./refactory/data/question_3/code/wrong/wrong_3_046.py
refactory_data_question_3_wrong_3_102
def remove_extras(lst): # your code here lst.reverse() for item in lst: while lst.count(item) != 1: lst.remove(item) lst.reverse return lst
./refactory/data/question_3/code/wrong/wrong_3_102.py
refactory_data_question_3_wrong_3_124
def remove_extras(lst): seq = (lst[0],) for i in lst: if i not in seq: seq = seq + (i,) return seq
./refactory/data/question_3/code/wrong/wrong_3_124.py
refactory_data_question_3_wrong_3_096
def remove_extras(lst): result = [] for i in lst: if i not in result: result = result + i return result # your code here pass
./refactory/data/question_3/code/wrong/wrong_3_096.py
refactory_data_question_3_wrong_3_075
def remove_extras(lst): lst.reverse() for element in lst: if lst.count(element)>1: lst.remove(element) return lst.reverse()
./refactory/data/question_3/code/wrong/wrong_3_075.py
refactory_data_question_3_wrong_3_299
def remove_extras(lst): a=[] for i in lst: if i not in a: a+=i return a
./refactory/data/question_3/code/wrong/wrong_3_299.py
refactory_data_question_3_wrong_3_243
def remove_extras(lst): new_list=[list[0]] for i in lst: if i in new_list: continue else: new_list.append(i) return new_list
./refactory/data/question_3/code/wrong/wrong_3_243.py
refactory_data_question_3_wrong_3_272
def remove_extras(lst): result = lst[0] for e in lst: if e not in result: result += (e,) return result
./refactory/data/question_3/code/wrong/wrong_3_272.py
refactory_data_question_3_wrong_3_235
def remove_extras(lst): newseq = [] for element in lst: if element not in newseq: newseq += [n] return newseq
./refactory/data/question_3/code/wrong/wrong_3_235.py
refactory_data_question_3_wrong_3_147
def remove_extras(lst): for i in lst: if lst.count(i)>1: lst.remove(i) return lst
./refactory/data/question_3/code/wrong/wrong_3_147.py
refactory_data_question_3_wrong_3_193
def remove_extras(lst): count=0 rev_lst=lst.reverse() ori_len=len(lst) new_lst=lst.copy() for i in range(ori_len): if rev_lst[i] in rev_lst[i+1:]: new_lst.pop(ori_len-i-1) return new_lst
./refactory/data/question_3/code/wrong/wrong_3_193.py
refactory_data_question_3_wrong_3_226
def remove_extras(lst): for i in range(0, len(lst)-2): num = lst[i] if lst.count(num) > 1: lst.pop(i) return lst
./refactory/data/question_3/code/wrong/wrong_3_226.py
refactory_data_question_3_wrong_3_293
def remove_extras(lst): keep = [] remove = [] for i in lst : if i not in keep : keep.append(i) elif i in keep : remove.append(i) for i in remove : lst.remove(i) return lst pass
./refactory/data/question_3/code/wrong/wrong_3_293.py
refactory_data_question_3_wrong_3_027
def remove_extras(lst): result = [] counter = 0 while counter < len(lst): for i in lst[1:]: if lst[counter] == i: lst = ((lst.reverse()).remove(i)).reverse() counter = counter + 1 return lst
./refactory/data/question_3/code/wrong/wrong_3_027.py
refactory_data_question_3_wrong_3_286
def remove_extras(lst): for element in lst: while lst.count(element) > 1: lst.remove(element) if lst.count(element) == 1: break return lst
./refactory/data/question_3/code/wrong/wrong_3_286.py
refactory_data_question_3_wrong_3_133
def remove_extras(lst): i = -1 while i > (-len(lst)): if lst[i] in lst[:i]: lst.pop(i) i = i - 1 return lst
./refactory/data/question_3/code/wrong/wrong_3_133.py
refactory_data_question_3_wrong_3_228
def remove_extras(lst): for i in lst: if lst.count(i) > 1: lst.reverse.remove(i).reverse return lst
./refactory/data/question_3/code/wrong/wrong_3_228.py
refactory_data_question_3_wrong_3_112
def remove_extras(lst): answer = [] for i in lst: for a in answer: if i == a: break answer += i return answer
./refactory/data/question_3/code/wrong/wrong_3_112.py
refactory_data_question_3_wrong_3_170
def remove_extras(lst): a = [] for repeat in range(len(lst) + 1): if repeat not in a: a += [repeat,] return a
./refactory/data/question_3/code/wrong/wrong_3_170.py
refactory_data_question_3_wrong_3_268
def remove_extras(lst): return list(OrderedDict.fromkeys(lst))
./refactory/data/question_3/code/wrong/wrong_3_268.py
refactory_data_question_3_wrong_3_152
def remove_extras(lst): result = [] for ele in lst: if x not in result: result += x return result
./refactory/data/question_3/code/wrong/wrong_3_152.py
refactory_data_question_3_wrong_3_209
def remove_extras(lst): lst.sort() i = 1 n = len(lst) while i < n: if lst[i]==lst[i-1]: lst.pop(i) else: i += 1 n = len(lst) return lst pass
./refactory/data/question_3/code/wrong/wrong_3_209.py
refactory_data_question_3_wrong_3_100
def remove_extras(lst): # your code here lst.reverse() for item in lst: while lst.count(item) != 1: lst.remove(item) print(lst) return lst
./refactory/data/question_3/code/wrong/wrong_3_100.py
refactory_data_question_3_wrong_3_248
def remove_extras(lst): newLst=[] hashtable=[] for i in lst: if hashtable[lst[i]]!=1: hasttable[lst[i]]=1 newLst.append(lst[i]) return newLst
./refactory/data/question_3/code/wrong/wrong_3_248.py
refactory_data_question_3_wrong_3_073
def remove_extras(lst): return list(set(lst))
./refactory/data/question_3/code/wrong/wrong_3_073.py
refactory_data_question_3_wrong_3_305
def remove_extras(lst): new_lst = [] for i in lst: if i not in new_lst: new_list.append(i) return new_lst
./refactory/data/question_3/code/wrong/wrong_3_305.py
refactory_data_question_3_wrong_3_016
def remove_extras(lst): lst.reverse() for i in lst: if lst.count(i) >1: j = 0 while j < i: lst.remove(i) j += 1 lst.reverse() return lst
./refactory/data/question_3/code/wrong/wrong_3_016.py
refactory_data_question_3_wrong_3_002
def remove_extras(lst): # your code here occurrences = () new_lst = [] for item in lst: if item not in occurrences: occurences += (item,) new_list.append(item) return new_lst
./refactory/data/question_3/code/wrong/wrong_3_002.py
refactory_data_question_3_wrong_3_101
def remove_extras(lst): # your code here lst.reverse() for item in lst: while lst.count(item) != 1: lst.remove(item) return lst
./refactory/data/question_3/code/wrong/wrong_3_101.py
refactory_data_question_3_wrong_3_032
def remove_extras(lst): for i in lst: if i not in sumx: sumx.append(i) return sumx
./refactory/data/question_3/code/wrong/wrong_3_032.py
refactory_data_question_3_wrong_3_301
def remove_extras(lst): n=len(lst) for i in lst: counter = 1 number_of_appearance = 0 while counter <= n: if i == lst[counter-1]: counter += 1 number_of_appearance += 1 else: counter += 1 while number_of_appearance != 1: lst.remove(i) number_of_appearance -= 1 return lst
./refactory/data/question_3/code/wrong/wrong_3_301.py
refactory_data_question_3_wrong_3_164
def remove_extras(lst): new = [] for i in lst: if i not in new: new += i return new
./refactory/data/question_3/code/wrong/wrong_3_164.py
refactory_data_question_3_wrong_3_074
def remove_extras(lst): result = [] for i in lst: if i not in result: result += i return result
./refactory/data/question_3/code/wrong/wrong_3_074.py
refactory_data_question_3_wrong_3_072
def remove_extras(lst): newlst = [] for i in lst: if i not in newlst: newlst = newlst.append(i) return newlst
./refactory/data/question_3/code/wrong/wrong_3_072.py
refactory_data_question_3_wrong_3_247
def remove_extras(lst): new_lst = [] for i in range(len(lst)): if lst[i] != new_lst: new_lst += lst[i] return new_lst # your code here pass
./refactory/data/question_3/code/wrong/wrong_3_247.py
refactory_data_question_3_wrong_3_069
def remove_extras(lst): remove_lst = [] for i in lst: if i not in lst: remove_lst.append(i) return remove_lst
./refactory/data/question_3/code/wrong/wrong_3_069.py
refactory_data_question_3_wrong_3_185
def remove_extras(lst): removed = [] for e in lst: if (e in lst) and (e not in removed): removed = removed.append(e) return removed
./refactory/data/question_3/code/wrong/wrong_3_185.py
refactory_data_question_3_wrong_3_240
def remove_extras(mylist): for i in mylist: if i not in newlist: newlist.append(i) return newlist
./refactory/data/question_3/code/wrong/wrong_3_240.py
refactory_data_question_3_wrong_3_205
def remove_extras(lst): for i in lst: for j in lst[0:i]: if i == j: remove.lst(lst[i]) else: continue return lst pass
./refactory/data/question_3/code/wrong/wrong_3_205.py
refactory_data_question_3_wrong_3_098
def remove_extras(lst): for element in lst: if element in lst.remove(element): lst = lst.remove(element) else: lst return lst pass
./refactory/data/question_3/code/wrong/wrong_3_098.py
refactory_data_question_3_wrong_3_054
def remove_extras(lst): new_lst = [] for lst in new_lst: if i not in lst: new_lst += [i,] return new_lst pass
./refactory/data/question_3/code/wrong/wrong_3_054.py
refactory_data_question_3_wrong_3_051
def remove_extras(lst): i = -1 while i > (-len(lst)): if lst[i] in lst[:i]: del lst[i] i = i + 1 return lst
./refactory/data/question_3/code/wrong/wrong_3_051.py
refactory_data_question_3_wrong_3_060
def remove_extras(lst): return list(set(lst))
./refactory/data/question_3/code/wrong/wrong_3_060.py
refactory_data_question_3_wrong_3_263
def remove_extras(lst): lst.sort() i = len(lst)-1 while i > 0: if lst[i]==lst[i - 1]: lst.pop(i) i-=1 return lst
./refactory/data/question_3/code/wrong/wrong_3_263.py
refactory_data_question_3_wrong_3_163
def remove_extras(lst): new_lst = [] for i in lst: if i not in new_lst: new_lst += i return new_lst
./refactory/data/question_3/code/wrong/wrong_3_163.py
refactory_data_question_3_wrong_3_141
def remove_extras(lst): result = [] for i in range(len(lst)): if lst[i] not in result: result += lst[i] continue return result
./refactory/data/question_3/code/wrong/wrong_3_141.py
refactory_data_question_3_wrong_3_283
def remove_extras(lst): return set(lst)
./refactory/data/question_3/code/wrong/wrong_3_283.py
refactory_data_question_3_wrong_3_106
def remove_extras(lst): # your code here result = (lst[0],) count = 0 for item in lst[1:]: if item == result[count]: count += 1 else: result +=(item,) count +=1 return result
./refactory/data/question_3/code/wrong/wrong_3_106.py
refactory_data_question_3_wrong_3_086
def remove_extras(lst): result = () for i in lst: if i not in result: result = result + (i,) else: continue return result
./refactory/data/question_3/code/wrong/wrong_3_086.py
refactory_data_question_3_wrong_3_184
def remove_extras(lst): removed = [] for e in lst: if e not in lst: removed = removed.append(e) return removed
./refactory/data/question_3/code/wrong/wrong_3_184.py
refactory_data_question_3_wrong_3_308
def remove_extras(lst): t=[] for i in lst: if i not in t: t.append(i) else: return t
./refactory/data/question_3/code/wrong/wrong_3_308.py
refactory_data_question_3_wrong_3_156
def remove_extras(lst): new = [] for i in lst: if i not in new: new += i else: continue return new
./refactory/data/question_3/code/wrong/wrong_3_156.py
refactory_data_question_3_wrong_3_160
def remove_extras(lst): pst=[] for i in lst: if i not in pst: pst.extend(i) return pst
./refactory/data/question_3/code/wrong/wrong_3_160.py
refactory_data_question_3_wrong_3_155
def remove_extras(lst): result = [] for ele in lst: if ele not in result: result += ele return result
./refactory/data/question_3/code/wrong/wrong_3_155.py
refactory_data_question_3_wrong_3_225
def remove_extras(lst): for i in range(0, len(lst)-1): num = lst[i] if lst.count(num) > 1: lst.pop(i) return lst
./refactory/data/question_3/code/wrong/wrong_3_225.py
refactory_data_question_3_wrong_3_292
def remove_extras(lst): keep = [] remove = [] for i in lst : if i not in keep : keep.append(i) else : remove.append(i) for i in remove : lst.remove(i) return lst pass
./refactory/data/question_3/code/wrong/wrong_3_292.py
refactory_data_question_3_wrong_3_094
def remove_extras(lst): new = [] for i in lst: if i not in new: new += i else: continue return new
./refactory/data/question_3/code/wrong/wrong_3_094.py
refactory_data_question_3_wrong_3_059
def remove_extras(lst): lst_final = [] for i in lst: if i not in lst_final: lst_final = lst_final + i return lst_final
./refactory/data/question_3/code/wrong/wrong_3_059.py
refactory_data_question_3_wrong_3_029
def remove_extras(lst): for i in lst: remove_mutiple(i, lst) return lst def remove_multiple(n, lst): if lst.count(n) == 1: return lst else: lst.reverse() lst.remove(n) lst.reverse() return remove_multiple(n, lst)
./refactory/data/question_3/code/wrong/wrong_3_029.py
refactory_data_question_3_wrong_3_041
def remove_extras(lst): return list(set(lst)) # your code here pass
./refactory/data/question_3/code/wrong/wrong_3_041.py
refactory_data_question_3_wrong_3_083
def remove_extras(lst): list = [] for i in lst: if i not in list: list += lst[0] return lst
./refactory/data/question_3/code/wrong/wrong_3_083.py
refactory_data_question_3_wrong_3_172
def remove_extras(lst): for i in range(len(lst)): for j in range(len(lst[1:])): if lst[i] == lst[j]: del lst[j] return lst
./refactory/data/question_3/code/wrong/wrong_3_172.py
refactory_data_question_3_wrong_3_131
def remove_extras(lst): i = -1 while i < (-len(lst)): if lst[i] in lst[:i]: lst.pop(i) i = i - 1 return lst
./refactory/data/question_3/code/wrong/wrong_3_131.py
refactory_data_question_3_wrong_3_071
def remove_extras(lst): #find the repeated index n = len(lst) for i in range(n): for j in range(n): if lst[i] == lst[j] and i != j: a = lst[:j]+lst[n-j:] else: continue return a
./refactory/data/question_3/code/wrong/wrong_3_071.py
refactory_data_question_3_wrong_3_279
def remove_extras(lst): new_list = () for x in lst: if x not in new_list: new_list += (x) return new_list
./refactory/data/question_3/code/wrong/wrong_3_279.py
refactory_data_question_3_wrong_3_130
def remove_extras(lst): i = -1 while i < (-len(lst)): if lst[i] in lst[:i]: lst.pop[i] i = i - 1 return lst
./refactory/data/question_3/code/wrong/wrong_3_130.py
refactory_data_question_3_wrong_3_049
def remove_extras(lst): new = [] for x in lst: if lst.count(x) > 1: new += [] else: new += [x,] return new pass
./refactory/data/question_3/code/wrong/wrong_3_049.py
refactory_data_question_3_wrong_3_144
def remove_extras(lst): new_lst = [] for i in lst: new_lst += new_lst.append(i) if new_lst.count(i) > 1: new_lst.pop return new_lst
./refactory/data/question_3/code/wrong/wrong_3_144.py
refactory_data_question_3_wrong_3_277
def remove_extras(lst): if lst == []: return None else: result = [lst[0],] for e in lst: if e not in result: result.append(e) else: continue return result
./refactory/data/question_3/code/wrong/wrong_3_277.py
refactory_data_question_3_wrong_3_028
def remove_extras(lst): store = [] for ele in lst: if ele not in store: store += ele return store
./refactory/data/question_3/code/wrong/wrong_3_028.py
refactory_data_question_3_wrong_3_187
def remove_extras(lst): new_list = [] for elem in lst: if elem not in new: new_list += new.append(elem) else: new_list return new_list
./refactory/data/question_3/code/wrong/wrong_3_187.py
refactory_data_question_3_wrong_3_033
def remove_extras(lst): new_lst = [] for ele in lst: if not (ele in new_lst): new_lst += ele return new_lst
./refactory/data/question_3/code/wrong/wrong_3_033.py
refactory_data_question_3_wrong_3_091
def remove_extras(lst): result = [] for item in lst: if item not in result: item += result return result
./refactory/data/question_3/code/wrong/wrong_3_091.py
refactory_data_question_3_wrong_3_097
def remove_extras(lst): copy = lst.copy() for i in copy: if copy.count(i) > 1: left = lst[:copy.index(i)+1] right = lst[copy.index(i)+1:] right.remove(i) copy = left + right return copy
./refactory/data/question_3/code/wrong/wrong_3_097.py
refactory_data_question_3_wrong_3_244
def remove_extras(lst): new_list=[lst[0]] for i in lst: if i in new_list: continue else: new_list.append(i) return new_list
./refactory/data/question_3/code/wrong/wrong_3_244.py
refactory_data_question_3_wrong_3_175
def remove_extras(lst): for i in range(len(lst)): if lst[i] in lst[i+1:]: lst.pop(i) return lst
./refactory/data/question_3/code/wrong/wrong_3_175.py