| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 30 | 2 | 3 | 0.967 | stmt_list[5] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 30 | 84 | Bio/Pathway/Rep/Graph.py |
| 2 | 30 | 79 | Bio/Pathway/Rep/MultiGraph.py |
| ||||
def edges(self,label):
"Returns a list of all the edges with this label."
if label not in self.__label_map:
raise ValueError("Unknown label: "+str(label))
return self.__label_map[label].list( )
def labels(self):
"Returns a list of all the edge labels in this graph."
return self.__label_map.keys( )
def nodes(self):
"Returns a list of the nodes in this graph."
return self.__adjacency_list.keys( )
def parent_edges(self,child):
"Returns a list of (parent, label) pairs for child."
if child not in self.__adjacency_list:
raise ValueError("Unknown <child> node: "+str(child))
parents = [ ]
for parent in self.__adjacency_list.keys( ):
children = self.__adjacency_list[parent]
for x in children.list( ):
if x is child:
parents.append((parent,self.__edge_map[(parent,child)]))
return parents
def parents(self,child):
"Returns a list of unique parents for child."
s = HashSet([x[0] for x in self.parent_edges(child)])
return s.list( )
|
| ||||
def edges(self,label):
"Returns a list of all the edges with this label."
if label not in self.__label_map:
raise ValueError("Unknown label: "+str(label))
return self.__label_map[label].list( )
def labels(self):
"Returns a list of all the edge labels in this graph."
return self.__label_map.keys( )
def nodes(self):
"Returns a list of the nodes in this graph."
return self.__adjacency_list.keys( )
def parent_edges(self,child):
"Returns a list of (parent, label) pairs for child."
if child not in self.__adjacency_list:
raise ValueError("Unknown <child> node: "+str(child))
parents = [ ]
for parent in self.__adjacency_list.keys( ):
children = self.__adjacency_list[parent]
for x in children.list( ):
if x[0] is child:
parents.append((parent,x[1]))
return parents
def parents(self,child):
"Returns a list of unique parents for child."
s = HashSet([x[0] for x in self.parent_edges(child)])
return s.list( )
|
| |||
def edges(self,label):
"Returns a list of all the edges with this label."
if label not in self.__label_map:
raise ValueError("Unknown label: "+str(label))
return self.__label_map[label].list( )
def labels(self):
"Returns a list of all the edge labels in this graph."
return self.__label_map.keys( )
def nodes(self):
"Returns a list of the nodes in this graph."
return self.__adjacency_list.keys( )
def parent_edges(self,child):
"Returns a list of (parent, label) pairs for child."
if child not in self.__adjacency_list:
raise ValueError("Unknown <child> node: "+str(child))
parents = [ ]
for parent in self.__adjacency_list.keys( ):
children = self.__adjacency_list[parent]
for x in children.list( ):
if [[#variable315a8ea0]]is child:
parents.append((parent, [[#variable5f9edde0]][ [[#variable19dc6ea0]]]))
return parents
def parents(self,child):
"Returns a list of unique parents for child."
s = HashSet([x[0] for x in self.parent_edges(child)])
return s.list( )
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#315a8ea0]] | x[0] |
| 1 | 2 | [[#315a8ea0]] | x |
| 2 | 1 | [[#5f9edde0]] | x |
| 2 | 2 | [[#5f9edde0]] | self.__edge_map |
| 3 | 1 | [[#19dc6ea0]] | 1 |
| 3 | 2 | [[#19dc6ea0]] | (parent,child) |