7721c80b327aaa6f5207b4babca80e4935996e42,tf_encrypted/protocol/__init__.py,,get_all_funcs,#,16

Before Change


    protocols = [Pond(), SecureNN()]

    for protocol in protocols:
        methods = inspect.getmembers(Pond(), predicate=inspect.ismethod)
        for method in methods:
            if method[0] not in all_prot_method_names and method[0][0] is not "_":
                all_prot_method_names.append(method[0])
                all_prot_methods.append(method)

After Change



    protocols = [Pond, SecureNN]
    for protocol in protocols:
        all_prot_method_names |= set(
            func_name
            for func_name, _ in inspect.getmembers(protocol, predicate=inspect.isfunction)
            if not func_name.startswith("_")
        )

    return all_prot_method_names

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


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: 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: 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: