TypeConverter typeConverter = (TypeConverter)theEObject;
T result = caseTypeConverter(typeConverter);
if (result == null) result = caseMappingHelper(typeConverter);
if (result == null) result = defaultCase(theEObject);
return result;
MappingStrategy mappingStrategy = (MappingStrategy)theEObject;
T result = caseMappingStrategy(mappingStrategy);
if (result == null) result = caseMappingHelper(mappingStrategy);
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/mapping/util/MappingSwitch.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/util/MappingSwitch.java
|
Method name: T doSwitch(int, EObject)
|
|
Method name: T doSwitch(int, EObject)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | TypeConverter typeConverter = (TypeConverter)theEObject;↵ | | 1 | MappingStrategy mappingStrategy = (MappingStrategy)theEObject;↵
|
2 | T result = caseTypeConverter(typeConverter);↵ | | 2 | T result = caseMappingStrategy(mappingStrategy);↵
|
3 | if (result == null) result = caseMappingHelper(typeConverter);↵ | | 3 | if (result == null) result = caseMappingHelper(mappingStrategy);↵
|
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) | 0.9 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
15 | TypeConverter typeConverter = (TypeConverter)theEObject; | | | |
16 | T result = caseTypeConverter(typeConverter); | | | |
| | | 43 | MappingStrategy mappingStrategy = (MappingStrategy)theEObject; |
| | | 44 | T result = caseMappingStrategy(mappingStrategy); |
17 | if (result == null) | | 45 | if (result == null) |
18 | result = caseMappingHelper(typeConverter); | | 46 | result = caseMappingHelper(mappingStrategy); |
19 | if (result == null) | | 47 | if (result == null) |
20 | result = defaultCase(theEObject); | | 48 | result = defaultCase(theEObject); |
21 | return result; | | 49 | return result; |
Precondition Violations (1)
Row |
Violation |
1 | Type org.eclipse.emf.mapping.TypeConverter of variable typeConverter does not match with type org.eclipse.emf.mapping.MappingStrategy of variable mappingStrategy |