EParameter eParameter = (EParameter)theEObject; T result = caseEParameter(eParameter); if (result == null) result = caseETypedElement(eParameter); if (result == null) result = caseENamedElement(eParameter); if (result == null) result = caseEModelElement(eParameter); if (result == null) result = defaultCase(theEObject); return result;
EOperation eOperation = (EOperation)theEObject; T result = caseEOperation(eOperation); if (result == null) result = caseETypedElement(eOperation); if (result == null) result = caseENamedElement(eOperation); if (result == null) result = caseEModelElement(eOperation); if (result == null) result = defaultCase(theEObject); return result;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreSwitch.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreSwitch.java
Method name: T doSwitch(int, EObject) Method name: T doSwitch(int, EObject)
Number of AST nodes: 11 Number of AST nodes: 11
1
EParameter eParameter = (EParameter)theEObject;
1
EOperation eOperation = (EOperation)theEObject;
2
        T result = caseEParameter(eParameter);
2
        T result = caseEOperation(eOperation);
3
        if (result == null) result = caseETypedElement(eParameter);
3
        if (result == null) result = caseETypedElement(eOperation);
4
        if (result == null) result = caseENamedElement(eParameter);
4
        if (result == null) result = caseENamedElement(eOperation);
5
        if (result == null) result = caseEModelElement(eParameter);
5
        if (result == null) result = caseEModelElement(eOperation);
6
        if (result == null) result = defaultCase(theEObject);
6
        if (result == null) result = defaultCase(theEObject);
7
        return result;
7
        return result;
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.6
Clones locationClones are in the same method
Number of node comparisons56
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements9
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)2.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                                        
    105
    EOperation eOperation = (EOperation)theEObject;
                                                                                      
    106
    T result = caseEOperation(eOperation);
    127
    EParameter eParameter = (EParameter)theEObject;
                                                                                                        
    128
    T result = caseEParameter(eParameter);
                                                                                      
    129
    if (result == null)
    107
    if (result == null)
    130
    result = caseETypedElement(eParameter);
    130
    result = caseETypedElement(eParameter);
    108
    result = caseETypedElement(eOperation);
    Differences
    Expression1Expression2Difference
    eParametereOperationVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EParameterorg.eclipse.emf.ecore.EOperationVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EParameter of variable eParameter does not match with type org.eclipse.emf.ecore.EOperation of variable eOperation
    • Make classes org.eclipse.emf.ecore.EParameter and org.eclipse.emf.ecore.EOperation extend a common superclass
    108
    result = caseETypedElement(eOperation);
    131
    if (result == null)
    109
    if (result == null)
    132
    result = caseENamedElement(eParameter);
    132
    result = caseENamedElement(eParameter);
    110
    result = caseENamedElement(eOperation);
    Differences
    Expression1Expression2Difference
    eParametereOperationVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EParameterorg.eclipse.emf.ecore.EOperationVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EParameter of variable eParameter does not match with type org.eclipse.emf.ecore.EOperation of variable eOperation
    • Make classes org.eclipse.emf.ecore.EParameter and org.eclipse.emf.ecore.EOperation extend a common superclass
    110
    result = caseENamedElement(eOperation);
    133
    if (result == null)
    111
    if (result == null)
    134
    result = caseEModelElement(eParameter);
    134
    result = caseEModelElement(eParameter);
    112
    result = caseEModelElement(eOperation);
    Differences
    Expression1Expression2Difference
    eParametereOperationVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EParameterorg.eclipse.emf.ecore.EOperationVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EParameter of variable eParameter does not match with type org.eclipse.emf.ecore.EOperation of variable eOperation
    • Make classes org.eclipse.emf.ecore.EParameter and org.eclipse.emf.ecore.EOperation extend a common superclass
    112
    result = caseEModelElement(eOperation);
    135
    if (result == null)
    113
    if (result == null)
    136
    result = defaultCase(theEObject);
    114
    result = defaultCase(theEObject);
    137
    return result;
    115
    return result;
    Precondition Violations (3)
    Row Violation
    1Type org.eclipse.emf.ecore.EParameter of variable eParameter does not match with type org.eclipse.emf.ecore.EOperation of variable eOperation
    2Type org.eclipse.emf.ecore.EParameter of variable eParameter does not match with type org.eclipse.emf.ecore.EOperation of variable eOperation
    3Type org.eclipse.emf.ecore.EParameter of variable eParameter does not match with type org.eclipse.emf.ecore.EOperation of variable eOperation