getContainer().getDisplay().asyncExec (new Runnable() { public void run() { firePropertyChange(IEditorPart.PROP_DIRTY); // Try to select the affected objects. // Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand(); if (mostRecentCommand != null) { setSelectionToViewer(mostRecentCommand.getAffectedObjects()); } if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed()) { propertySheetPage.refresh(); } } });
getContainer().getDisplay().asyncExec (new Runnable() { public void run() { firePropertyChange(IEditorPart.PROP_DIRTY); // Try to select the affected objects. // Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand(); if (mostRecentCommand != null) { setSelectionToViewer(mostRecentCommand.getAffectedObjects()); } if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed()) { propertySheetPage.refresh(); } } });
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/presentation/Ecore2XMLEditor.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/presentation/EcoreEditor.java
Method name: void commandStackChanged(EventObject) Method name: void commandStackChanged(EventObject)
Number of AST nodes: 1 Number of AST nodes: 1
1
getContainer().getDisplay().asyncExec
1
getContainer().getDisplay().asyncExec
2
             (new Runnable()
2
             (new Runnable()
3
              {
3
              {
4
                public void run()
4
                public void run()
5
                {
5
                {
6
                  firePropertyChange(IEditorPart.PROP_DIRTY);
6
                  firePropertyChange(IEditorPart.PROP_DIRTY);
7
                  // Try to select the affected objects.
7
                  // Try to select the affected objects.
8
                  //
8
                  //
9
                  Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();
9
                  Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();
10
                  if (mostRecentCommand != null)
10
                  if (mostRecentCommand != null)
11
                  {
11
                  {
12
                    setSelectionToViewer(mostRecentCommand.getAffectedObjects());
12
                    setSelectionToViewer(mostRecentCommand.getAffectedObjects());
13
                  }
13
                  }
14
                  if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed())
14
                  if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed())
15
                  {
15
                  {
16
                    propertySheetPage.refresh();
16
                    propertySheetPage.refresh();
17
                  }
17
                  }
18
                }
18
                }
19
              });
19
              });
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes
Number of node comparisons1
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    getContainer().getDisplay().asyncExec(new Runnable() {...});
    1
    getContainer().getDisplay().asyncExec(new Runnable() {...});
    Precondition Violations (0)
    Row Violation