1fffcec16578e6bea8de6e685632b3f56713a438,explainshell/matcher.py,matcher,_mergeadjacent,#matcher#Any#,233
Before Change
def _mergeadjacent(self, matches):
merged = []
resultindex = self._resultindex()
it = util.peekable(iter(matches))
curr = it.next()
while it.hasnext():
next = it.peek()
After Change
if len(l) == 1:
merged.append(l[0])
else:
start = l[0].start
end = l[-1].end
endindex = resultindex[l[-1]]
for mr in l:
del resultindex[mr]
merged.append(matchresult(start, end, text, None))
resultindex[merged[-1]] = endindex
return merged
def _mergeunknowns(self, matches):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: idank/explainshell
Commit Name: 1fffcec16578e6bea8de6e685632b3f56713a438
Time: 2013-09-07
Author: idankk86@gmail.com
File Name: explainshell/matcher.py
Class Name: matcher
Method Name: _mergeadjacent
Project Name: PetrochukM/PyTorch-NLP
Commit Name: dd2eaf6c174fdd757514bc06d1063e5f9c6bb4a0
Time: 2019-10-20
Author: petrochukm@gmail.com
File Name: torchnlp/samplers/noisy_sorted_sampler.py
Class Name: NoisySortedSampler
Method Name: __iter__
Project Name: HyperGAN/HyperGAN
Commit Name: ea34be9141bf10ed59737dab9c5f64f42cbcb23e
Time: 2020-02-07
Author: mikkel@255bits.com
File Name: hypergan/inputs/image_loader.py
Class Name: ImageLoader
Method Name: image_folder_create