09012e7baa0c80fbc882795e15b139486dad5675,homeassistant/components/nmap_tracker/device_tracker.py,,_arp,#Any#,43

Before Change


    out, _ = arp.communicate()
    match = re.search(r"(([0-9A-Fa-f]{1,2}\:){5}[0-9A-Fa-f]{1,2})", str(out))
    if match:
        return match.group(0)
    _LOGGER.info("No MAC address found for %s", ip_address)
    return None

After Change


    out, _ = arp.communicate()
    match = re.search(r"(([0-9A-Fa-f]{1,2}\:){5}[0-9A-Fa-f]{1,2})", str(out))
    if match:
        return ":".join([i.zfill(2) for i in match.group(0).split(":")])
    _LOGGER.info("No MAC address found for %s", ip_address)
    return None

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 5

Instances


Project Name: home-assistant/home-assistant
Commit Name: 09012e7baa0c80fbc882795e15b139486dad5675
Time: 2019-04-30
Author: github@mikeage.net
File Name: homeassistant/components/nmap_tracker/device_tracker.py
Class Name:
Method Name: _arp


Project Name: HyperGAN/HyperGAN
Commit Name: 01f273e0fa1c51591b4a02e1f684f6fbfe197ce2
Time: 2018-10-25
Author: martyn@255bits.com
File Name: hypergan/ops/tensorflow/adamirror.py
Class Name: AdamirrorOptimizer
Method Name: _apply_dense


Project Name: eth-cscs/reframe
Commit Name: 1a4f5d825c93b5c12a6004f56be90a01faf5460e
Time: 2018-12-03
Author: manitaras@cscs.ch
File Name: reframe/core/schedulers/slurm.py
Class Name: SlurmNode
Method Name: _extract_attribute


Project Name: NervanaSystems/coach
Commit Name: a7206ed7029a06954a490de603fd26dffe9f9270
Time: 2018-02-26
Author: 30383381+itaicaspi-intel@users.noreply.github.com
File Name: logger.py
Class Name: Logger
Method Name: get_experiment_name


Project Name: CyberReboot/NetworkML
Commit Name: b72313618c426e4fc25416403c7985bd0619c02d
Time: 2019-11-13
Author: josh@vandervecken.com
File Name: networkml/algorithms/base.py
Class Name: BaseAlgorithm
Method Name: parse_pcap_name