10881-5-6

return convertEShortToString(eDataType, instanceValue); case EcorePackage.ESHORT_OBJECT: return convertEShortObjectToString(eDataType, instanceValue); case EcorePackage.ESTRING: return convertEStringToString(eDataType, instanceValue); default: throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
return convertUnsignedLongToString(eDataType, instanceValue); case XMLTypePackage.UNSIGNED_SHORT: return convertUnsignedShortToString(eDataType, instanceValue); case XMLTypePackage.UNSIGNED_SHORT_OBJECT: return convertUnsignedShortObjectToString(eDataType, instanceValue); 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/impl/EcoreFactoryImpl.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/impl/XMLTypeFactoryImpl.java
Method name: `String convertToString(EDataType, Object)` |  | Method name: `String convertToString(EDataType, Object)`
Number of AST nodes: 7 |  | Number of AST nodes: 7

1

    return convertEShortToString(eDataType, instanceValue);↵

1

    return convertUnsignedLongToString(eDataType, instanceValue);↵

2

          case EcorePackage.ESHORT_OBJECT:↵

2

          case XMLTypePackage.UNSIGNED_SHORT:↵

3

            return convertEShortObjectToString(eDataType, instanceValue);↵

3

            return convertUnsignedShortToString(eDataType, instanceValue);↵

4

          case EcorePackage.ESTRING:↵

4

          case XMLTypePackage.UNSIGNED_SHORT_OBJECT:↵

5

            return convertEStringToString(eDataType, instanceValue);↵

5

            return convertUnsignedShortObjectToString(eDataType, instanceValue);↵

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 | 25

1. {Non-refactorable}

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

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

   43

       return convertEShortToString(eDataType, instanceValue);

   43 | return convertEShortToString(eDataType, instanceValue);
   113 | return convertUnsignedLongToString(eDataType, instanceValue);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   convertEShortToString | convertUnsignedLongToString | METHOD_INVOCATION_NAME_MISMATCH

   113

       return convertUnsignedLongToString(eDataType, instanceValue);

   44

       case EcorePackage.ESHORT_OBJECT:

   44 | case EcorePackage.ESHORT_OBJECT:
   114 | case XMLTypePackage.UNSIGNED_SHORT:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.EcorePackage | org.eclipse.emf.ecore.xml.type.XMLTypePackage | VARIABLE_TYPE_MISMATCH
   ESHORT_OBJECT | UNSIGNED_SHORT | VARIABLE_NAME_MISMATCH

   Preondition Violations

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

   114

       case XMLTypePackage.UNSIGNED_SHORT:

   45

       return convertEShortObjectToString(eDataType, instanceValue);

   45 | return convertEShortObjectToString(eDataType, instanceValue);
   115 | return convertUnsignedShortToString(eDataType, instanceValue);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   convertEShortObjectToString | convertUnsignedShortToString | METHOD_INVOCATION_NAME_MISMATCH

   115

       return convertUnsignedShortToString(eDataType, instanceValue);

   46

       case EcorePackage.ESTRING:

   46 | case EcorePackage.ESTRING:
   116 | case XMLTypePackage.UNSIGNED_SHORT_OBJECT:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.EcorePackage | org.eclipse.emf.ecore.xml.type.XMLTypePackage | VARIABLE_TYPE_MISMATCH
   ESTRING | UNSIGNED_SHORT_OBJECT | VARIABLE_NAME_MISMATCH

   Preondition Violations

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

   116

       case XMLTypePackage.UNSIGNED_SHORT_OBJECT:

   47

       return convertEStringToString(eDataType, instanceValue);

   47 | return convertEStringToString(eDataType, instanceValue);
   117 | return convertUnsignedShortObjectToString(eDataType, instanceValue);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   convertEStringToString | convertUnsignedShortObjectToString | METHOD_INVOCATION_NAME_MISMATCH

   117

       return convertUnsignedShortObjectToString(eDataType, instanceValue);

   48

       default:

   118

       default:

   49

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

   119

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

   Precondition Violations (2)
   Row | Violation
   --- | ---
   1 | Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage
   2 | Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage