d095c82f2c80e6afcff725d3abce41ce95e80a11,flow/scenarios/netfile/gen.py,NetFileGenerator,vehicle_infos,#NetFileGenerator#Any#,132

Before Change


            vehicle_data[id_vehicle]={"departSpeed":departSpeed,"depart":depart,"type_vehicle":type_vehicle,"departPos":departPos,"depart_edges":depart_edges}

            //To be changed
            vehicles.add(id_vehicle,
                     initial_speed=departSpeed)

        return vehicles,vehicle_data

After Change


            departPos=vehicle.attrib["departPos"]
            depart_edges=vehicle.findall("route")[0].attrib["edges"].split(" ")[0]

            if type_vehicle not in type_data:
                type_data[type_vehicle] = 1
            else:
                type_data[type_vehicle] += 1

            vehicle_data[id_vehicle]={"departSpeed":departSpeed,"depart":depart,"type_vehicle":type_vehicle,"departPos":departPos,"depart_edges":depart_edges}

        return vehicle_data, type_data
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: flow-project/flow
Commit Name: d095c82f2c80e6afcff725d3abce41ce95e80a11
Time: 2018-10-19
Author: umangs94@gmail.com
File Name: flow/scenarios/netfile/gen.py
Class Name: NetFileGenerator
Method Name: vehicle_infos


Project Name: fxsjy/jieba
Commit Name: f808ea0ebba7056fa1b55081b474329e556933a8
Time: 2015-02-11
Author: abcdoyle888@gmail.com
File Name: jieba/__init__.py
Class Name:
Method Name: gen_pfdict


Project Name: fxsjy/jieba
Commit Name: f808ea0ebba7056fa1b55081b474329e556933a8
Time: 2015-02-11
Author: abcdoyle888@gmail.com
File Name: jieba/__init__.py
Class Name:
Method Name: add_word