68c1dd7cd47c516df765a1742a62abca5c3d5f83,homeassistant/components/automation/__init__.py,,setup,#Any#Any#,28

Before Change


    for p_type, p_config in config_per_platform(config, DOMAIN, _LOGGER):
        platform = prepare_setup_platform(hass, config, DOMAIN, p_type)

        if platform is None:
            _LOGGER.error("Unknown automation platform specified: %s", p_type)
            continue

        action = _get_action(hass, p_config)

        if action is None:
            return

After Change


    config_key = DOMAIN
    found = 1

    while config_key in config:
        p_config = _migrate_old_config(config[config_key])
        found += 1
        config_key = "{} {}".format(DOMAIN, found)

        name = p_config.get(CONF_ALIAS, config_key)
        action = _get_action(hass, p_config.get(CONF_ACTION, {}), name)

        if action is None:
            continue

        if CONF_CONDITION in p_config:
            action = _process_if(hass, config, p_config[CONF_CONDITION], action)

        _process_trigger(hass, config, p_config.get(CONF_TRIGGER, []), name,
                         action)

    return True


def _get_action(hass, config, name):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: home-assistant/home-assistant
Commit Name: 68c1dd7cd47c516df765a1742a62abca5c3d5f83
Time: 2015-09-14
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/automation/__init__.py
Class Name:
Method Name: setup


Project Name: facebook/FAI-PEP
Commit Name: 20e169d51e180628b7af8149776f92ebb0c3b257
Time: 2018-03-05
Author: feisun@fb.com
File Name: benchmarking/git_driver.py
Class Name: ExecutablesBuilder
Method Name: _buildExecutables


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: b53e9baee8a3ff165048424b9be8fd020a78270e
Time: 2020-09-03
Author: tohaowu@google.com
File Name: perfkitbenchmarker/providers/gcp/gce_virtual_machine.py
Class Name: GceVirtualMachine
Method Name: UpdateInterruptibleVmStatus