e4c5108c9deb8ecdf296f7c8da5f9dc26789d930,homeassistant/components/automation/__init__.py,,setup,#Any#Any#,37

Before Change


        if CONF_CONDITION in p_config or CONF_CONDITION_TYPE in p_config:
            action = _process_if(hass, config, p_config, action)

            if action is None:
                continue

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

    return True

After Change



    while config_key in config:
        // check for one block syntax
        if isinstance(config[config_key], dict):
            config_block = _migrate_old_config(config[config_key])
            name = config_block.get(CONF_ALIAS, config_key)
            _setup_automation(hass, config_block, name, config)

        // check for multiple block syntax
        elif isinstance(config[config_key], list):
            list_no = 0
            for config_block in config[config_key]:
                name = config_block.get(CONF_ALIAS, "{}, {}".format(config_key, list_no))
                list_no += 1
                config_block = _migrate_old_config(config_block)
                _setup_automation(hass, config_block, name, config)

        // any scalar value is incorrect
        else:
            _LOGGER.error("Error in config in section %s.", config_key)

        found += 1
        config_key = "{} {}".format(DOMAIN, found)

    return True
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 6

Instances


Project Name: home-assistant/home-assistant
Commit Name: e4c5108c9deb8ecdf296f7c8da5f9dc26789d930
Time: 2015-09-18
Author: stefan.jonasson@sitedirect.se
File Name: homeassistant/components/automation/__init__.py
Class Name:
Method Name: setup


Project Name: jaakkopasanen/AutoEq
Commit Name: e6f1028be471f2ba7fdf877abf7f8f9d05b8c4ce
Time: 2018-08-06
Author: jaakko.o.pasanen@gmail.com
File Name: results/recommendations.py
Class Name:
Method Name: get_urls


Project Name: pantsbuild/pants
Commit Name: 40c214aa1c044a02b5290aa3ec7cc9570dbe24ad
Time: 2016-11-06
Author: stuhood@gmail.com
File Name: src/python/pants/engine/legacy/graph.py
Class Name: LegacyBuildGraph
Method Name: _index


Project Name: pantsbuild/pants
Commit Name: 0349078b01ed693223d0c4a65c8a9b8aafe115bc
Time: 2017-05-26
Author: stuhood@twitter.com
File Name: src/python/pants/backend/jvm/tasks/bundle_create.py
Class Name: BundleCreate
Method Name: bundle


Project Name: nerox8664/pytorch2keras
Commit Name: 1cf4c73059ba4435f37a93a316edbd426263cbf0
Time: 2018-12-20
Author: nerox8664@gmail.com
File Name: pytorch2keras/converter.py
Class Name:
Method Name: pytorch_to_keras