if (note.getNotifier() == mappingRoot && (note.getFeature() == MappingPackage.eINSTANCE.getMapping_Outputs() || note.getFeature() == MappingPackage.eINSTANCE.getMapping_Inputs())) { rightSelectionViewer.setInput(new ItemProvider(mappingRoot.getBottoms())); } else { super.notifyChanged(note); }
if (note.getNotifier() == mappingRoot && (note.getFeature() == MappingPackage.eINSTANCE.getMapping_Outputs() || note.getFeature() == MappingPackage.eINSTANCE.getMapping_Inputs())) { leftSelectionViewer.setInput(new ItemProvider(mappingRoot.getTops())); } else { super.notifyChanged(note); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/presentation/MappingEditor.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/presentation/MappingEditor.java
Method name: void notifyChanged(Notification) Method name: void notifyChanged(Notification)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (note.getNotifier() == mappingRoot &&
1
if (note.getNotifier() == mappingRoot &&
2
                   (note.getFeature() == MappingPackage.eINSTANCE.getMapping_Outputs() 
2
                   (note.getFeature() == MappingPackage.eINSTANCE.getMapping_Outputs() 
3
                   || note.getFeature() == MappingPackage.eINSTANCE.getMapping_Inputs()))
3
                   || note.getFeature() == MappingPackage.eINSTANCE.getMapping_Inputs()))
4
             {
4
             {
5
               rightSelectionViewer.setInput(new ItemProvider(mappingRoot.getBottoms()));
5
               leftSelectionViewer.setInput(new ItemProvider(mappingRoot.getTops()));
6
             }
6
             }
7
             else
7
             else
8
             {
8
             {
9
               super.notifyChanged(note);
9
               super.notifyChanged(note);
10
             }
10
             }
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)1.0
Clones locationClones are in the same java file
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (note.getNotifier() == mappingRoot && (note.getFeature() == MappingPackage.eINSTANCE.getMapping_Outputs() || note.getFeature() == MappingPackage.eINSTANCE.getMapping_Inputs()))
    1
    if (note.getNotifier() == mappingRoot && (note.getFeature() == MappingPackage.eINSTANCE.getMapping_Outputs() || note.getFeature() == MappingPackage.eINSTANCE.getMapping_Inputs()))
    1
    if (note.getNotifier() == mappingRoot && (note.getFeature() == MappingPackage.eINSTANCE.getMapping_Outputs() || note.getFeature() == MappingPackage.eINSTANCE.getMapping_Inputs()))
    Differences
    Expression1Expression2Difference
    getBottomsgetTopsMETHOD_INVOCATION_NAME_MISMATCH
    rightSelectionViewerleftSelectionViewerVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression mappingRoot.getBottoms() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression mappingRoot.getTops() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    1
    if (note.getNotifier() == mappingRoot && (note.getFeature() == MappingPackage.eINSTANCE.getMapping_Outputs() || note.getFeature() == MappingPackage.eINSTANCE.getMapping_Inputs()))
    2
    rightSelectionViewer.setInput(new ItemProvider(mappingRoot.getBottoms()));
    2
    rightSelectionViewer.setInput(new ItemProvider(mappingRoot.getBottoms()));
    2
    leftSelectionViewer.setInput(new ItemProvider(mappingRoot.getTops()));
    Differences
    Expression1Expression2Difference
    getBottomsgetTopsMETHOD_INVOCATION_NAME_MISMATCH
    rightSelectionViewerleftSelectionViewerVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression mappingRoot.getBottoms() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression mappingRoot.getTops() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2
    leftSelectionViewer.setInput(new ItemProvider(mappingRoot.getTops()));
    else
    else
    3
    super.notifyChanged(note);
    3
    super.notifyChanged(note);
    Precondition Violations (4)
    Row Violation
    1Expression mappingRoot.getBottoms() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression mappingRoot.getTops() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression mappingRoot.getBottoms() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression mappingRoot.getTops() cannot be parameterized, because it has dependencies to/from statements that will be extracted