File path: /emf-2.4.1/src/org/eclipse/emf/ecore/presentation/EcoreEditor.java | File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/presentation/Ecore2XMLEditor.java | |||
Method name: void handleContentOutlineSelection(ISelection)
|
Method name: void handleContentOutlineSelection(ISelection)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | selectionList.add(selectedElement);↵ | 1 | selectionList.add(selectedElement);↵ | |
2 | while (selectedElements.hasNext())↵ | 2 | while (selectedElements.hasNext())↵ | |
3 | {↵ | 3 | ↵ | |
4 | {↵ | |||
4 | selectionList.add(selectedElements.next());↵ | 5 | selectionList.add(selectedElements.next());↵ | |
5 | }↵ | 6 | }↵ | |
6 | // Set the selection to the widget.↵ | 7 | // Set the selection to the widget.↵ | |
7 | //↵ | 8 | //↵ | |
8 | selectionViewer.setSelection(new StructuredSelection(selectionList)); | 9 | selectionViewer.setSelection(new StructuredSelection(selectionList)); | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 9 |
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) | 21.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | selectionList.add(selectedElement); | 7 | selectionList.add(selectedElement); | ||||||||||||||||||
7 | while (selectedElements.hasNext()) |
| 8 | while (selectedElements.hasNext()) | |||||||||||||||||
8 | selectionList.add(selectedElements.next()); |
| 9 | selectionList.add(selectedElements.next()); | |||||||||||||||||
9 | selectionViewer.setSelection(new StructuredSelection(selectionList)); | 10 | selectionViewer.setSelection(new StructuredSelection(selectionList)); |
Row | Violation |
---|---|
1 | Type java.util.Iterator<> of variable selectedElements does not match with type java.util.Iterator<> of variable selectedElements |
2 | Expression selectedElements.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression selectedElements.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Type of variable selectedElements.next() does not match with type of variable selectedElements.next() |
5 | Type java.util.Iterator<> of variable selectedElements does not match with type java.util.Iterator<> of variable selectedElements |