da4048a9ec8542c4917fc05d8c4d61b848eae9d6,homeassistant/components/binary_sensor/threshold.py,ThresholdSensor,async_update,#ThresholdSensor#,123
 
Before Change
        if self.is_upper:
            self._deviation = bool(self.sensor_value > self._threshold)
        else:
            self._deviation = bool(self.sensor_value < self._threshold)
After Change
    @asyncio.coroutine
    def async_update(self):
        Get the latest data and updates the states.
        if self._hysteresis == 0 and self.sensor_value == self._threshold:
            self._state = False
        elif self.sensor_value > (self._threshold + self._hysteresis):
            self._state = self.is_upper
        elif self.sensor_value < (self._threshold - self._hysteresis):
            self._state = not self.is_upper

In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 5
Instances
 Project Name: home-assistant/home-assistant
 Commit Name: da4048a9ec8542c4917fc05d8c4d61b848eae9d6
 Time: 2017-10-02
 Author: mail@worldofsam.com
 File Name: homeassistant/components/binary_sensor/threshold.py
 Class Name: ThresholdSensor
 Method Name: async_update
 Project Name: dpressel/mead-baseline
 Commit Name: 1fd1fbb4b677f10d8e2181e7176daabad7327a72
 Time: 2018-11-19
 Author: blester125@users.noreply.github.com
 File Name: python/baseline/pytorch/tagger/model.py
 Class Name: TaggerModelBase
 Method Name: create
 Project Name: openml/openml-python
 Commit Name: 33c3a8101efe1cb66599831c03a6b960248a8718
 Time: 2016-03-25
 Author: feurerm@informatik.uni-freiburg.de
 File Name: openml/datasets/functions.py
 Class Name: 
 Method Name: check_datasets_active
 Project Name: chakki-works/doccano
 Commit Name: 5dca7cd3506c101be6a429ee6f0340107679714f
 Time: 2018-08-16
 Author: hiroki.nakayama.py@gmail.com
 File Name: app/app/settings.py
 Class Name: 
 Method Name: 
 Project Name: comic/grand-challenge.org
 Commit Name: 28935ea4d7796ada4ad387e79c4357b21c5b9ad6
 Time: 2020-03-26
 Author: 57257130+MikeOverkamp-diag@users.noreply.github.com
 File Name: app/grandchallenge/reader_studies/models.py
 Class Name: ReaderStudy
 Method Name: add_ground_truth