for (int i = 0, size = eOperations.size(); i < size; ++i) { freeze(eOperations.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/EClassImpl.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 = eOperations.size(); i < size; ++i)
1
for (int i = 0, size = eParameters.size(); i < size; ++i)
2
      {
2
      {
3
        freeze(eOperations.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.3
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
    13
    for (int i = 0, size = eOperations.size(); i < size; ++i)
    13
    for (int i = 0, size = eOperations.size(); i < size; ++i)
    2
    for (int i = 0, size = eParameters.size(); i < size; ++i)
    Differences
    Expression1Expression2Difference
    eOperationseParametersVARIABLE_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.EOperation> of variable eOperations 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)
    14
    freeze(eOperations.get(i));
    14
    freeze(eOperations.get(i));
    3
    freeze(eParameters.get(i));
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.EOperationorg.eclipse.emf.ecore.EParameterVARIABLE_TYPE_MISMATCH
    eOperationseParametersVARIABLE_NAME_MISMATCH
    org.eclipse.emf.common.util.EListorg.eclipse.emf.common.util.EListVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression eOperations.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.EOperation of variable eOperations.get(i) does not match with type org.eclipse.emf.ecore.EParameter of variable eParameters.get(i)
    • Make classes org.eclipse.emf.ecore.EOperation and org.eclipse.emf.ecore.EParameter extend a common superclass
    Type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EOperation> of variable eOperations 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.EOperation> of variable eOperations does not match with type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EParameter> of variable eParameters
    2Expression eOperations.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.EOperation of variable eOperations.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.EOperation> of variable eOperations does not match with type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.EParameter> of variable eParameters