8d4d199c35f5163ed21ae705a16ce3c8548d60c6,Orange/data/io.py,BasketReader,prescan_file,#BasketReader#Any#,191

Before Change


        n_elements = 0
        n_rows = 0
        for line in file:
            items = set(mo.group(1).strip()
                        for mo in self.re_name.finditer(line))
            names.update(items)
            n_elements += len(items)
            n_rows += 1
        return names, n_elements, n_rows

    def construct_domain(self, names):
        attributes = [ContinuousVariable.make(name) for name in sorted(names)]

After Change


        else:
            names = set()
            classes = set()
            file.seek(0)
        reader = csv.reader(file)
        for line in reader:
            names.update(mo.split("=")[0] for mo in line)
            n_elements += len(line)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: biolab/orange3
Commit Name: 8d4d199c35f5163ed21ae705a16ce3c8548d60c6
Time: 2012-11-28
Author: janez.demsar@fri.uni-lj.si
File Name: Orange/data/io.py
Class Name: BasketReader
Method Name: prescan_file


Project Name: recipy/recipy
Commit Name: 27aebd9429cd624a0dada25b9685ffc7af444919
Time: 2016-09-22
Author: michaelj@epcc.ed.ac.uk
File Name: integration_test/process.py
Class Name:
Method Name: execute_and_capture


Project Name: OpenNMT/OpenNMT-py
Commit Name: 8bae2f95f5d6da9e770d85b75d74e2343db5ea29
Time: 2018-06-08
Author: nikhilweee@gmail.com
File Name: onmt/translate/translator.py
Class Name: Translator
Method Name: _report_bleu