for (int i = 0, size = eStructuralFeatures.size(); i < size; ++i) { freeze(eStructuralFeatures.get(i)); }
for (int i = 0, size = eLiterals.size(); i < size; ++i) { freeze(eLiterals.get(i)); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EClassImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EEnumImpl.java
Method name: void freeze() Method name: void freeze()
Number of AST nodes: 2 Number of AST nodes: 2
1
for (int i = 0, size = eStructuralFeatures.size(); i < size; ++i)
1
for (int i = 0, size = eLiterals.size(); i < size; ++i)
2
      {
2
      {
3
        freeze(eStructuralFeatures.get(i));
3
        freeze(eLiterals.get(i));
4
      }
4
      }
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.4
Clones locationClones are in different classes having the same super class
Number of node comparisons5
  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)2.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    10
    for (int i = 0, size = eStructuralFeatures.size(); i < size; ++i)
    10
    for (int i = 0, size = eStructuralFeatures.size(); i < size; ++i)
    2
    for (int i = 0, size = eLiterals.size(); i < size; ++i)
    Differences
    Expression1Expression2Difference
    eStructuralFeatureseLiteralsVARIABLE_NAME_MISMATCH
    org.eclipse.emf.common.util.EListorg.eclipse.emf.common.util.EListVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EStructuralFeature> of variable eStructuralFeatures does not match with type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EEnumLiteral> of variable eLiterals
    • Make classes org.eclipse.emf.common.util.EList and org.eclipse.emf.common.util.EList extend a common superclass
    2
    for (int i = 0, size = eLiterals.size(); i < size; ++i)
    11
    freeze(eStructuralFeatures.get(i));
    11
    freeze(eStructuralFeatures.get(i));
    3
    freeze(eLiterals.get(i));
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.EStructuralFeatureorg.eclipse.emf.ecore.EEnumLiteralVARIABLE_TYPE_MISMATCH
    eStructuralFeatureseLiteralsVARIABLE_NAME_MISMATCH
    org.eclipse.emf.common.util.EListorg.eclipse.emf.common.util.EListVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression eStructuralFeatures.get(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression eLiterals.get(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeatures.get(i) does not match with type org.eclipse.emf.ecore.EEnumLiteral of variable eLiterals.get(i)
    • Make classes org.eclipse.emf.ecore.EStructuralFeature and org.eclipse.emf.ecore.EEnumLiteral extend a common superclass
    Type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EStructuralFeature> of variable eStructuralFeatures does not match with type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EEnumLiteral> of variable eLiterals
    • Make classes org.eclipse.emf.common.util.EList and org.eclipse.emf.common.util.EList extend a common superclass
    3
    freeze(eLiterals.get(i));
    Precondition Violations (5)
    Row Violation
    1Type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EStructuralFeature> of variable eStructuralFeatures does not match with type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EEnumLiteral> of variable eLiterals
    2Expression eStructuralFeatures.get(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression eLiterals.get(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeatures.get(i) does not match with type org.eclipse.emf.ecore.EEnumLiteral of variable eLiterals.get(i)
    5Type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EStructuralFeature> of variable eStructuralFeatures does not match with type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EEnumLiteral> of variable eLiterals