57f16e3567957b392f78be79d29429fcf51c9225,src/spn/experiments/RelationalCutSet/LearnStructure.py,,get_constraint_values,#Any#Any#Any#Any#,330

Before Change


    cache_values = cache[table_name][key]

    for k in key:
        constraints = [c for c in path_constraints if c[0] == k]
        if len(constraints) > 0:
            cache_values = cache_values[k][constraints[0][1]]
            continue
        else:
            cache_values = cache_values[k]

    for k, v in cache_values.items():
        yield (k, v[1])


def build_csn2(dep_tree, table_keys, scopes, path_constraints=None, cache=None):
    if path_constraints is None:
        path_constraints = []

After Change


def get_constraint_values(key, table_name, path_constraints, cache):
    cache_values = cache[table_name][key]
    key_constraints = set(key)
    path_constraints = [pc for pc in path_constraints if pc[0] in key_constraints]

    def traverse_cache_values(cache_vals, path_constraints):
        if len(path_constraints) > 0:
            constraint = path_constraints[0]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: SPFlow/SPFlow
Commit Name: 57f16e3567957b392f78be79d29429fcf51c9225
Time: 2018-09-01
Author: molina@cs.tu-darmstadt.de
File Name: src/spn/experiments/RelationalCutSet/LearnStructure.py
Class Name:
Method Name: get_constraint_values


Project Name: EducationalTestingService/skll
Commit Name: ca10c185d94470054d693f19e7691523dbe3ec55
Time: 2019-03-05
Author: jbiggs@ets.org
File Name: skll/data/readers.py
Class Name: NDJReader
Method Name: _sub_read


Project Name: snorkel-team/snorkel
Commit Name: 04e4493973fce79fbc71e688a7a9c3f54ee3890e
Time: 2016-11-19
Author: henry.ehrenberg@outlook.com
File Name: snorkel/features/relative_features.py
Class Name:
Method Name: get_first_document_span_feats