File path: /ArgoUML-0.34-src/argouml/src/argouml-app/src/org/argouml/uml/diagram/ui/FigStereotypesGroup.java | File path: /ArgoUML-0.34-src/argouml/src/argouml-app/src/org/argouml/uml/diagram/ui/FigEdgeModelElement.java | |||
Method name: void removeFromDiagram()
|
Method name: void removeFromDiagramImpl()
|
|||
Number of AST nodes: 2 | Number of AST nodes: 3 | |||
1 | @Override | 1 | protected void removeFromDiagramImpl() { | |
2 | public void removeFromDiagram() { | 2 | Object o = getOwner(); | |
3 | /* Remove all items in the group, | 3 | if (o != null) { | |
4 | * otherwise the model event listeners remain: | 4 | removeElementListener(o); | |
5 | * TODO: Why does a FigGroup not do this? */ | 5 | } | |
6 | for (Object f : getFigs()) { | 6 | if (notationProviderName != null) { | |
7 | ((Fig) f).removeFromDiagram(); | 7 | notationProviderName.cleanListener(); | |
8 | } | 8 | } | |
9 | super.removeFromDiagram(); | 9 | ||
10 | Model.getPump() | 10 | /* TODO: MVW: Why is this not done in GEF? */ | |
11 | .removeModelEventListener(this, getOwner(), "stereotype"); | 11 | Iterator it = getPathItemFigs().iterator(); | |
12 | } | 12 | while (it.hasNext()) { | |
13 | Fig fig = (Fig) it.next(); | |||
14 | fig.removeFromDiagram(); | |||
15 | } | |||
16 | ||||
17 | super.removeFromDiagram(); | |||
18 | damage(); | |||
19 | } | |||
See real code fragment | See real code fragment |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Similarity Score | 0.667 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | for (Object f : getFigs()) |
| 7 | while (it.hasNext()) | |||||||||||
| 8 | Fig fig = (Fig)it.next(); | |||||||||||||
2 | ((Fig)f).removeFromDiagram(); |
| 9 | fig.removeFromDiagram(); |
Row | Violation |
---|---|
1 | Type java.util.List<org.tigris.gef.presentation.Fig> of variable getFigs() does not match with type java.util.Vector of variable getPathItemFigs() |
2 | Expression ((Fig)f) cannot be parameterized, because it has dependencies to/from statements that will be extracted |