10881-1-4

return convertLangTypeToString(eDataType, instanceValue); case XMLNamespacePackage.LANG_TYPE_NULL: return convertLangTypeNullToString(eDataType, instanceValue); case XMLNamespacePackage.SPACE_TYPE_OBJECT: return convertSpaceTypeObjectToString(eDataType, instanceValue); 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/namespace/impl/XMLNamespaceFactoryImpl.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/namespace/impl/XMLNamespaceFactoryImpl.java
Method name: `String convertToString(EDataType, Object)` |  | Method name: `Object createFromString(EDataType, String)`
Number of AST nodes: 7 |  | Number of AST nodes: 7

1

    return convertLangTypeToString(eDataType, instanceValue);↵

1

    return createLangTypeFromString(eDataType, initialValue);↵

2

          case XMLNamespacePackage.LANG_TYPE_NULL:↵

2

          case XMLNamespacePackage.LANG_TYPE_NULL:↵

3

            return convertLangTypeNullToString(eDataType, instanceValue);↵

3

            return createLangTypeNullFromString(eDataType, initialValue);↵

4

          case XMLNamespacePackage.SPACE_TYPE_OBJECT:↵

4

          case XMLNamespacePackage.SPACE_TYPE_OBJECT:↵

5

            return convertSpaceTypeObjectToString(eDataType, instanceValue);↵

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

   5 | return createLangTypeFromString(eDataType, initialValue);

   Preondition Violations
   Unmatched return createLangTypeFromString(eDataType,initialValue);

   5

       return createLangTypeFromString(eDataType, initialValue);

   5

       return convertLangTypeToString(eDataType, instanceValue);

   5 | return convertLangTypeToString(eDataType, instanceValue);

   Preondition Violations
   Unmatched return convertLangTypeToString(eDataType,instanceValue);

   6

       case XMLNamespacePackage.LANG_TYPE_NULL:

   6

       case XMLNamespacePackage.LANG_TYPE_NULL:

   7 | return createLangTypeNullFromString(eDataType, initialValue);

   Preondition Violations
   Unmatched return createLangTypeNullFromString(eDataType,initialValue);

   7

       return createLangTypeNullFromString(eDataType, initialValue);

   7

       return convertLangTypeNullToString(eDataType, instanceValue);

   7 | return convertLangTypeNullToString(eDataType, instanceValue);

   Preondition Violations
   Unmatched return convertLangTypeNullToString(eDataType,instanceValue);

   8

       case XMLNamespacePackage.SPACE_TYPE_OBJECT:

   8

       case XMLNamespacePackage.SPACE_TYPE_OBJECT:

   9 | return createSpaceTypeObjectFromString(eDataType, initialValue);

   Preondition Violations
   Unmatched return createSpaceTypeObjectFromString(eDataType,initialValue);

   9

       return createSpaceTypeObjectFromString(eDataType, initialValue);

   9

       return convertSpaceTypeObjectToString(eDataType, instanceValue);

   9 | return convertSpaceTypeObjectToString(eDataType, instanceValue);

   Preondition Violations
   Unmatched return convertSpaceTypeObjectToString(eDataType,instanceValue);

   10

       default:

   10

       default:

   11

       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 (6)
   Row | Violation
   --- | ---
   1 | Unmatched return createLangTypeFromString(eDataType,initialValue);
   2 | Unmatched return convertLangTypeToString(eDataType,instanceValue);
   3 | Unmatched return createLangTypeNullFromString(eDataType,initialValue);
   4 | Unmatched return convertLangTypeNullToString(eDataType,instanceValue);
   5 | Unmatched return createSpaceTypeObjectFromString(eDataType,initialValue);
   6 | Unmatched return convertSpaceTypeObjectToString(eDataType,instanceValue);