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.getMappingRoot_OutputReadOnly() || msg.getFeature() == ePackage.getMappingRoot_TopToBottom()) { 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/MappingRootItemProvider.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.getMappingRoot_OutputReadOnly() || msg.getFeature() == ePackage.getMappingRoot_TopToBottom())
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.4
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)1.3
    Clone typeType 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.getMappingRoot_OutputReadOnly() || msg.getFeature() == ePackage.getMappingRoot_TopToBottom())
    Differences
    Expression1Expression2Difference
    getFunctionPair_In2outgetMappingRoot_OutputReadOnlyMETHOD_INVOCATION_NAME_MISMATCH
    org.eclipse.emf.ecore.EReferenceorg.eclipse.emf.ecore.EAttributeVARIABLE_TYPE_MISMATCH
    getFunctionPair_Out2ingetMappingRoot_TopToBottomMETHOD_INVOCATION_NAME_MISMATCH
    org.eclipse.emf.ecore.EReferenceorg.eclipse.emf.ecore.EAttributeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression ePackage.getFunctionPair_In2out() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ePackage.getMappingRoot_OutputReadOnly() 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.getMappingRoot_OutputReadOnly()
    • 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.getMappingRoot_TopToBottom() 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.getMappingRoot_TopToBottom()
    • Make classes org.eclipse.emf.ecore.EReference and org.eclipse.emf.ecore.EAttribute extend a common superclass
    2
    if (msg.getFeature() == ePackage.getMappingRoot_OutputReadOnly() || msg.getFeature() == ePackage.getMappingRoot_TopToBottom())
    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.getFunctionPair_In2out() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression ePackage.getMappingRoot_OutputReadOnly() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Type org.eclipse.emf.ecore.EReference of variable ePackage.getFunctionPair_In2out() does not match with type org.eclipse.emf.ecore.EAttribute of variable ePackage.getMappingRoot_OutputReadOnly()
    4Expression ePackage.getFunctionPair_Out2in() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression ePackage.getMappingRoot_TopToBottom() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Type org.eclipse.emf.ecore.EReference of variable ePackage.getFunctionPair_Out2in() does not match with type org.eclipse.emf.ecore.EAttribute of variable ePackage.getMappingRoot_TopToBottom()