d6f7a7ba0a4cc7d4e559ea1264244ea01ab069fe,passporteye/mrz/image.py,Loader,__call__,#Loader#,37

Before Change


            if img_data is None:
                return None
            else:
                fd, fname = tempfile.mkstemp(prefix="pythoneye_", suffix=".jpg")
                try:
                    with open(fname, "wb") as f:
                        f.write(img_data)
                    return self._imread(fname)

After Change


                return self._imread(img_data)
            else:
                return self._imread(self.fileuri)
        elif isinstance(self.fileuri, (bytes, io.IOBase)):
            return self._imread(self.fileuri)
        return None
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: konstantint/PassportEye
Commit Name: d6f7a7ba0a4cc7d4e559ea1264244ea01ab069fe
Time: 2018-12-23
Author: peter.g.horsley@gmail.com
File Name: passporteye/mrz/image.py
Class Name: Loader
Method Name: __call__


Project Name: apache/incubator-mxnet
Commit Name: 5dc404dfb0cb5e9a034c9db5d58721e15791ad33
Time: 2020-11-19
Author: lausen@amazon.com
File Name: tests/python/unittest/test_subgraph_op.py
Class Name:
Method Name: test_subgraph_backend_gluon


Project Name: pandas-dev/pandas
Commit Name: 6ff2e7c602123787c3b0061466ab5bb8663eae81
Time: 2021-01-18
Author: twoertwein@users.noreply.github.com
File Name: pandas/_testing/contexts.py
Class Name:
Method Name: ensure_clean


Project Name: facebook/FAI-PEP
Commit Name: 184719bf2f01c441208fe972c2a2dc2c43726d98
Time: 2019-10-08
Author: asankaran@fb.com
File Name: benchmarking/run_remote.py
Class Name: RunRemote
Method Name: _updateArgs