ETypedElement eTypedElement = (ETypedElement)theEObject; T result = caseETypedElement(eTypedElement); if (result == null) result = caseENamedElement(eTypedElement); if (result == null) result = caseEModelElement(eTypedElement); 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
ETypedElement eTypedElement = (ETypedElement)theEObject;
1
EEnumLiteral eEnumLiteral = (EEnumLiteral)theEObject;
2
        T result = caseETypedElement(eTypedElement);
2
        T result = caseEEnumLiteral(eEnumLiteral);
3
        if (result == null) result = caseENamedElement(eTypedElement);
3
        if (result == null) result = caseENamedElement(eEnumLiteral);
4
        if (result == null) result = caseEModelElement(eTypedElement);
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.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                                                  
    73
    EEnumLiteral eEnumLiteral = (EEnumLiteral)theEObject;
                                                                                            
    74
    T result = caseEEnumLiteral(eEnumLiteral);
    165
    ETypedElement eTypedElement = (ETypedElement)theEObject;
                                                                                                                          
    166
    T result = caseETypedElement(eTypedElement);
                                                                                                  
    167
    if (result == null)
    75
    if (result == null)
    168
    result = caseENamedElement(eTypedElement);
    168
    result = caseENamedElement(eTypedElement);
    76
    result = caseENamedElement(eEnumLiteral);
    Differences
    Expression1Expression2Difference
    eTypedElementeEnumLiteralVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.ETypedElementorg.eclipse.emf.ecore.EEnumLiteralVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.ETypedElement of variable eTypedElement does not match with type org.eclipse.emf.ecore.EEnumLiteral of variable eEnumLiteral
    • Make classes org.eclipse.emf.ecore.ETypedElement and org.eclipse.emf.ecore.EEnumLiteral extend a common superclass
    76
    result = caseENamedElement(eEnumLiteral);
    169
    if (result == null)
    77
    if (result == null)
    170
    result = caseEModelElement(eTypedElement);
    170
    result = caseEModelElement(eTypedElement);
    78
    result = caseEModelElement(eEnumLiteral);
    Differences
    Expression1Expression2Difference
    eTypedElementeEnumLiteralVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.ETypedElementorg.eclipse.emf.ecore.EEnumLiteralVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.ETypedElement of variable eTypedElement does not match with type org.eclipse.emf.ecore.EEnumLiteral of variable eEnumLiteral
    • Make classes org.eclipse.emf.ecore.ETypedElement and org.eclipse.emf.ecore.EEnumLiteral extend a common superclass
    78
    result = caseEModelElement(eEnumLiteral);
    171
    if (result == null)
    79
    if (result == null)
    172
    result = defaultCase(theEObject);
    80
    result = defaultCase(theEObject);
    173
    return result;
    81
    return result;
    Precondition Violations (2)
    Row Violation
    1Type org.eclipse.emf.ecore.ETypedElement of variable eTypedElement does not match with type org.eclipse.emf.ecore.EEnumLiteral of variable eEnumLiteral
    2Type org.eclipse.emf.ecore.ETypedElement of variable eTypedElement does not match with type org.eclipse.emf.ecore.EEnumLiteral of variable eEnumLiteral