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)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
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: okfn-brasil/serenata-de-amor
Commit Name: 86d4c5df21db07ab75e7eac9ed36d2799b4bf440
Time: 2017-11-19
Author: cuducos@users.noreply.github.com
File Name: research/src/fetch_campaign_donations.py
Class Name: Donation
Method Name: data
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
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