76a15cc5cae3cbd4ed77917d18047a727a86a8d7,flow/core/vehicles.py,Vehicles,get_length,#Vehicles#Any#,539

Before Change


        Returns the length of the specified vehicle. If the vehicle is not
        found, returns -1001.
        if isinstance(veh_id, list):
            return [self.get_length(vehID) for vehID in veh_id]
        return self.__vehicles.get(veh_id, {}).get("length", -1001)

    def get_acc_controller(self, veh_id="all"):

After Change


            return [self.__vehicles[vehID]["length"]
                    for vehID in veh_id]
        elif veh_id == "all":
            return [self.__vehicles[vehID]["length"]
                    for vehID in self.__ids]
        else:
            return self.__vehicles[veh_id]["length"]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: flow-project/flow
Commit Name: 76a15cc5cae3cbd4ed77917d18047a727a86a8d7
Time: 2018-02-26
Author: akreidieh@gmail.com
File Name: flow/core/vehicles.py
Class Name: Vehicles
Method Name: get_length


Project Name: flow-project/flow
Commit Name: 3f5718f8e40fa7207c7b547f3875f0076813e2b4
Time: 2019-01-09
Author: akreidieh@gmail.com
File Name: flow/core/kernel/vehicle/aimsun.py
Class Name: AimsunKernelVehicle
Method Name: update


Project Name: flow-project/flow
Commit Name: 66533e85c0f2caab50aba671ee9c8adc6a38c528
Time: 2018-12-29
Author: akreidieh@gmail.com
File Name: flow/core/kernel/vehicle/aimsun.py
Class Name: AimsunKernelVehicle
Method Name: get_headway