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 (tableItem != selectedTableItem)↵ | 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 |
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 | 51 |
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) | 6.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
17 | if (tableItem != selectedTableItem) |
| 27 | if (mouseBasedTableItem == null) | ||||||||||||||||||
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; |
Row | Violation |
---|---|
1 | Expression selectedTableItem cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression tableItem != selectedTableItem cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | The refactoring of the clones is infeasible, because classes org.eclipse.emf.common.ui.celleditor.ExtendedTableEditor and org.eclipse.emf.common.ui.celleditor.ExtendedTableTreeEditor do not have a common superclass |