24e7ed3b8f62fd702b2fea624189f93d145ad8b5,theano/gof/fg.py,FunctionGraph,orderings,#FunctionGraph#,643

Before Change


            // eliminate duplicate prereqs if there is more then one
            // empty ordering
            for (node, prereqs) in iteritems(ords):
                ords[node] = list(OrderedSet(prereqs))
        return ords

    def check_integrity(self):
        

After Change



        
        assert isinstance(self._features, list)
        all_orderings = []

        for feature in self._features:
            if hasattr(feature, "orderings"):
                orderings = feature.orderings(self)
                if not isinstance(orderings, OrderedDict):
                    raise TypeError("Non-deterministic return value from " +
                                    str(feature.orderings) +
                                    ". Nondeterministic object is " +
                                    str(orderings))
                if len(orderings) > 0:
                    all_orderings.append(orderings)
                    for node, prereqs in iteritems(orderings):
                        if not isinstance(prereqs, (list, OrderedSet)):
                            raise TypeError(
                                "prereqs must be a type with a "
                                "deterministic iteration order, or toposort "
                                " will be non-deterministic.")
        if len(all_orderings) == 1:
            // If there is only 1 ordering, we reuse it directly.
            return all_orderings[0]
        else:
            // If there is more than 1 ordering, combine them.
            ords = OrderedDict()
            for orderings in all_orderings:
                for node, prereqs in iteritems(orderings):
                    ords.setdefault(node, []).extend(prereqs)
            return ords

    def check_integrity(self):
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 4

Instances


Project Name: Theano/Theano
Commit Name: 24e7ed3b8f62fd702b2fea624189f93d145ad8b5
Time: 2017-05-30
Author: nouiz@nouiz.org
File Name: theano/gof/fg.py
Class Name: FunctionGraph
Method Name: orderings


Project Name: pantsbuild/pants
Commit Name: 0a6edd21b9ab29a1f733b90ff15092e7a03f665d
Time: 2014-01-15
Author: jsirois@twitter.com
File Name: src/python/twitter/pants/targets/python_target.py
Class Name: PythonTarget
Method Name: __init__


Project Name: pantsbuild/pants
Commit Name: 43ffe73ada2fcbc2571172193c30b906d2de944f
Time: 2019-12-21
Author: blorente@users.noreply.github.com
File Name: src/python/pants/backend/project_info/tasks/export_dep_as_jar.py
Class Name: ExportDepAsJar
Method Name: _process_target


Project Name: pantsbuild/pants
Commit Name: c2950cb961523d2d884f2388eaee6d1ec511faea
Time: 2020-01-31
Author: ericarellano@me.com
File Name: src/python/pants/init/specs_calculator.py
Class Name: SpecsCalculator
Method Name: parse_specs


Project Name: pantsbuild/pants
Commit Name: 2d01e912dd8e3b5220c5d63acc235f18fa0e4604
Time: 2017-11-10
Author: john.sirois@gmail.com
File Name: src/python/pants/backend/python/interpreter_cache.py
Class Name: PythonInterpreterCache
Method Name: select_interpreter_for_targets