10374-2-3

case XMLTypePackage.ANY_TYPE: return createAnyType(); case XMLTypePackage.PROCESSING_INSTRUCTION: return createProcessingInstruction(); case XMLTypePackage.SIMPLE_ANY_TYPE: return createSimpleAnyType(); case XMLTypePackage.XML_TYPE_DOCUMENT_ROOT: return createXMLTypeDocumentRoot(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
case ChangePackage.FEATURE_CHANGE: return createFeatureChange(); case ChangePackage.LIST_CHANGE: return createListChange(); case ChangePackage.RESOURCE_CHANGE: return createResourceChange(); case ChangePackage.FEATURE_MAP_ENTRY: return createFeatureMapEntry(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/impl/XMLTypeFactoryImpl.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/impl/ChangeFactoryImpl.java
Method name: `EObject create(EClass)` |  | Method name: `EObject create(EClass)`
Number of AST nodes: 10 |  | Number of AST nodes: 10

1

    case XMLTypePackage.ANY_TYPE: return createAnyType();↵

1

    case ChangePackage.FEATURE_CHANGE: return createFeatureChange();↵

2

          case XMLTypePackage.PROCESSING_INSTRUCTION: return createProcessingInstruction();↵

2

          case ChangePackage.LIST_CHANGE: return createListChange();↵

3

          case XMLTypePackage.SIMPLE_ANY_TYPE: return createSimpleAnyType();↵

3

          case ChangePackage.RESOURCE_CHANGE: return createResourceChange();↵

4

          case XMLTypePackage.XML_TYPE_DOCUMENT_ROOT: return createXMLTypeDocumentRoot();↵

4

          case ChangePackage.FEATURE_MAP_ENTRY: return createFeatureMapEntry();↵

5

          default:↵

5

          default:↵

6

            throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");

6

            throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");

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.0
Clones location | Clones are in different classes having the same super class
Number of node comparisons | 66

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 6
   Number of unmapped statements in the first code fragment | 4
   Number of unmapped statements in the second code fragment | 4
   Time elapsed for statement mapping (ms) | 0.0
   Clone type | Type 2

   Mapped Statements
   ID | Statement |  | ID | Statement
   --- | --- | --- | --- | ---

   2

       case XMLTypePackage.ANY_TYPE:

   2 | case XMLTypePackage.ANY_TYPE:
   6 | case ChangePackage.FEATURE_CHANGE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.xml.type.XMLTypePackage | org.eclipse.emf.ecore.change.ChangePackage | VARIABLE_TYPE_MISMATCH
   ANY_TYPE | FEATURE_CHANGE | VARIABLE_NAME_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage
   - Make classes org.eclipse.emf.ecore.xml.type.XMLTypePackage and org.eclipse.emf.ecore.change.ChangePackage extend a common superclass

   6

       case ChangePackage.FEATURE_CHANGE:

   3

       return createAnyType();

   3 | return createAnyType();

   Preondition Violations
   Unmatched return createAnyType();

   7 | return createFeatureChange();

   Preondition Violations
   Unmatched return createFeatureChange();

   7

       return createFeatureChange();

   4

       case XMLTypePackage.PROCESSING_INSTRUCTION:

   4 | case XMLTypePackage.PROCESSING_INSTRUCTION:
   8 | case ChangePackage.LIST_CHANGE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.xml.type.XMLTypePackage | org.eclipse.emf.ecore.change.ChangePackage | VARIABLE_TYPE_MISMATCH
   PROCESSING_INSTRUCTION | LIST_CHANGE | VARIABLE_NAME_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage
   - Make classes org.eclipse.emf.ecore.xml.type.XMLTypePackage and org.eclipse.emf.ecore.change.ChangePackage extend a common superclass

   8

       case ChangePackage.LIST_CHANGE:

   5

       return createProcessingInstruction();

   5 | return createProcessingInstruction();

   Preondition Violations
   Unmatched return createProcessingInstruction();

   9 | return createListChange();

   Preondition Violations
   Unmatched return createListChange();

   9

       return createListChange();

   6

       case XMLTypePackage.SIMPLE_ANY_TYPE:

   6 | case XMLTypePackage.SIMPLE_ANY_TYPE:
   10 | case ChangePackage.RESOURCE_CHANGE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.xml.type.XMLTypePackage | org.eclipse.emf.ecore.change.ChangePackage | VARIABLE_TYPE_MISMATCH
   SIMPLE_ANY_TYPE | RESOURCE_CHANGE | VARIABLE_NAME_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage
   - Make classes org.eclipse.emf.ecore.xml.type.XMLTypePackage and org.eclipse.emf.ecore.change.ChangePackage extend a common superclass

   10

       case ChangePackage.RESOURCE_CHANGE:

   7

       return createSimpleAnyType();

   7 | return createSimpleAnyType();

   Preondition Violations
   Unmatched return createSimpleAnyType();

   11 | return createResourceChange();

   Preondition Violations
   Unmatched return createResourceChange();

   11

       return createResourceChange();

   8

       case XMLTypePackage.XML_TYPE_DOCUMENT_ROOT:

   8 | case XMLTypePackage.XML_TYPE_DOCUMENT_ROOT:
   12 | case ChangePackage.FEATURE_MAP_ENTRY:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.xml.type.XMLTypePackage | org.eclipse.emf.ecore.change.ChangePackage | VARIABLE_TYPE_MISMATCH
   XML_TYPE_DOCUMENT_ROOT | FEATURE_MAP_ENTRY | VARIABLE_NAME_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage
   - Make classes org.eclipse.emf.ecore.xml.type.XMLTypePackage and org.eclipse.emf.ecore.change.ChangePackage extend a common superclass

   12

       case ChangePackage.FEATURE_MAP_ENTRY:

   9

       return createXMLTypeDocumentRoot();

   9 | return createXMLTypeDocumentRoot();

   Preondition Violations
   Unmatched return createXMLTypeDocumentRoot();

   13 | return createFeatureMapEntry();

   Preondition Violations
   Unmatched return createFeatureMapEntry();

   13

       return createFeatureMapEntry();

   10

       default:

   14

       default:

   11

       throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");

   15

       throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");

   Precondition Violations (12)
   Row | Violation
   --- | ---
   1 | Type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage
   2 | Unmatched return createAnyType();
   3 | Unmatched return createFeatureChange();
   4 | Type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage
   5 | Unmatched return createProcessingInstruction();
   6 | Unmatched return createListChange();
   7 | Type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage
   8 | Unmatched return createSimpleAnyType();
   9 | Unmatched return createResourceChange();
   10 | Type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage
   11 | Unmatched return createXMLTypeDocumentRoot();
   12 | Unmatched return createFeatureMapEntry();