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

After Change


        n_elements = 0
        classes = file.readline().strip()
        header = classes.lower().startswith("classes:")
        if header:
            classes = set(x.strip() for x in classes[8:].split(","))
            names = set(classes)
        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: vatlab/SoS
Commit Name: e80c2fae365d4c16d5cb830958059a0b646a3c50
Time: 2016-10-30
Author: ben.bog@gmail.com
File Name: pysos/main.py
Class Name:
Method Name: get_tracked_files


Project Name: snipsco/snips-nlu
Commit Name: 3146d1478501f47934e3a1136f731ba9e948420c
Time: 2018-07-09
Author: adrien.ball@snips.ai
File Name: snips_nlu/resources.py
Class Name:
Method Name: _load_gazetteers