File path: /emf-2.4.1/src/org/eclipse/emf/mapping/util/MappingSwitch.java | File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/util/Ecore2XMLSwitch.java | |||
Method name: T doSwitch(EClass, EObject)
|
Method name: T doSwitch(EClass, EObject)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (theEClass.eContainer() == modelPackage)↵ | 1 | if (theEClass.eContainer() == modelPackage)↵ | |
2 | {↵ | 2 | {↵ | |
3 | return doSwitch(theEClass.getClassifierID(), theEObject);↵ | 3 | return doSwitch(theEClass.getClassifierID(), theEObject);↵ | |
4 | }↵ | 4 | }↵ | |
5 | else↵ | 5 | else↵ | |
6 | {↵ | 6 | {↵ | |
7 | List<EClass> eSuperTypes = theEClass.getESuperTypes();↵ | 7 | List<EClass> eSuperTypes = theEClass.getESuperTypes();↵ | |
8 | return↵ | 8 | return↵ | |
9 | eSuperTypes.isEmpty() ?↵ | 9 | eSuperTypes.isEmpty() ?↵ | |
10 | defaultCase(theEObject) :↵ | 10 | defaultCase(theEObject) :↵ | |
11 | doSwitch(eSuperTypes.get(0), theEObject);↵ | 11 | doSwitch(eSuperTypes.get(0), theEObject);↵ | |
12 | } | 12 |
| |
See real code fragment | See real code fragment |
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 different classes |
Number of node comparisons | 16 |
Number of mapped statements | 2 |
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) | 0.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (theEClass.eContainer() == modelPackage) |
| 1 | if (theEClass.eContainer() == modelPackage) | |||||||||||
|
| 2 | return doSwitch(theEClass.getClassifierID(), theEObject); | ||||||||||||
2 | return doSwitch(theEClass.getClassifierID(), theEObject); |
| | ||||||||||||
else | else | ||||||||||||||
3 | List<EClass> eSuperTypes = theEClass.getESuperTypes(); | 3 | List<EClass> eSuperTypes = theEClass.getESuperTypes(); | ||||||||||||
| 4 | return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject); | |||||||||||||
4 | return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject); | |
Row | Violation |
---|---|
1 | Type org.eclipse.emf.mapping.MappingPackage of variable modelPackage does not match with type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage of variable modelPackage |
2 | Unmatched statement return doSwitch(theEClass.getClassifierID(),theEObject); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched return doSwitch(theEClass.getClassifierID(),theEObject); |
4 | Unmatched statement return doSwitch(theEClass.getClassifierID(),theEObject); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Unmatched return doSwitch(theEClass.getClassifierID(),theEObject); |