a1383be585a1798a3333139c4c1be149d3c5a454,padatious/util.py,,resolve_conflicts,#,128
Before Change
new_in, new_out = [], []
for i, inp in enumerate(inputs):
found_duplicate = False
for j in range(i + 1, len(inputs) ):
if inp == inputs[j]:
found_duplicate = True
if outputs[i] > outputs[j]:
outputs[j] = outputs[i]
if not found_duplicate:
new_in.append(inputs[i])
new_out.append(outputs[i])
return new_in, new_out
After Change
data = {}
for inp, out in zip(inputs, outputs):
tup = tuple(inp)
if tup in data:
data[tup].append(out)
else:
data[tup] = [out]
inputs, outputs = [], []
for inp, outs in data.items():
inputs.append(list(inp))
outputs.append(np.maximum.reduce(outs))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: MycroftAI/padatious
Commit Name: a1383be585a1798a3333139c4c1be149d3c5a454
Time: 2017-09-15
Author: matthew3311999@gmail.com
File Name: padatious/util.py
Class Name:
Method Name: resolve_conflicts
Project Name: MycroftAI/padatious
Commit Name: a1383be585a1798a3333139c4c1be149d3c5a454
Time: 2017-09-15
Author: matthew3311999@gmail.com
File Name: padatious/util.py
Class Name:
Method Name: resolve_conflicts
Project Name: Esri/raster-functions
Commit Name: 6b642c8e0fa07c971a89e4fb70bdf539b04042cc
Time: 2015-05-25
Author: rsumbaly@esri.com
File Name: functions/KeyMetadata.py
Class Name: KeyMetadata
Method Name: updateKeyMetadata
Project Name: google/language-resources
Commit Name: edd74909eb1cef75e88e50af6fee48bb6615b7fb
Time: 2016-05-26
Author: mjansche@google.com
File Name: my/tokenize.py
Class Name:
Method Name: main