if (tableItem != selectedTableItem) { 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/ExtendedTableTreeEditor.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
                }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in the same method
Number of node comparisons1