ETypeParameter eTypeParameter = (ETypeParameter)theEObject; T result = caseETypeParameter(eTypeParameter); if (result == null) result = caseENamedElement(eTypeParameter); if (result == null) result = caseEModelElement(eTypeParameter); if (result == null) result = defaultCase(theEObject); return result;
EEnumLiteral eEnumLiteral = (EEnumLiteral)theEObject; T result = caseEEnumLiteral(eEnumLiteral); if (result == null) result = caseENamedElement(eEnumLiteral); if (result == null) result = caseEModelElement(eEnumLiteral); 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: 9 Number of AST nodes: 9
1
ETypeParameter eTypeParameter = (ETypeParameter)theEObject;
1
EEnumLiteral eEnumLiteral = (EEnumLiteral)theEObject;
2
        T result = caseETypeParameter(eTypeParameter);
2
        T result = caseEEnumLiteral(eEnumLiteral);
3
        if (result == null) result = caseENamedElement(eTypeParameter);
3
        if (result == null) result = caseENamedElement(eEnumLiteral);
4
        if (result == null) result = caseEModelElement(eTypeParameter);
4
        if (result == null) result = caseEModelElement(eEnumLiteral);
5
        if (result == null) result = defaultCase(theEObject);
5
        if (result == null) result = defaultCase(theEObject);
6
        return result;
6
        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.4
Clones locationClones are in the same method
Number of node comparisons37
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    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.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                                                  
    73
    EEnumLiteral eEnumLiteral = (EEnumLiteral)theEObject;
                                                                                            
    74
    T result = caseEEnumLiteral(eEnumLiteral);
    187
    ETypeParameter eTypeParameter = (ETypeParameter)theEObject;
                                                                                                                                
    188
    T result = caseETypeParameter(eTypeParameter);
                                                                                                      
    189
    if (result == null)
    75
    if (result == null)
    190
    result = caseENamedElement(eTypeParameter);
    190
    result = caseENamedElement(eTypeParameter);
    76
    result = caseENamedElement(eEnumLiteral);
    Differences
    Expression1Expression2Difference
    eTypeParametereEnumLiteralVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.ETypeParameterorg.eclipse.emf.ecore.EEnumLiteralVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter does not match with type org.eclipse.emf.ecore.EEnumLiteral of variable eEnumLiteral
    • Make classes org.eclipse.emf.ecore.ETypeParameter and org.eclipse.emf.ecore.EEnumLiteral extend a common superclass
    76
    result = caseENamedElement(eEnumLiteral);
    191
    if (result == null)
    77
    if (result == null)
    192
    result = caseEModelElement(eTypeParameter);
    192
    result = caseEModelElement(eTypeParameter);
    78
    result = caseEModelElement(eEnumLiteral);
    Differences
    Expression1Expression2Difference
    eTypeParametereEnumLiteralVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.ETypeParameterorg.eclipse.emf.ecore.EEnumLiteralVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter does not match with type org.eclipse.emf.ecore.EEnumLiteral of variable eEnumLiteral
    • Make classes org.eclipse.emf.ecore.ETypeParameter and org.eclipse.emf.ecore.EEnumLiteral extend a common superclass
    78
    result = caseEModelElement(eEnumLiteral);
    193
    if (result == null)
    79
    if (result == null)
    194
    result = defaultCase(theEObject);
    80
    result = defaultCase(theEObject);
    195
    return result;
    81
    return result;
    Precondition Violations (2)
    Row Violation
    1Type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter does not match with type org.eclipse.emf.ecore.EEnumLiteral of variable eEnumLiteral
    2Type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter does not match with type org.eclipse.emf.ecore.EEnumLiteral of variable eEnumLiteral