for (int i = 0, size = eLiterals.size(); i < size; ++i) { freeze(eLiterals.get(i)); }
for (int i = 0, size = eParameters.size(); i < size; ++i) { freeze(eParameters.get(i)); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EEnumImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EOperationImpl.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 = eLiterals.size(); i < size; ++i)
1
for (int i = 0, size = eParameters.size(); i < size; ++i)
2
      {
2
      {
3
        freeze(eLiterals.get(i));
3
        freeze(eParameters.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.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    for (int i = 0, size = eLiterals.size(); i < size; ++i)
    2
    for (int i = 0, size = eLiterals.size(); i < size; ++i)
    2
    for (int i = 0, size = eParameters.size(); i < size; ++i)
    Differences
    Expression1Expression2Difference
    eLiteralseParametersVARIABLE_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.EEnumLiteral> of variable eLiterals does not match with type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EParameter> of variable eParameters
    • 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 = eParameters.size(); i < size; ++i)
    3
    freeze(eLiterals.get(i));
    3
    freeze(eLiterals.get(i));
    3
    freeze(eParameters.get(i));
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.EEnumLiteralorg.eclipse.emf.ecore.EParameterVARIABLE_TYPE_MISMATCH
    eLiteralseParametersVARIABLE_NAME_MISMATCH
    org.eclipse.emf.common.util.EListorg.eclipse.emf.common.util.EListVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression eLiterals.get(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression eParameters.get(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.eclipse.emf.ecore.EEnumLiteral of variable eLiterals.get(i) does not match with type org.eclipse.emf.ecore.EParameter of variable eParameters.get(i)
    • Make classes org.eclipse.emf.ecore.EEnumLiteral and org.eclipse.emf.ecore.EParameter extend a common superclass
    Type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EEnumLiteral> of variable eLiterals does not match with type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EParameter> of variable eParameters
    • Make classes org.eclipse.emf.common.util.EList and org.eclipse.emf.common.util.EList extend a common superclass
    3
    freeze(eParameters.get(i));
    Precondition Violations (5)
    Row Violation
    1Type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EEnumLiteral> of variable eLiterals does not match with type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EParameter> of variable eParameters
    2Expression eLiterals.get(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression eParameters.get(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Type org.eclipse.emf.ecore.EEnumLiteral of variable eLiterals.get(i) does not match with type org.eclipse.emf.ecore.EParameter of variable eParameters.get(i)
    5Type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EEnumLiteral> of variable eLiterals does not match with type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EParameter> of variable eParameters