for (int i = 0, size = eClassifiers.size(); i < size; ++i) { freeze(eClassifiers.get(i)); }
for (int i = 0, size = eSubpackages.size(); i < size; ++i) { freeze(eSubpackages.get(i)); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EPackageImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EPackageImpl.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 = eClassifiers.size(); i < size; ++i)
1
for (int i = 0, size = eSubpackages.size(); i < size; ++i)
2
      {
2
      {
3
        freeze(eClassifiers.get(i));
3
        freeze(eSubpackages.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.3
Clones locationClones are in the same method
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.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    for (int i = 0, size = eClassifiers.size(); i < size; ++i)
    2
    for (int i = 0, size = eClassifiers.size(); i < size; ++i)
    5
    for (int i = 0, size = eSubpackages.size(); i < size; ++i)
    Differences
    Expression1Expression2Difference
    eClassifierseSubpackagesVARIABLE_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.EClassifier> of variable eClassifiers does not match with type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EPackage> of variable eSubpackages
    • Make classes org.eclipse.emf.common.util.EList and org.eclipse.emf.common.util.EList extend a common superclass
    5
    for (int i = 0, size = eSubpackages.size(); i < size; ++i)
    3
    freeze(eClassifiers.get(i));
    3
    freeze(eClassifiers.get(i));
    6
    freeze(eSubpackages.get(i));
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.EClassifierorg.eclipse.emf.ecore.EPackageVARIABLE_TYPE_MISMATCH
    eClassifierseSubpackagesVARIABLE_NAME_MISMATCH
    org.eclipse.emf.common.util.EListorg.eclipse.emf.common.util.EListVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression eClassifiers.get(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression eSubpackages.get(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.eclipse.emf.ecore.EClassifier of variable eClassifiers.get(i) does not match with type org.eclipse.emf.ecore.EPackage of variable eSubpackages.get(i)
    • Make classes org.eclipse.emf.ecore.EClassifier and org.eclipse.emf.ecore.EPackage extend a common superclass
    Type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EClassifier> of variable eClassifiers does not match with type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EPackage> of variable eSubpackages
    • Make classes org.eclipse.emf.common.util.EList and org.eclipse.emf.common.util.EList extend a common superclass
    6
    freeze(eSubpackages.get(i));
    Precondition Violations (5)
    Row Violation
    1Type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EClassifier> of variable eClassifiers does not match with type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EPackage> of variable eSubpackages
    2Expression eClassifiers.get(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression eSubpackages.get(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Type org.eclipse.emf.ecore.EClassifier of variable eClassifiers.get(i) does not match with type org.eclipse.emf.ecore.EPackage of variable eSubpackages.get(i)
    5Type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EClassifier> of variable eClassifiers does not match with type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EPackage> of variable eSubpackages