b8ce0940159022a61a2709e615dade45b53f97ef,sbin/db_mgmt_ref.py,VIADownloads,file_to_queue,#VIADownloads#Any#,45

Before Change



        working_dir, filename = file_tuple

        with open(filename, "rb") as input_file:
            x = 0
            for cve in ijson.items(input_file, "cves"):
                self.queue.put(self.process_item(item=cve))
                x += 1

            self.logger.debug("Processed {} entries from file: {}".format(x, filename))

        with open(filename, "rb") as input_file:
            data = json.loads(input_file.read().decode("utf-8"))

            setColInfo("via4", "sources", data["metadata"]["sources"])

After Change



        for cve in self.ijson_handler.fetch(filename=filename, prefix=self.prefix):
            x = 0
            for key, val in cve.items():
                entry_dict = {"id": key}
                entry_dict.update(val)
                self.process_item(item=entry_dict)
                x += 1

            self.logger.debug("Processed {} items from file: {}".format(x, filename))

        with open(filename, "rb") as input_file:
            data = json.loads(input_file.read().decode("utf-8"))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: cve-search/cve-search
Commit Name: b8ce0940159022a61a2709e615dade45b53f97ef
Time: 2020-08-17
Author: paul.tikken@gmail.com
File Name: sbin/db_mgmt_ref.py
Class Name: VIADownloads
Method Name: file_to_queue


Project Name: pantsbuild/pants
Commit Name: 04629674f5f9e65bd35565b329f8c892a16865a4
Time: 2012-07-07
Author: benjy@foursquare.com
File Name: src/python/twitter/pants/tasks/jvm_compiler_dependencies.py
Class Name: Dependencies
Method Name: findclasses


Project Name: ANSSI-FR/SecuML
Commit Name: 42d0ac6260a5dd15bf86e49aa1b30ca8fcadc6c2
Time: 2019-05-17
Author: anael.beaugnon@ssi.gouv.fr
File Name: secuml/core/classif/monitoring/interp/coeff.py
Class Name: Coefficients
Method Name: display