4ccedca3e5cbd98ad8149d5ebed45d37ad09225a,homeassistant/components/device_tracker/__init__.py,DeviceTracker,__init__,#DeviceTracker#Any#Any#Any#Any#,140

Before Change


        self.lock = threading.Lock()

        // Load config
        for dev_id, device_dict in config.items():
            dev_id = str(dev_id)
            device_dict = device_dict or {}
            away_hide = device_dict.get(CONF_AWAY_HIDE, False)
            device = Device(
                hass, self.consider_home, device_dict.get("track", False),
                dev_id, device_dict.get("mac"), device_dict.get("name"),
                device_dict.get("picture"), away_hide)
            if device.mac:
                self.mac_to_dev[device.mac] = device
            self.devices[dev_id] = device

    // pylint: disable=too-many-arguments
    def see(self, mac=None, dev_id=None, host_name=None, location_name=None,
            gps=None):
         Notify device tracker that you see a device. 
        with self.lock:

After Change


     Track devices 
    def __init__(self, hass, consider_home, track_new, devices):
        self.hass = hass
        self.devices = {dev.dev_id: dev for dev in devices}
        self.mac_to_dev = {dev.mac: dev for dev in devices if dev.mac}
        self.consider_home = timedelta(seconds=consider_home)
        self.track_new = track_new
        self.lock = threading.Lock()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: home-assistant/home-assistant
Commit Name: 4ccedca3e5cbd98ad8149d5ebed45d37ad09225a
Time: 2015-09-12
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/device_tracker/__init__.py
Class Name: DeviceTracker
Method Name: __init__


Project Name: flow-project/flow
Commit Name: 9f60f957cd7be8f9c17c99b4c90d764e5898e989
Time: 2019-01-15
Author: eugenevinitsky@users.noreply.github.com
File Name: flow/multiagent_envs/multiagent_env.py
Class Name: MultiEnv
Method Name: step


Project Name: stellargraph/stellargraph
Commit Name: f86781c68cac46a283555471b3d7ca32ca16ccdf
Time: 2020-05-11
Author: Huon.Wilson@data61.csiro.au
File Name: stellargraph/core/convert.py
Class Name: ColumnarConverter
Method Name: _convert_single