EAnnotation eAnnotation = (EAnnotation)theEObject; T result = caseEAnnotation(eAnnotation); if (result == null) result = caseEModelElement(eAnnotation); if (result == null) result = defaultCase(theEObject); return result;
EFactory eFactory = (EFactory)theEObject; T result = caseEFactory(eFactory); if (result == null) result = caseEModelElement(eFactory); 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: 7 Number of AST nodes: 7
1
EAnnotation eAnnotation = (EAnnotation)theEObject;
1
EFactory eFactory = (EFactory)theEObject;
2
        T result = caseEAnnotation(eAnnotation);
2
        T result = caseEFactory(eFactory);
3
        if (result == null) result = caseEModelElement(eAnnotation);
3
        if (result == null) result = caseEModelElement(eFactory);
4
        if (result == null) result = defaultCase(theEObject);
4
        if (result == null) result = defaultCase(theEObject);
5
        return result;
5
        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.2
Clones locationClones are in the same method
Number of node comparisons23
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)1.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    17
    EAnnotation eAnnotation = (EAnnotation)theEObject;
                                                                                                            
    18
    T result = caseEAnnotation(eAnnotation);
                                                                                        
                                                                                          
    83
    EFactory eFactory = (EFactory)theEObject;
                                                                            
    84
    T result = caseEFactory(eFactory);
    19
    if (result == null)
    85
    if (result == null)
    20
    result = caseEModelElement(eAnnotation);
    20
    result = caseEModelElement(eAnnotation);
    86
    result = caseEModelElement(eFactory);
    Differences
    Expression1Expression2Difference
    eAnnotationeFactoryVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EAnnotationorg.eclipse.emf.ecore.EFactoryVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EAnnotation of variable eAnnotation does not match with type org.eclipse.emf.ecore.EFactory of variable eFactory
    • Make classes org.eclipse.emf.ecore.EAnnotation and org.eclipse.emf.ecore.EFactory extend a common superclass
    86
    result = caseEModelElement(eFactory);
    21
    if (result == null)
    87
    if (result == null)
    22
    result = defaultCase(theEObject);
    88
    result = defaultCase(theEObject);
    23
    return result;
    89
    return result;
    Precondition Violations (1)
    Row Violation
    1Type org.eclipse.emf.ecore.EAnnotation of variable eAnnotation does not match with type org.eclipse.emf.ecore.EFactory of variable eFactory