1560-2-3

MappingPackage ePackage = MappingPackage.eINSTANCE; if (msg.getFeature() == ePackage.getFunctionPair_In2out() || msg.getFeature() == ePackage.getFunctionPair_Out2in()) { fireNotifyChanged(msg); //HGD::fireNotifyChanged(msg.getNotifier(), msg.getEventType(), msg.getStructuralFeature(), msg.getOldValue(), msg.getNewValue(), msg.getPosition()); return; } super.notifyChanged(msg);
MappingPackage ePackage = MappingPackage.eINSTANCE; if (msg.getFeature() == ePackage.getFunctionNamePair_In2out() || msg.getFeature() == ePackage.getFunctionNamePair_Out2in()) { fireNotifyChanged(msg); // HGD::fireNotifyChanged(msg.getNotifier(), msg.getEventType(), msg.getStructuralFeature(), msg.getOldValue(), msg.getNewValue(), msg.getPosition()); return; } super.notifyChanged(msg);

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/provider/FunctionPairItemProvider.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/mapping/provider/FunctionNamePairItemProvider.java
Method name: `void notifyChanged(Notification)` |  | Method name: `void notifyChanged(Notification)`
Number of AST nodes: 5 |  | Number of AST nodes: 5

1

    MappingPackage ePackage = MappingPackage.eINSTANCE;↵

1

    MappingPackage ePackage = MappingPackage.eINSTANCE;↵

2

        if (msg.getFeature() == ePackage.getFunctionPair_In2out() || msg.getFeature() == ePackage.getFunctionPair_Out2in())↵

2

        if (msg.getFeature() == ePackage.getFunctionNamePair_In2out() || msg.getFeature() == ePackage.getFunctionNamePair_Out2in())↵

3

        {↵

3

        {↵

4

          fireNotifyChanged(msg);↵

4

          fireNotifyChanged(msg);↵

5

          //HGD::fireNotifyChanged(msg.getNotifier(), msg.getEventType(), msg.getStructuralFeature(), msg.getOldValue(), msg.getNewValue(), msg.getPosition());↵

5

          // HGD::fireNotifyChanged(msg.getNotifier(), msg.getEventType(), msg.getStructuralFeature(), msg.getOldValue(), msg.getNewValue(), msg.getPosition());↵

6

          return;↵

6

          return;↵

7

        }↵

7

        }↵

8

        super.notifyChanged(msg);

8

        super.notifyChanged(msg);

See real code fragment |  | See real code fragment

Summary
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.4
Clones location | Clones are in different classes having the same super class
Number of node comparisons | 13

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 5
   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) | 1.4
   Clone type | Type 2

   Mapped Statements
   ID | Statement |  | ID | Statement
   --- | --- | --- | --- | ---

   1

       MappingPackage ePackage = MappingPackage.eINSTANCE;

   1

       MappingPackage ePackage = MappingPackage.eINSTANCE;

   2

       if (msg.getFeature() == ePackage.getFunctionPair_In2out() || msg.getFeature() == ePackage.getFunctionPair_Out2in())

   2 | if (msg.getFeature() == ePackage.getFunctionPair_In2out() || msg.getFeature() == ePackage.getFunctionPair_Out2in())
   2 | if (msg.getFeature() == ePackage.getFunctionNamePair_In2out() || msg.getFeature() == ePackage.getFunctionNamePair_Out2in())

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   getFunctionPair_In2out | getFunctionNamePair_In2out | METHOD_INVOCATION_NAME_MISMATCH
   org.eclipse.emf.ecore.EReference | org.eclipse.emf.ecore.EAttribute | VARIABLE_TYPE_MISMATCH
   getFunctionPair_Out2in | getFunctionNamePair_Out2in | METHOD_INVOCATION_NAME_MISMATCH
   org.eclipse.emf.ecore.EReference | org.eclipse.emf.ecore.EAttribute | VARIABLE_TYPE_MISMATCH

   Preondition Violations
   Expression ePackage.getFunctionPair_In2out() cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression ePackage.getFunctionNamePair_In2out() cannot be parameterized, because it has dependencies to/from statements that will be extracted

   Type org.eclipse.emf.ecore.EReference of variable ePackage.getFunctionPair_In2out() does not match with type org.eclipse.emf.ecore.EAttribute of variable ePackage.getFunctionNamePair_In2out()
   - Make classes org.eclipse.emf.ecore.EReference and org.eclipse.emf.ecore.EAttribute extend a common superclass

   Expression ePackage.getFunctionPair_Out2in() cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression ePackage.getFunctionNamePair_Out2in() cannot be parameterized, because it has dependencies to/from statements that will be extracted

   Type org.eclipse.emf.ecore.EReference of variable ePackage.getFunctionPair_Out2in() does not match with type org.eclipse.emf.ecore.EAttribute of variable ePackage.getFunctionNamePair_Out2in()
   - Make classes org.eclipse.emf.ecore.EReference and org.eclipse.emf.ecore.EAttribute extend a common superclass

   2

       if (msg.getFeature() == ePackage.getFunctionNamePair_In2out() || msg.getFeature() == ePackage.getFunctionNamePair_Out2in())

   3

       fireNotifyChanged(msg);

   3

       fireNotifyChanged(msg);

   4

       return;

   4

       return;

   5

       super.notifyChanged(msg);

   5

       super.notifyChanged(msg);

   Precondition Violations (6)
   Row | Violation
   --- | ---
   1 | Expression ePackage.getFunctionPair_In2out() cannot be parameterized, because it has dependencies to/from statements that will be extracted
   2 | Expression ePackage.getFunctionNamePair_In2out() cannot be parameterized, because it has dependencies to/from statements that will be extracted
   3 | Type org.eclipse.emf.ecore.EReference of variable ePackage.getFunctionPair_In2out() does not match with type org.eclipse.emf.ecore.EAttribute of variable ePackage.getFunctionNamePair_In2out()
   4 | Expression ePackage.getFunctionPair_Out2in() cannot be parameterized, because it has dependencies to/from statements that will be extracted
   5 | Expression ePackage.getFunctionNamePair_Out2in() cannot be parameterized, because it has dependencies to/from statements that will be extracted
   6 | Type org.eclipse.emf.ecore.EReference of variable ePackage.getFunctionPair_Out2in() does not match with type org.eclipse.emf.ecore.EAttribute of variable ePackage.getFunctionNamePair_Out2in()