e4378ddc530abc356c8ca4e3e6a317562b104c96,gb/node.py,Node,_internal_links,#Node#Any#,68

Before Change


        ilinks = []

        for node_id in nodes.keys():
            self.execute("SELECT id FROM link WHERE orig=%s", (node_id,))
            rows = self.cur.fetchall()
            for row in rows:
                link = Link().get_by_id(row[0])
                if link.targ in nodes.keys():

After Change


            for targ_id, targ_list in targs.items():
                if targ_id in nodes.keys():
                    for targ in targ_list:
                        ilinks[orig.d["_id"]].append({"_id": targ_id, "relation": targ["relation"], "directed": targ["directed"]})

        return ilinks
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: graphbrain/graphbrain
Commit Name: e4378ddc530abc356c8ca4e3e6a317562b104c96
Time: 2011-10-26
Author: telmo@telmomenezes.net
File Name: gb/node.py
Class Name: Node
Method Name: _internal_links


Project Name: graphbrain/graphbrain
Commit Name: e4378ddc530abc356c8ca4e3e6a317562b104c96
Time: 2011-10-26
Author: telmo@telmomenezes.net
File Name: gb/graph.py
Class Name: Graph
Method Name: get_by_owner_and_name


Project Name: graphbrain/graphbrain
Commit Name: e4378ddc530abc356c8ca4e3e6a317562b104c96
Time: 2011-10-26
Author: telmo@telmomenezes.net
File Name: gb/user.py
Class Name: User
Method Name: get_by_email