7721c80b327aaa6f5207b4babca80e4935996e42,tf_encrypted/__init__.py,,set_protocol,#Any#,31

Before Change


            globals()[func[0]] = func[1]

    for func in all_prot_funcs:
        if func[0] not in globals():
            globals()[func[0]] = _prot_func_not_implemented


def set_config(config: Config) -> None:
    from .config import set_config as set_global_config

    set_global_config(config)

After Change



    // add global names according to new protocol
    if prot is not None:
        methods = inspect.getmembers(prot, predicate=inspect.ismethod)
        public_methods = [method for method in methods if not method[0].startswith("_")]
        for name, func in public_methods:
            globals()[name] = func

    // record new protocol
    protocol.set_protocol(prot)


def set_config(config: Config) -> None:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: mortendahl/tf-encrypted
Commit Name: 7721c80b327aaa6f5207b4babca80e4935996e42
Time: 2019-02-27
Author: mortendahlcs@gmail.com
File Name: tf_encrypted/__init__.py
Class Name:
Method Name: set_protocol


Project Name: mortendahl/tf-encrypted
Commit Name: 7721c80b327aaa6f5207b4babca80e4935996e42
Time: 2019-02-27
Author: mortendahlcs@gmail.com
File Name: tf_encrypted/protocol/__init__.py
Class Name:
Method Name: get_all_funcs


Project Name: scikit-image/scikit-image
Commit Name: ddfac3e42d2ae2e09751de6638d813c76e30ff94
Time: 2018-12-04
Author: mark.harfouche@gmail.com
File Name: tools/check_sdist.py
Class Name:
Method Name: