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


        if not isinstance(veh_id, str):
            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: 5

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: OpenNMT/OpenNMT-tf
Commit Name: 7a4d67134beea2cd66b84a3df2304a8b8c075913
Time: 2019-09-13
Author: guillaume.klein@systrangroup.com
File Name: opennmt/models/sequence_to_sequence.py
Class Name: SequenceToSequence
Method Name: _call


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