EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false); if (eAnnotation != null) { eAnnotation.getDetails().remove("namespace"); }
EAnnotation eAnnotation = getAnnotation(eDataType, false); if (eAnnotation != null) { eAnnotation.getDetails().remove("minInclusive"); }
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 setNamespace(EStructuralFeature, String) Method name: void setMinInclusiveFacet(EDataType, String)
Number of AST nodes: 3 Number of AST nodes: 3
1
EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false);
1
EAnnotation eAnnotation = getAnnotation(eDataType, false);
2
      if (eAnnotation != null)
2
      if (eAnnotation != null)
3
      {
3
      {
4
        eAnnotation.getDetails().remove("namespace");
4
        eAnnotation.getDetails().remove("minInclusive");
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 comparisons5
  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
    8
    EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false);
    8
    EAnnotation eAnnotation = getAnnotation(eStructuralFeature, false);
    2
    EAnnotation eAnnotation = getAnnotation(eDataType, false);
    Differences
    Expression1Expression2Difference
    eStructuralFeatureeDataTypeVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EStructuralFeatureorg.eclipse.emf.ecore.EDataTypeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.EDataType of variable eDataType
    • Make classes org.eclipse.emf.ecore.EStructuralFeature and org.eclipse.emf.ecore.EDataType extend a common superclass
    2
    EAnnotation eAnnotation = getAnnotation(eDataType, false);
    9
    if (eAnnotation != null)
    3
    if (eAnnotation != null)
    10
    eAnnotation.getDetails().remove("namespace");
    10
    eAnnotation.getDetails().remove("namespace");
    4
    eAnnotation.getDetails().remove("minInclusive");
    Differences
    Expression1Expression2Difference
    "namespace""minInclusive"LITERAL_VALUE_MISMATCH
    4
    eAnnotation.getDetails().remove("minInclusive");
    Precondition Violations (1)
    Row Violation
    1Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.EDataType of variable eDataType