Object value1 = eObject1.eGet(reference); Object value2 = eObject2.eGet(reference);
Object value1 = eObject1.eGet(attribute); Object value2 = eObject2.eGet(attribute);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreUtil.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreUtil.java
Method name: boolean haveEqualReference(EObject, EObject, EReference) Method name: boolean haveEqualAttribute(EObject, EObject, EAttribute)
Number of AST nodes: 2 Number of AST nodes: 2
1
Object value1 = eObject1.eGet(reference);
1
Object value1 = eObject1.eGet(attribute);
2
      Object value2 = eObject2.eGet(reference);
2
      Object value2 = eObject2.eGet(attribute);
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 declared in the same class
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    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
    1
    Object value1 = eObject1.eGet(reference);
    1
    Object value1 = eObject1.eGet(reference);
    1
    Object value1 = eObject1.eGet(attribute);
    Differences
    Expression1Expression2Difference
    referenceattributeVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EReferenceorg.eclipse.emf.ecore.EAttributeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EReference of variable reference does not match with type org.eclipse.emf.ecore.EAttribute of variable attribute
    • Make classes org.eclipse.emf.ecore.EReference and org.eclipse.emf.ecore.EAttribute extend a common superclass
    1
    Object value1 = eObject1.eGet(attribute);
    2
    Object value2 = eObject2.eGet(reference);
    2
    Object value2 = eObject2.eGet(reference);
    2
    Object value2 = eObject2.eGet(attribute);
    Differences
    Expression1Expression2Difference
    referenceattributeVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EReferenceorg.eclipse.emf.ecore.EAttributeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EReference of variable reference does not match with type org.eclipse.emf.ecore.EAttribute of variable attribute
    • Make classes org.eclipse.emf.ecore.EReference and org.eclipse.emf.ecore.EAttribute extend a common superclass
    2
    Object value2 = eObject2.eGet(attribute);
    Precondition Violations (3)
    Row Violation
    1Type org.eclipse.emf.ecore.EReference of variable reference does not match with type org.eclipse.emf.ecore.EAttribute of variable attribute
    2Type org.eclipse.emf.ecore.EReference of variable reference does not match with type org.eclipse.emf.ecore.EAttribute of variable attribute
    3Clone fragment #1 returns variables value1, value2 , while Clone fragment #2 returns variables value1, value2