File path: /ArgoUML-0.34-src/argouml/src/argouml-app/src/org/argouml/uml/diagram/ui/FigAssociationClass.java | File path: /ArgoUML-0.34-src/argouml/src/argouml-app/src/org/argouml/uml/diagram/ui/FigClassAssociationClass.java | |||
Method name: FigEdgeAssociationClass getFigEdgeAssociationClass()
|
Method name: Fig getRemoveDelegate()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | /** | 1 | protected Fig getRemoveDelegate() { | |
2 | * Gets FigEdgeAssociationClass that is contained in this | 2 | // Look for the dashed edge | |
3 | * FigAssociationClass. | 3 | for (Object fig : getFigEdges()) { | |
4 | * | 4 | if (fig instanceof FigEdgeAssociationClass) { | |
5 | * @return FigEdgeAssociationClass that is contained in this | 5 | // We have the dashed edge now find the opposite FigNode | |
6 | * FigAssociationClass | 6 | FigEdgeAssociationClass dashedEdge = | |
7 | */ | 7 | (FigEdgeAssociationClass) fig; | |
8 | public FigEdgeAssociationClass getFigEdgeAssociationClass() { | 8 | return dashedEdge.getRemoveDelegate(); | |
9 | FigEdgeAssociationClass figEdgeLink = null; | 9 | } | |
10 | List edges = null; | 10 | } | |
11 | 11 | return null; | ||
12 | FigEdgePort figEdgePort = this.getEdgePort(); | 12 | } | |
13 | if (figEdgePort != null) { | |||
14 | edges = figEdgePort.getFigEdges(); | |||
15 | } | |||
16 | ||||
17 | if (edges != null) { | |||
18 | for (Iterator it = edges.iterator(); it.hasNext() | |||
19 | && figEdgeLink == null;) { | |||
20 | Object o = it.next(); | |||
21 | if (o instanceof FigEdgeAssociationClass) { | |||
22 | figEdgeLink = (FigEdgeAssociationClass) o; | |||
23 | } | |||
24 | } | |||
25 | } | |||
26 | ||||
27 | return figEdgeLink; | |||
28 | } | |||
See real code fragment | See real code fragment |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Similarity Score | 0.667 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | for (Iterator it = edges.iterator(); it.hasNext() && figEdgeLink == null; ) |
| 1 | for (Object fig : getFigEdges()) | ||||||||||||||||||||
8 | Object o = it.next(); |
| | |||||||||||||||||||||
9 | if (o instanceof FigEdgeAssociationClass) |
| 2 | if (fig instanceof FigEdgeAssociationClass) | ||||||||||||||||||||
10 | figEdgeLink = (FigEdgeAssociationClass)o; |
| 3 | FigEdgeAssociationClass dashedEdge = (FigEdgeAssociationClass)fig; | ||||||||||||||||||||
|
| 4 | return dashedEdge.getRemoveDelegate(); |
Row | Violation |
---|---|
1 | Type java.util.List of variable edges does not match with type java.util.List<org.tigris.gef.presentation.FigEdge> of variable getFigEdges() |
2 | Expression figEdgeLink cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression dashedEdge cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression figEdgeLink cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression dashedEdge cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Unmatched statement return dashedEdge.getRemoveDelegate(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
7 | Unmatched return dashedEdge.getRemoveDelegate(); |