117232d40d5dc67aa174573aeccb743818ec36f7,flow/core/vehicles.py,Vehicles,get_leader,#Vehicles#Any#,679

Before Change


        - "all", in which case a list of all the specified state is provided
        
        if not isinstance(veh_id, str):
            return [self.__vehicles[vehID]["leader"] for vehID in veh_id]
        elif veh_id == "all":
            return [self.__vehicles[vehID]["leader"] for vehID in self.__ids]
        else:

After Change


        - "all", in which case a list of all the specified state is provided
        
        if isinstance(veh_id, list):
            return [self.get_leader(vehID) for vehID in veh_id]
        return self.__vehicles.get(veh_id, {}).get("leader", "")

    def get_follower(self, veh_id="all"):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: flow-project/flow
Commit Name: 117232d40d5dc67aa174573aeccb743818ec36f7
Time: 2018-02-19
Author: akreidieh@gmail.com
File Name: flow/core/vehicles.py
Class Name: Vehicles
Method Name: get_leader


Project Name: flow-project/flow
Commit Name: ec472ad8f8afb8b1c7cf55bb4ae19e295ac7f22e
Time: 2017-11-02
Author: kanaadp@users.noreply.github.com
File Name: flow/controllers/base_controller.py
Class Name: BaseController
Method Name: get_safe_action_instantaneous


Project Name: flow-project/flow
Commit Name: 58fec6db49ba97f3676431e79ea5b21e64f2b40f
Time: 2017-10-23
Author: akreidieh@gmail.com
File Name: flow/controllers/base_controller.py
Class Name: BaseController
Method Name: get_safe_action_instantaneous