File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/namespace/impl/XMLNamespaceFactoryImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2ecore/impl/Ecore2EcoreFactoryImpl.java | |||
Method name: EObject create(EClass)
|
Method name: EObject create(EClass)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | switch (eClass.getClassifierID())↵ | 1 | switch (eClass.getClassifierID())↵ | |
2 | {↵ | 2 | {↵ | |
3 | case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT: return createXMLNamespaceDocumentRoot();↵ | 3 | case Ecore2EcorePackage.ECORE2_ECORE_MAPPING_ROOT: return createEcore2EcoreMappingRoot();↵ | |
4 | default:↵ | 4 | default:↵ | |
5 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");↵ | 5 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");↵ | |
6 | } | 6 |
| |
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 13 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | switch (eClass.getClassifierID()) | 1 | switch (eClass.getClassifierID()) | |||||||||||||||
2 | case XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT: |
| 2 | case Ecore2EcorePackage.ECORE2_ECORE_MAPPING_ROOT: | ||||||||||||||
|
| 3 | return createEcore2EcoreMappingRoot(); | |||||||||||||||
3 | return createXMLNamespaceDocumentRoot(); |
| | |||||||||||||||
4 | default: | 4 | default: | |||||||||||||||
5 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); | 5 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
Row | Violation |
---|---|
1 | Type org.eclipse.emf.ecore.xml.namespace.XMLNamespacePackage of variable XMLNamespacePackage does not match with type org.eclipse.emf.mapping.ecore2ecore.Ecore2EcorePackage of variable Ecore2EcorePackage |
2 | Unmatched return createEcore2EcoreMappingRoot(); |
3 | Unmatched return createXMLNamespaceDocumentRoot(); |