projectList.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { itemSelected(); } });
renameButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { renameExistingProject(); } });
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/common/ui/wizard/AbstractExampleInstallerWizard.java File path: /emf-2.4.1/src/org/eclipse/emf/common/ui/wizard/AbstractExampleInstallerWizard.java
Method name: void createControl(Composite) Method name: void createControl(Composite)
Number of AST nodes: 1 Number of AST nodes: 1
1
projectList.addSelectionListener(new SelectionAdapter()
1
renameButton.addSelectionListener(new SelectionAdapter()
2
        {
2
        {
3
          @Override
3
          @Override
4
          public void widgetSelected(SelectionEvent e)
4
          public void widgetSelected(SelectionEvent e)
5
          {
5
          {
6
            itemSelected();
6
            renameExistingProject();
7
          }
7
          }
8
        });
8
        });
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in the same method
Number of node comparisons1
  1. {Non-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 2
    Mapped Statements
    ID Statement ID Statement
    5
    projectList.addSelectionListener(new SelectionAdapter() {...});
    5
    projectList.addSelectionListener(new SelectionAdapter() {...});
    39
    renameButton.addSelectionListener(new SelectionAdapter() {...});
    Differences
    Expression1Expression2Difference
    itemSelectedrenameExistingProjectMETHOD_INVOCATION_NAME_MISMATCH
    projectListrenameButtonVARIABLE_NAME_MISMATCH
    org.eclipse.swt.widgets.Listorg.eclipse.swt.widgets.ButtonSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression itemSelected() is a void method call, and thus it cannot be parameterized
    Expression renameExistingProject() is a void method call, and thus it cannot be parameterized
    Expression projectList cannot be unified with expression renameButton , because common superclass org.eclipse.swt.widgets.Control does not declare member(s) public void addSelectionListener(org.eclipse.swt.events.SelectionListener)
    39
    renameButton.addSelectionListener(new SelectionAdapter() {...});
    Precondition Violations (3)
    Row Violation
    1Expression itemSelected() is a void method call, and thus it cannot be parameterized
    2Expression renameExistingProject() is a void method call, and thus it cannot be parameterized
    3Expression projectList cannot be unified with expression renameButton , because common superclass org.eclipse.swt.widgets.Control does not declare member(s) public void addSelectionListener(org.eclipse.swt.events.SelectionListener)