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;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 23 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 1.3 |
Clone type | Type 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); | | 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 |
1 | Type org.eclipse.emf.ecore.EAnnotation of variable eAnnotation does not match with type org.eclipse.emf.ecore.EFactory of variable eFactory |