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);
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);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/provider/FunctionNamePairItemProvider.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/provider/FunctionPairItemProvider.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.getFunctionNamePair_In2out() || msg.getFeature() == ePackage.getFunctionNamePair_Out2in())
2
    if (msg.getFeature() == ePackage.getFunctionPair_In2out() || msg.getFeature() == ePackage.getFunctionPair_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);
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.3
Clones locationClones are in different classes having the same super class
Number of node comparisons13
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    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.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    MappingPackage ePackage = MappingPackage.eINSTANCE;
    1
    MappingPackage ePackage = MappingPackage.eINSTANCE;
    2
    if (msg.getFeature() == ePackage.getFunctionNamePair_In2out() || msg.getFeature() == ePackage.getFunctionNamePair_Out2in())
    2
    if (msg.getFeature() == ePackage.getFunctionNamePair_In2out() || msg.getFeature() == ePackage.getFunctionNamePair_Out2in())
    2
    if (msg.getFeature() == ePackage.getFunctionPair_In2out() || msg.getFeature() == ePackage.getFunctionPair_Out2in())
    Differences
    Expression1Expression2Difference
    getFunctionNamePair_In2outgetFunctionPair_In2outMETHOD_INVOCATION_NAME_MISMATCH
    org.eclipse.emf.ecore.EAttributeorg.eclipse.emf.ecore.EReferenceVARIABLE_TYPE_MISMATCH
    getFunctionNamePair_Out2ingetFunctionPair_Out2inMETHOD_INVOCATION_NAME_MISMATCH
    org.eclipse.emf.ecore.EAttributeorg.eclipse.emf.ecore.EReferenceVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression ePackage.getFunctionNamePair_In2out() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ePackage.getFunctionPair_In2out() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.eclipse.emf.ecore.EAttribute of variable ePackage.getFunctionNamePair_In2out() does not match with type org.eclipse.emf.ecore.EReference of variable ePackage.getFunctionPair_In2out()
    • Make classes org.eclipse.emf.ecore.EAttribute and org.eclipse.emf.ecore.EReference extend a common superclass
    Expression ePackage.getFunctionNamePair_Out2in() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ePackage.getFunctionPair_Out2in() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.eclipse.emf.ecore.EAttribute of variable ePackage.getFunctionNamePair_Out2in() does not match with type org.eclipse.emf.ecore.EReference of variable ePackage.getFunctionPair_Out2in()
    • Make classes org.eclipse.emf.ecore.EAttribute and org.eclipse.emf.ecore.EReference extend a common superclass
    2
    if (msg.getFeature() == ePackage.getFunctionPair_In2out() || msg.getFeature() == ePackage.getFunctionPair_Out2in())
    3
    fireNotifyChanged(msg);
    3
    fireNotifyChanged(msg);
    4
    return;
    4
    return;
    5
    super.notifyChanged(msg);
    5
    super.notifyChanged(msg);
    Precondition Violations (6)
    Row Violation
    1Expression ePackage.getFunctionNamePair_In2out() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression ePackage.getFunctionPair_In2out() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Type org.eclipse.emf.ecore.EAttribute of variable ePackage.getFunctionNamePair_In2out() does not match with type org.eclipse.emf.ecore.EReference of variable ePackage.getFunctionPair_In2out()
    4Expression ePackage.getFunctionNamePair_Out2in() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression ePackage.getFunctionPair_Out2in() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Type org.eclipse.emf.ecore.EAttribute of variable ePackage.getFunctionNamePair_Out2in() does not match with type org.eclipse.emf.ecore.EReference of variable ePackage.getFunctionPair_Out2in()