c728aab9c6d61faf55900a3990183c3d4614d6b4,mathics/builtin/pymimesniffer/magic.py,MagicDetector,match,#MagicDetector#Any#Any#,28

Before Change


        else:
            from io import StringIO

            file = StringIO(str(data))

        ext = os.path.splitext(filename)[1]

        if ext:

After Change


        
        if not data:
            file = open(filename, "rb")
            buf = b""
        elif isinstance(data, str):
            from io import StringIO
            file = StringIO(data)
            matches["text/plain"] =  self.mimetypes["text/plain"]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: mathics/Mathics
Commit Name: c728aab9c6d61faf55900a3990183c3d4614d6b4
Time: 2019-06-05
Author: matera@fisica.unlp.edu.ar
File Name: mathics/builtin/pymimesniffer/magic.py
Class Name: MagicDetector
Method Name: match


Project Name: reinforceio/tensorforce
Commit Name: 3ac0cf0ea3f3bbd86184203144bae65924089824
Time: 2020-11-29
Author: alexkuhnle@t-online.de
File Name: tensorforce/environments/socket_environment.py
Class Name: SocketEnvironment
Method Name: remote_send


Project Name: nilearn/nilearn
Commit Name: e3d577b5595af3e1c9a05d3be84dbdf1a7c4aa20
Time: 2020-07-29
Author: jerome@dockes.org
File Name: nilearn/datasets/tests/test_atlas.py
Class Name:
Method Name: test_fetch_atlas_aal