EAnnotation eAnnotation = getAnnotation(ePackage, false); if (eAnnotation != null) { eAnnotation.getDetails().remove("qualified"); }
EAnnotation eAnnotation = getAnnotation(eClass, false); if (eAnnotation != null) { eAnnotation.getDetails().remove("kind"); }
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 setQualified(EPackage, boolean) Method name: void setContentKind(EClass, int)
Number of AST nodes: 3 Number of AST nodes: 3
1
EAnnotation eAnnotation = getAnnotation(ePackage, false);
1
EAnnotation eAnnotation = getAnnotation(eClass, false);
2
      if (eAnnotation != null)
2
      if (eAnnotation != null)
3
      {
3
      {
4
        eAnnotation.getDetails().remove("qualified");
4
        eAnnotation.getDetails().remove("kind");
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.1
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
    4
    EAnnotation eAnnotation = getAnnotation(ePackage, false);
    4
    EAnnotation eAnnotation = getAnnotation(ePackage, false);
    4
    EAnnotation eAnnotation = getAnnotation(eClass, false);
    Differences
    Expression1Expression2Difference
    ePackageeClassVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EPackageorg.eclipse.emf.ecore.EClassVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EPackage of variable ePackage does not match with type org.eclipse.emf.ecore.EClass of variable eClass
    • Make classes org.eclipse.emf.ecore.EPackage and org.eclipse.emf.ecore.EClass extend a common superclass
    4
    EAnnotation eAnnotation = getAnnotation(eClass, false);
    5
    if (eAnnotation != null)
    5
    if (eAnnotation != null)
    6
    eAnnotation.getDetails().remove("qualified");
    6
    eAnnotation.getDetails().remove("qualified");
    6
    eAnnotation.getDetails().remove("kind");
    Differences
    Expression1Expression2Difference
    "qualified""kind"LITERAL_VALUE_MISMATCH
    6
    eAnnotation.getDetails().remove("kind");
    Precondition Violations (1)
    Row Violation
    1Type org.eclipse.emf.ecore.EPackage of variable ePackage does not match with type org.eclipse.emf.ecore.EClass of variable eClass