cfc023e12892df71a6b6e458528b4516521f4db2,homeassistant/components/binary_sensor/volvooncall.py,VolvoSensor,is_on,#VolvoSensor#,27

Before Change


        Return True if the binary sensor is on.
        val = getattr(self.vehicle, self._attribute)
        if self._attribute == "bulb_failures":
            return len(val) > 0
        elif self._attribute in ["doors", "windows"]:
            return any([val[key] for key in val if "Open" in key])
        else:
            return val != "Normal"

After Change


        Return True if the binary sensor is on.
        val = getattr(self.vehicle, self._attribute)
        if self._attribute == "bulb_failures":
            return bool(val)
        elif self._attribute in ["doors", "windows"]:
            return any([val[key] for key in val if "Open" in key])
        else:
            return val != "Normal"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: home-assistant/home-assistant
Commit Name: cfc023e12892df71a6b6e458528b4516521f4db2
Time: 2017-04-23
Author: mail@fabian-affolter.ch
File Name: homeassistant/components/binary_sensor/volvooncall.py
Class Name: VolvoSensor
Method Name: is_on


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 870e3915cf44ee8923bac2fb7b49bc7d7832209c
Time: 2019-07-18
Author: chriswilkes@google.com
File Name: perfkitbenchmarker/providers/aws/aws_network.py
Class Name: AwsInternetGateway
Method Name: _Exists


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 870e3915cf44ee8923bac2fb7b49bc7d7832209c
Time: 2019-07-18
Author: chriswilkes@google.com
File Name: perfkitbenchmarker/providers/aws/aws_network.py
Class Name: AwsSubnet
Method Name: _Exists