table.setSelection(i);
Event selectionEvent = new Event();
selectionEvent.widget = table;
selectionEvent.item = tableItem;
table.notifyListeners(SWT.Selection, selectionEvent);
selectedTableItem = tableItem;
table.setSelection(i);
Event selectionEvent = new Event();
selectionEvent.widget = table;
selectionEvent.item = tableItem;
table.notifyListeners(SWT.Selection, selectionEvent);
selectedTableItem = tableItem;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/common/ui/celleditor/ExtendedTableEditor.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/common/ui/celleditor/ExtendedTableEditor.java
|
Method name: void mouseDown(MouseEvent)
|
|
Method name: void mouseDown(MouseEvent)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | table.setSelection(i);↵ | | 1 | table.setSelection(i);↵
|
2 | Event selectionEvent = new Event();↵ | | 2 | Event selectionEvent = new Event();↵
|
3 | selectionEvent.widget = table;↵ | | 3 | selectionEvent.widget = table;↵
|
4 | selectionEvent.item = tableItem;↵ | | 4 | selectionEvent.item = tableItem;↵
|
5 | table.notifyListeners(SWT.Selection, selectionEvent);↵ | | 5 | table.notifyListeners(SWT.Selection, selectionEvent);↵
|
6 | selectedTableItem = tableItem; | | 6 | selectedTableItem = tableItem;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 19 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 6 |
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 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
18 | table.setSelection(i); | | 28 | table.setSelection(i); |
19 | Event selectionEvent = new Event(); | | 29 | Event selectionEvent = new Event(); |
20 | selectionEvent.widget = table; | | 30 | selectionEvent.widget = table; |
21 | selectionEvent.item = tableItem; | | 31 | selectionEvent.item = tableItem; |
22 | table.notifyListeners(SWT.Selection, selectionEvent); | | 32 | table.notifyListeners(SWT.Selection, selectionEvent); |
23 | selectedTableItem = tableItem; | | 33 | selectedTableItem = tableItem; |
Precondition Violations (0)
Row |
Violation |