659ebabe13dfebd9449c7eb50eafe108b47d8ab1,reframe/frontend/dependency.py,,toposort,#Any#,151

Before Change


        unvisited = [r]
        visited[r] = util.OrderedSet()
        while unvisited:
            node = unvisited.pop(0)
            adjacent = revgraph[node]
            unvisited += [n for n in adjacent if n not in visited]
            visited[r].add(node)

    // Combine all individual sequences into a single one

After Change


        while unvisited:
            // Next node is one whose all dependencies are visited
            node = None
            for n in unvisited:
                if test_deps[n] <= visited[r]:
                    node = n
                    break

            // If node is None, graph has a cycle and this is a bug; this
            // function assumes acyclic graphs only
            assert node is not None

            unvisited.remove(node)
            adjacent = rev_deps[node]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: eth-cscs/reframe
Commit Name: 659ebabe13dfebd9449c7eb50eafe108b47d8ab1
Time: 2019-06-05
Author: karakasis@cscs.ch
File Name: reframe/frontend/dependency.py
Class Name:
Method Name: toposort


Project Name: keras-team/keras
Commit Name: d78c982b326adeed6ac25200dc6892ff8f518ca6
Time: 2019-01-22
Author: andrew.docherty@data61.csiro.au
File Name: keras/engine/network.py
Class Name: Network
Method Name: from_config


Project Name: oddt/oddt
Commit Name: c7a6a8b41c83f82200971ef8470dbc439c19c7a9
Time: 2017-11-23
Author: maciek@wojcikowski.pl
File Name: oddt/toolkits/extras/rdkit.py
Class Name:
Method Name: MolToPDBQTBlock