EAnnotation eAnnotation = getAnnotation(eDataType, false); if (eAnnotation != null) { eAnnotation.getDetails().remove("baseType"); }
EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false); if (eAnnotation != null) { eAnnotation.getDetails().remove("affiliation"); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java
Method name: void setBaseType(EDataType, EDataType) Method name: void setAffiliation(EStructuralFeature, EStructuralFeature)
Number of AST nodes: 3 Number of AST nodes: 3
1
EAnnotation eAnnotation = getAnnotation(eDataType, false);
1
EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false);
2
      if (eAnnotation != null)
2
      if (eAnnotation != null)
3
      {
3
      {
4
        eAnnotation.getDetails().remove("baseType");
4
        eAnnotation.getDetails().remove("affiliation");
5
      }
5
      }
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.2
Clones locationClones are declared in the same class
Number of node comparisons6
  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)0.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    EAnnotation eAnnotation = getAnnotation(eDataType, false);
    2
    EAnnotation eAnnotation = getAnnotation(eDataType, false);
    2
    EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false);
    Differences
    Expression1Expression2Difference
    eDataTypeeStructuralFeatureVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EDataTypeorg.eclipse.emf.ecore.EStructuralFeatureVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EDataType of variable eDataType does not match with type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature
    • Make classes org.eclipse.emf.ecore.EDataType and org.eclipse.emf.ecore.EStructuralFeature extend a common superclass
    2
    EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false);
    3
    if (eAnnotation != null)
    3
    if (eAnnotation != null)
    4
    eAnnotation.getDetails().remove("baseType");
    4
    eAnnotation.getDetails().remove("baseType");
    4
    eAnnotation.getDetails().remove("affiliation");
    Differences
    Expression1Expression2Difference
    "baseType""affiliation"LITERAL_VALUE_MISMATCH
    4
    eAnnotation.getDetails().remove("affiliation");
    Precondition Violations (1)
    Row Violation
    1Type org.eclipse.emf.ecore.EDataType of variable eDataType does not match with type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature