9c636ab6fd3eded438e65519a6e118dffc58a701,homeassistant/components/media_player/braviatv.py,,_get_mac_address,#Any#,38

Before Change



    pid = Popen(["arp", "-n", ip_address], stdout=PIPE)
    pid_component = pid.communicate()[0]
    mac = re.search(r"(([a-f\d]{1,2}\:){5}[a-f\d]{1,2})".encode("UTF-8"),
                    pid_component).groups()[0]
    return mac


def _config_from_file(filename, config=None):

After Change


    match = re.search(r"(([a-f\d]{1,2}\:){5}[a-f\d]{1,2})".encode("UTF-8"),
                      pid_component)
    if match is not None:
        return match.groups()[0]
    else:
        return None

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: home-assistant/home-assistant
Commit Name: 9c636ab6fd3eded438e65519a6e118dffc58a701
Time: 2016-08-13
Author: tomi.tuhkanen@iki.fi
File Name: homeassistant/components/media_player/braviatv.py
Class Name:
Method Name: _get_mac_address


Project Name: home-assistant/home-assistant
Commit Name: 348b7abe7d7d2c6f792a3ab7139cfd85876180d0
Time: 2016-02-17
Author: flyte@failcode.co.uk
File Name: homeassistant/components/sensor/tcp.py
Class Name: Sensor
Method Name: update


Project Name: CellProfiler/CellProfiler
Commit Name: 5fbe118729532067c8d427a9ba3ce5a9d0e15917
Time: 2010-05-12
Author: thouis@1fc53939-2000-0410-845c-e8453a809027
File Name: cellprofiler/measurements.py
Class Name:
Method Name: find_metadata_tokens