defee23185b16afd836bad0a6cce7f791328666e,dipy/workflows/multi_io.py,IOIterator,file_existence_check,#IOIterator#Any#,270

Before Change



    def file_existence_check(self, args):
        // unpack variable string
        unpack_args = list(chain.from_iterable(args))
        input_args = [fname for fname in list(unpack_args)
                      if isinstance(fname, str)]
        for path in input_args:
            if len(glob(path)) == 0:
                raise IOError("File not found: " + path)

After Change


            if isinstance(fname, str):
                input_args.append(fname)
            // unpack variable string
            if isinstance(fname, list) and all(isinstance(s, str)
                                               for s in fname):
                input_args += [f for f in fname]
        for path in input_args:
            if len(glob(path)) == 0:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: nipy/dipy
Commit Name: defee23185b16afd836bad0a6cce7f791328666e
Time: 2020-02-03
Author: skab12@gmail.com
File Name: dipy/workflows/multi_io.py
Class Name: IOIterator
Method Name: file_existence_check


Project Name: tensorflow/agents
Commit Name: 2c0f1b2d13e090f3ca1b23254cfe0391f3f3894e
Time: 2020-08-17
Author: oars@google.com
File Name: tf_agents/agents/behavioral_cloning/behavioral_cloning_agent.py
Class Name: BehavioralCloningAgent
Method Name: __init__


Project Name: pytorch/text
Commit Name: 41bd713df7a4187dd0f42bbb9ffcac2ba126adbb
Time: 2020-06-16
Author: nayef.ahmed211@gmail.com
File Name: torchtext/experimental/vectors.py
Class Name: Vectors
Method Name: __init__