File path: /ArgoUML-0.34-src/argouml/src/argouml-app/src/org/argouml/cognitive/ToDoItem.java | File path: /ArgoUML-0.34-src/argouml/src/argouml-app/src/org/argouml/uml/cognitive/UMLToDoItem.java | |||
Method name: void select()
|
Method name: void select()
|
|||
Number of AST nodes: 3 | Number of AST nodes: 4 | |||
1 | /** | 1 | @Override | |
2 | * When a ToDoItem is selected in the UiToDoList window, highlight | 2 | public void select() { | |
3 | * the "offending" design material's. | 3 | Project p = ProjectManager.getManager().getCurrentProject(); | |
4 | */ | 4 | for (Object dm : getOffenders()) { | |
5 | public void select() { | 5 | if (dm instanceof Highlightable) { | |
6 | for (Object dm : getOffenders()) { | 6 | ((Highlightable) dm).setHighlight(true); | |
7 | if (dm instanceof Highlightable) { | 7 | } else if (p != null) { | |
8 | ((Highlightable) dm).setHighlight(true); | 8 | Iterator iterFigs = p.findFigsForMember(dm).iterator(); | |
9 | } | 9 | while (iterFigs.hasNext()) { | |
10 | } | 10 | Object f = iterFigs.next(); | |
11 | } | 11 | if (f instanceof Highlightable) { | |
12 | ((Highlightable) f).setHighlight(true); | |||
13 | } | |||
14 | } | |||
15 | } | |||
16 | } | |||
17 | } | |||
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 | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Similarity Score | 1.000 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | for (Object dm : getOffenders()) |
| 7 | while (iterFigs.hasNext()) | ||||||||||||||
|
| 8 | Object f = iterFigs.next(); | |||||||||||||||
2 | if (dm instanceof Highlightable) |
| 9 | if (f instanceof Highlightable) | ||||||||||||||
3 | ((Highlightable)dm).setHighlight(true); |
| 10 | ((Highlightable)f).setHighlight(true); |
Row | Violation |
---|---|
1 | Type org.argouml.cognitive.ListSet of variable getOffenders() does not match with type java.util.Collection<org.tigris.gef.presentation.Fig> of variable p.findFigsForMember(dm) |