ChangeKind result = ChangeKind.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
SpaceType result = SpaceType.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/impl/ChangeFactoryImpl.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/namespace/impl/XMLNamespaceFactoryImpl.java
|
Method name: ChangeKind createChangeKindFromString(EDataType, String)
|
|
Method name: SpaceType createSpaceTypeFromString(EDataType, String)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | ChangeKind result = ChangeKind.get(initialValue);↵ | | 1 | SpaceType result = SpaceType.get(initialValue);↵
|
2 | if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");↵ | | 2 | if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");↵
|
3 | return result; | | 3 | 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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 8 |
-
{Non-refactorable}
Mapping Summary
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 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
| | | 1 | SpaceType result = SpaceType.get(initialValue); |
1 | ChangeKind result = ChangeKind.get(initialValue); | | | |
2 | if (result == null) | | 2 | if (result == null) |
3 | throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); | | 3 | throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); |
| | | 4 | return result; |
4 | return result; | | | |
Precondition Violations (3)
Row |
Violation |
1 | Type org.eclipse.emf.ecore.change.ChangeKind of variable result does not match with type org.eclipse.emf.ecore.xml.namespace.SpaceType of variable result |
2 | Unmatched return result; |
3 | Unmatched return result; |