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

Before Change


        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


        Return a list of attributes that appear in the file
        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)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

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: 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: prody/ProDy
Commit Name: bfe9a636ea6bd4f858b86880aa84de45b33b511a
Time: 2018-03-13
Author: shz66@pitt.edu
File Name: prody/atomic/atomic.py
Class Name:
Method Name:


Project Name: vatlab/SoS
Commit Name: 570dca355344924ca6c00fa4c14aa484312ae065
Time: 2017-03-04
Author: ben.bog@gmail.com
File Name: sos/sos_task.py
Class Name: TaskEngine
Method Name: run