10881-3-4

return createUnsignedLongFromString(eDataType, initialValue); case XMLTypePackage.UNSIGNED_SHORT: return createUnsignedShortFromString(eDataType, initialValue); case XMLTypePackage.UNSIGNED_SHORT_OBJECT: return createUnsignedShortObjectFromString(eDataType, initialValue); default: throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
return createLangTypeFromString(eDataType, initialValue); case XMLNamespacePackage.LANG_TYPE_NULL: return createLangTypeNullFromString(eDataType, initialValue); case XMLNamespacePackage.SPACE_TYPE_OBJECT: return createSpaceTypeObjectFromString(eDataType, initialValue); default: throw new IllegalArgumentException("The datatype '" + eDataType.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/xml/namespace/impl/XMLNamespaceFactoryImpl.java
Method name: `Object createFromString(EDataType, String)` |  | Method name: `Object createFromString(EDataType, String)`
Number of AST nodes: 7 |  | Number of AST nodes: 7

1

    return createUnsignedLongFromString(eDataType, initialValue);↵

1

    return createLangTypeFromString(eDataType, initialValue);↵

2

          case XMLTypePackage.UNSIGNED_SHORT:↵

2

          case XMLNamespacePackage.LANG_TYPE_NULL:↵

3

            return createUnsignedShortFromString(eDataType, initialValue);↵

3

            return createLangTypeNullFromString(eDataType, initialValue);↵

4

          case XMLTypePackage.UNSIGNED_SHORT_OBJECT:↵

4

          case XMLNamespacePackage.SPACE_TYPE_OBJECT:↵

5

            return createUnsignedShortObjectFromString(eDataType, initialValue);↵

5

            return createSpaceTypeObjectFromString(eDataType, initialValue);↵

6

          default:↵

6

          default:↵

7

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

7

            throw new IllegalArgumentException("The datatype '" + eDataType.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 | 30

1. {Non-refactorable}

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

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

   5 | return createLangTypeFromString(eDataType, initialValue);

   Preondition Violations
   Unmatched return createLangTypeFromString(eDataType,initialValue);

   5

       return createLangTypeFromString(eDataType, initialValue);

   113

       return createUnsignedLongFromString(eDataType, initialValue);

   113 | return createUnsignedLongFromString(eDataType, initialValue);

   Preondition Violations
   Unmatched return createUnsignedLongFromString(eDataType,initialValue);

   114

       case XMLTypePackage.UNSIGNED_SHORT:

   114 | case XMLTypePackage.UNSIGNED_SHORT:
   8 | case XMLNamespacePackage.SPACE_TYPE_OBJECT:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.xml.type.XMLTypePackage | org.eclipse.emf.ecore.xml.namespace.XMLNamespacePackage | VARIABLE_TYPE_MISMATCH
   UNSIGNED_SHORT | SPACE_TYPE_OBJECT | 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.xml.namespace.XMLNamespacePackage of variable XMLNamespacePackage
   - Make classes org.eclipse.emf.ecore.xml.type.XMLTypePackage and org.eclipse.emf.ecore.xml.namespace.XMLNamespacePackage extend a common superclass

   8

       case XMLNamespacePackage.SPACE_TYPE_OBJECT:

   115

       return createUnsignedShortFromString(eDataType, initialValue);

   115 | return createUnsignedShortFromString(eDataType, initialValue);

   Preondition Violations
   Unmatched return createUnsignedShortFromString(eDataType,initialValue);

   116

       case XMLTypePackage.UNSIGNED_SHORT_OBJECT:

   116 | case XMLTypePackage.UNSIGNED_SHORT_OBJECT:
   6 | case XMLNamespacePackage.LANG_TYPE_NULL:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.xml.type.XMLTypePackage | org.eclipse.emf.ecore.xml.namespace.XMLNamespacePackage | VARIABLE_TYPE_MISMATCH
   UNSIGNED_SHORT_OBJECT | LANG_TYPE_NULL | 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.xml.namespace.XMLNamespacePackage of variable XMLNamespacePackage
   - Make classes org.eclipse.emf.ecore.xml.type.XMLTypePackage and org.eclipse.emf.ecore.xml.namespace.XMLNamespacePackage extend a common superclass

   6

       case XMLNamespacePackage.LANG_TYPE_NULL:

   7 | return createLangTypeNullFromString(eDataType, initialValue);

   Preondition Violations
   Unmatched return createLangTypeNullFromString(eDataType,initialValue);

   7

       return createLangTypeNullFromString(eDataType, initialValue);

   9 | return createSpaceTypeObjectFromString(eDataType, initialValue);

   Preondition Violations
   Unmatched return createSpaceTypeObjectFromString(eDataType,initialValue);

   9

       return createSpaceTypeObjectFromString(eDataType, initialValue);

   117

       return createUnsignedShortObjectFromString(eDataType, initialValue);

   117 | return createUnsignedShortObjectFromString(eDataType, initialValue);

   Preondition Violations
   Unmatched return createUnsignedShortObjectFromString(eDataType,initialValue);

   118

       default:

   10

       default:

   119

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

   11

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

   Precondition Violations (8)
   Row | Violation
   --- | ---
   1 | Unmatched return createLangTypeFromString(eDataType,initialValue);
   2 | Unmatched return createUnsignedLongFromString(eDataType,initialValue);
   3 | Type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage does not match with type org.eclipse.emf.ecore.xml.namespace.XMLNamespacePackage of variable XMLNamespacePackage
   4 | Unmatched return createUnsignedShortFromString(eDataType,initialValue);
   5 | Type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage does not match with type org.eclipse.emf.ecore.xml.namespace.XMLNamespacePackage of variable XMLNamespacePackage
   6 | Unmatched return createLangTypeNullFromString(eDataType,initialValue);
   7 | Unmatched return createSpaceTypeObjectFromString(eDataType,initialValue);
   8 | Unmatched return createUnsignedShortObjectFromString(eDataType,initialValue);