EList<EStructuralFeature> eAllStructuralFeatures = eSuperType.getEAllStructuralFeatures(); if (eAllStructuralFeatures.contains(eIDAttribute) && eAllStructuralFeatures.contains(eAttribute)) { continue LOOP; }
EList<EStructuralFeature> eAllStructuralFeatures = eSuperType.getEAllStructuralFeatures(); if (eAllStructuralFeatures.contains(eStructuralFeature) && eAllStructuralFeatures.contains(otherEStructuralFeature)) { continue LOOP; }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreValidator.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreValidator.java
Method name: boolean validateEClass_AtMostOneID(EClass, DiagnosticChain, Map) Method name: boolean validateEClass_UniqueFeatureNames(EClass, DiagnosticChain, Map)
Number of AST nodes: 3 Number of AST nodes: 3
1
EList<EStructuralFeature> eAllStructuralFeatures = eSuperType.getEAllStructuralFeatures();
1
EList<EStructuralFeature> eAllStructuralFeatures = eSuperType.getEAllStructuralFeatures();
2
              if (eAllStructuralFeatures.contains(eIDAttribute) && eAllStructuralFeatures.contains(eAttribute))
2
                  if (eAllStructuralFeatures.contains(eStructuralFeature) && eAllStructuralFeatures.contains(
3
otherEStructuralFeature))
3
              {
4
                  {
4
                continue LOOP;
5
                    continue LOOP;
5
              }
6
                  }
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.3
Clones locationClones are declared in the same class
Number of node comparisons7
  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.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    10
    EList<EStructuralFeature> eAllStructuralFeatures = eSuperType.getEAllStructuralFeatures();
    23
    EList<EStructuralFeature> eAllStructuralFeatures = eSuperType.getEAllStructuralFeatures();
    11
    if (eAllStructuralFeatures.contains(eIDAttribute) && eAllStructuralFeatures.contains(eAttribute))
    11
    if (eAllStructuralFeatures.contains(eIDAttribute) && eAllStructuralFeatures.contains(eAttribute))
    24
    if (eAllStructuralFeatures.contains(eStructuralFeature) && eAllStructuralFeatures.contains(otherEStructuralFeature))
    Differences
    Expression1Expression2Difference
    eIDAttributeeStructuralFeatureVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EAttributeorg.eclipse.emf.ecore.EStructuralFeatureVARIABLE_TYPE_MISMATCH
    eAttributeotherEStructuralFeatureVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EAttributeorg.eclipse.emf.ecore.EStructuralFeatureVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EAttribute of variable eIDAttribute does not match with type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature
    • Make classes org.eclipse.emf.ecore.EAttribute and org.eclipse.emf.ecore.EStructuralFeature extend a common superclass
    Type org.eclipse.emf.ecore.EAttribute of variable eAttribute does not match with type org.eclipse.emf.ecore.EStructuralFeature of variable otherEStructuralFeature
    • Make classes org.eclipse.emf.ecore.EAttribute and org.eclipse.emf.ecore.EStructuralFeature extend a common superclass
    24
    if (eAllStructuralFeatures.contains(eStructuralFeature) && eAllStructuralFeatures.contains(otherEStructuralFeature))
    12
    continue LOOP;
    12
    continue LOOP;
    25
    continue LOOP;
    Preondition Violations
    Statement continue LOOP; without innermost loop
    Statement continue LOOP; without innermost loop
    25
    continue LOOP;
    Precondition Violations (4)
    Row Violation
    1Type org.eclipse.emf.ecore.EAttribute of variable eIDAttribute does not match with type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature
    2Type org.eclipse.emf.ecore.EAttribute of variable eAttribute does not match with type org.eclipse.emf.ecore.EStructuralFeature of variable otherEStructuralFeature
    3Statement continue LOOP; without innermost loop
    4Statement continue LOOP; without innermost loop