if (mouseBasedTableItem == null)
{
table.setSelection(i);
Event selectionEvent = new Event();
selectionEvent.widget = table;
selectionEvent.item = tableItem;
table.notifyListeners(SWT.Selection, selectionEvent);
selectedTableItem = tableItem;
}
if (mouseBasedTableItem == null)
{
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/ExtendedTableTreeEditor.java
|
Method name: void mouseDown(MouseEvent)
|
|
Method name: void mouseDown(MouseEvent)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | if (mouseBasedTableItem == null)↵ | | 1 | if (mouseBasedTableItem == null)↵
|
2 | {↵ | | 2 | {↵
|
3 | table.setSelection(i);↵ | | 3 | table.setSelection(i);↵
|
4 | Event selectionEvent = new Event();↵ | | 4 | Event selectionEvent = new Event();↵
|
5 | selectionEvent.widget = table;↵ | | 5 | selectionEvent.widget = table;↵
|
6 | selectionEvent.item = tableItem;↵ | | 6 | selectionEvent.item = tableItem;↵
|
7 | table.notifyListeners(SWT.Selection, selectionEvent);↵ | | 7 | table.notifyListeners(SWT.Selection, selectionEvent);↵
|
8 | selectedTableItem = tableItem;↵ | | 8 | selectedTableItem = tableItem;↵
|
9 | } | | 9 | }
|
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 53 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 7 |
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) | 2.3 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
27 | if (mouseBasedTableItem == null) | | 27 | if (mouseBasedTableItem == null) |
28 | | | 28 | |
29 | Event selectionEvent = new Event(); | | 29 | Event selectionEvent = new Event(); |
30 | selectionEvent.widget = table; | | 30 | selectionEvent.widget = table; |
31 | selectionEvent.item = tableItem; | | 31 | selectionEvent.item = tableItem; |
32 | table.notifyListeners(SWT.Selection, selectionEvent); | | 32 | table.notifyListeners(SWT.Selection, selectionEvent); |
33 | selectedTableItem = tableItem; | | 33 | selectedTableItem = tableItem; |
Precondition Violations (0)
Row |
Violation |