a05c950511186292a33f529b5d43d562542bbcc3,conceptnet5/formats/sql.py,EdgeIndexReader,get_edge,#EdgeIndexReader#Any#Any#,250

Before Change


        if filenum in self.open_file_cache:
            fileobj = self.open_file_cache[filenum]
        else:
            filename = "part_%02d.msgpack" % filenum
            fileobj = open(os.path.join(self.edge_dir, filename), "rb")
            self.open_file_cache[filenum] = fileobj
        fileobj.seek(offset)
        unpacker = Unpacker(fileobj, encoding=encoding)
        return unpacker.unpack()

After Change


                yield self.get_edge(filenum, offset)

    def get_edge(self, filenum, offset):
        fileobj = self.get_file(filenum)
        fileobj.seek(offset)
        unpacker = Unpacker(fileobj, encoding=encoding)
        return unpacker.unpack()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: commonsense/conceptnet5
Commit Name: a05c950511186292a33f529b5d43d562542bbcc3
Time: 2015-04-08
Author: rob@luminoso.com
File Name: conceptnet5/formats/sql.py
Class Name: EdgeIndexReader
Method Name: get_edge


Project Name: PyThaiNLP/pythainlp
Commit Name: 3546a316472865828ddbc56c5019aecd7a335082
Time: 2018-06-23
Author: wannaphong@yahoo.com
File Name: pythainlp/word_vector/thai2vec.py
Class Name:
Method Name: download


Project Name: catalyst-cooperative/pudl
Commit Name: 824ab5457d43e1c14e299057adbd425de92f6613
Time: 2020-05-26
Author: mailbox@pablovirgo.com
File Name: src/pudl/extract/ferc1.py
Class Name:
Method Name: get_raw_df