10881-3-6

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 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/xml/type/impl/XMLTypeFactoryImpl.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/impl/XMLTypeFactoryImpl.java
Method name: `Object createFromString(EDataType, String)` |  | Method name: `String convertToString(EDataType, Object)`
Number of AST nodes: 7 |  | Number of AST nodes: 7

1

    return createUnsignedLongFromString(eDataType, initialValue);↵

1

    return convertUnsignedLongToString(eDataType, instanceValue);↵

2

          case XMLTypePackage.UNSIGNED_SHORT:↵

2

          case XMLTypePackage.UNSIGNED_SHORT:↵

3

            return createUnsignedShortFromString(eDataType, initialValue);↵

3

            return convertUnsignedShortToString(eDataType, instanceValue);↵

4

          case XMLTypePackage.UNSIGNED_SHORT_OBJECT:↵

4

          case XMLTypePackage.UNSIGNED_SHORT_OBJECT:↵

5

            return createUnsignedShortObjectFromString(eDataType, initialValue);↵

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 declared in the same 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
   --- | --- | --- | --- | ---

   113 | return convertUnsignedLongToString(eDataType, instanceValue);

   Preondition Violations
   Unmatched return convertUnsignedLongToString(eDataType,instanceValue);

   113

       return convertUnsignedLongToString(eDataType, instanceValue);

   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:

   115 | return convertUnsignedShortToString(eDataType, instanceValue);

   Preondition Violations
   Unmatched return convertUnsignedShortToString(eDataType,instanceValue);

   115

       return convertUnsignedShortToString(eDataType, instanceValue);

   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:

   117 | return convertUnsignedShortObjectToString(eDataType, instanceValue);

   Preondition Violations
   Unmatched return convertUnsignedShortObjectToString(eDataType,instanceValue);

   117

       return convertUnsignedShortObjectToString(eDataType, instanceValue);

   117

       return createUnsignedShortObjectFromString(eDataType, initialValue);

   117 | return createUnsignedShortObjectFromString(eDataType, initialValue);

   Preondition Violations
   Unmatched return createUnsignedShortObjectFromString(eDataType,initialValue);

   118

       default:

   118

       default:

   119

       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 (6)
   Row | Violation
   --- | ---
   1 | Unmatched return convertUnsignedLongToString(eDataType,instanceValue);
   2 | Unmatched return createUnsignedLongFromString(eDataType,initialValue);
   3 | Unmatched return convertUnsignedShortToString(eDataType,instanceValue);
   4 | Unmatched return createUnsignedShortFromString(eDataType,initialValue);
   5 | Unmatched return convertUnsignedShortObjectToString(eDataType,instanceValue);
   6 | Unmatched return createUnsignedShortObjectFromString(eDataType,initialValue);