10588-4-8

case EcorePackage.EBIG_DECIMAL: return validateEBigDecimal((BigDecimal)value, diagnostics, context); case EcorePackage.EBIG_INTEGER: return validateEBigInteger((BigInteger)value, diagnostics, context); case EcorePackage.EBOOLEAN: return validateEBoolean(((Boolean)value).booleanValue(), diagnostics, context); case EcorePackage.EBOOLEAN_OBJECT: return validateEBooleanObject((Boolean)value, diagnostics, context); case EcorePackage.EBYTE:
case XMLTypePackage.TIME: return validateTime((XMLGregorianCalendar)value, diagnostics, context); case XMLTypePackage.TOKEN: return validateToken((String)value, diagnostics, context); case XMLTypePackage.UNSIGNED_BYTE: return validateUnsignedByte(((Short)value).shortValue(), diagnostics, context); case XMLTypePackage.UNSIGNED_BYTE_OBJECT: return validateUnsignedByteObject((Short)value, diagnostics, context); case XMLTypePackage.UNSIGNED_INT:

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreValidator.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/util/XMLTypeValidator.java
Method name: `boolean validate(int, Object, DiagnosticChain, Map)` |  | Method name: `boolean validate(int, Object, DiagnosticChain, Map)`
Number of AST nodes: 9 |  | Number of AST nodes: 9

1

    case EcorePackage.EBIG_DECIMAL:↵

1

    case XMLTypePackage.TIME:↵

2

            return validateEBigDecimal((BigDecimal)value, diagnostics, context);↵

2

            return validateTime((XMLGregorianCalendar)value, diagnostics, context);↵

3

          case EcorePackage.EBIG_INTEGER:↵

3

          case XMLTypePackage.TOKEN:↵

4

            return validateEBigInteger((BigInteger)value, diagnostics, context);↵

4

            return validateToken((String)value, diagnostics, context);↵

5

          case EcorePackage.EBOOLEAN:↵

5

          case XMLTypePackage.UNSIGNED_BYTE:↵

6

            return validateEBoolean(((Boolean)value).booleanValue(), diagnostics, context);↵

6

            return validateUnsignedByte(((Short)value).shortValue(), diagnostics, context);↵

7

          case EcorePackage.EBOOLEAN_OBJECT:↵

7

          case XMLTypePackage.UNSIGNED_BYTE_OBJECT:↵

8

            return validateEBooleanObject((Boolean)value, diagnostics, context);↵

8

            return validateUnsignedByteObject((Short)value, diagnostics, context);↵

9

          case EcorePackage.EBYTE:

9

          case XMLTypePackage.UNSIGNED_INT:

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

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 9
   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
   --- | --- | --- | --- | ---

   42

       case EcorePackage.EBIG_DECIMAL:

   42 | case EcorePackage.EBIG_DECIMAL:
   108 | case XMLTypePackage.TIME:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.EcorePackage | org.eclipse.emf.ecore.xml.type.XMLTypePackage | VARIABLE_TYPE_MISMATCH
   EBIG_DECIMAL | TIME | 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

   108

       case XMLTypePackage.TIME:

   43

       return validateEBigDecimal((BigDecimal)value, diagnostics, context);

   43 | return validateEBigDecimal((BigDecimal)value, diagnostics, context);
   109 | return validateTime((XMLGregorianCalendar)value, diagnostics, context);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   validateEBigDecimal | validateTime | METHOD_INVOCATION_NAME_MISMATCH
   java.math.BigDecimal | javax.xml.datatype.XMLGregorianCalendar | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type java.math.BigDecimal of variable (BigDecimal)value does not match with type javax.xml.datatype.XMLGregorianCalendar of variable (XMLGregorianCalendar)value
   - Make classes java.math.BigDecimal and javax.xml.datatype.XMLGregorianCalendar extend a common superclass

   109

       return validateTime((XMLGregorianCalendar)value, diagnostics, context);

   44

       case EcorePackage.EBIG_INTEGER:

   44 | case EcorePackage.EBIG_INTEGER:
   110 | case XMLTypePackage.TOKEN:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.EcorePackage | org.eclipse.emf.ecore.xml.type.XMLTypePackage | VARIABLE_TYPE_MISMATCH
   EBIG_INTEGER | TOKEN | 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

   110

       case XMLTypePackage.TOKEN:

   45

       return validateEBigInteger((BigInteger)value, diagnostics, context);

   45 | return validateEBigInteger((BigInteger)value, diagnostics, context);
   111 | return validateToken((String)value, diagnostics, context);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   validateEBigInteger | validateToken | METHOD_INVOCATION_NAME_MISMATCH
   java.math.BigInteger | java.lang.String | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type java.math.BigInteger of variable (BigInteger)value does not match with type java.lang.String of variable (String)value
   - Make classes java.math.BigInteger and java.lang.String extend a common superclass

   111

       return validateToken((String)value, diagnostics, context);

   46

       case EcorePackage.EBOOLEAN:

   46 | case EcorePackage.EBOOLEAN:
   112 | case XMLTypePackage.UNSIGNED_BYTE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.EcorePackage | org.eclipse.emf.ecore.xml.type.XMLTypePackage | VARIABLE_TYPE_MISMATCH
   EBOOLEAN | UNSIGNED_BYTE | 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

   112

       case XMLTypePackage.UNSIGNED_BYTE:

   47

       return validateEBoolean(((Boolean)value).booleanValue(), diagnostics, context);

   47 | return validateEBoolean(((Boolean)value).booleanValue(), diagnostics, context);
   113 | return validateUnsignedByte(((Short)value).shortValue(), diagnostics, context);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   validateEBoolean | validateUnsignedByte | METHOD_INVOCATION_NAME_MISMATCH
   booleanValue | shortValue | METHOD_INVOCATION_NAME_MISMATCH
   boolean | short | VARIABLE_TYPE_MISMATCH
   java.lang.Boolean | java.lang.Short | VARIABLE_TYPE_MISMATCH

   Preondition Violations
   Type boolean of variable ((Boolean)value).booleanValue() does not match with type short of variable ((Short)value).shortValue()

   Type java.lang.Boolean of variable (Boolean)value does not match with type java.lang.Short of variable (Short)value
   - Make classes java.lang.Boolean and java.lang.Short extend a common superclass

   113

       return validateUnsignedByte(((Short)value).shortValue(), diagnostics, context);

   48

       case EcorePackage.EBOOLEAN_OBJECT:

   48 | case EcorePackage.EBOOLEAN_OBJECT:
   114 | case XMLTypePackage.UNSIGNED_BYTE_OBJECT:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.EcorePackage | org.eclipse.emf.ecore.xml.type.XMLTypePackage | VARIABLE_TYPE_MISMATCH
   EBOOLEAN_OBJECT | UNSIGNED_BYTE_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

   114

       case XMLTypePackage.UNSIGNED_BYTE_OBJECT:

   49

       return validateEBooleanObject((Boolean)value, diagnostics, context);

   49 | return validateEBooleanObject((Boolean)value, diagnostics, context);
   115 | return validateUnsignedByteObject((Short)value, diagnostics, context);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   validateEBooleanObject | validateUnsignedByteObject | METHOD_INVOCATION_NAME_MISMATCH
   java.lang.Boolean | java.lang.Short | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type java.lang.Boolean of variable (Boolean)value does not match with type java.lang.Short of variable (Short)value
   - Make classes java.lang.Boolean and java.lang.Short extend a common superclass

   115

       return validateUnsignedByteObject((Short)value, diagnostics, context);

   50

       case EcorePackage.EBYTE:

   50 | case EcorePackage.EBYTE:
   116 | case XMLTypePackage.UNSIGNED_INT:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.EcorePackage | org.eclipse.emf.ecore.xml.type.XMLTypePackage | VARIABLE_TYPE_MISMATCH
   EBYTE | UNSIGNED_INT | 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_INT:

   Precondition Violations (10)
   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 java.math.BigDecimal of variable (BigDecimal)value does not match with type javax.xml.datatype.XMLGregorianCalendar of variable (XMLGregorianCalendar)value
   3 | Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage
   4 | Type java.math.BigInteger of variable (BigInteger)value does not match with type java.lang.String of variable (String)value
   5 | Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage
   6 | Type boolean of variable ((Boolean)value).booleanValue() does not match with type short of variable ((Short)value).shortValue()
   7 | Type java.lang.Boolean of variable (Boolean)value does not match with type java.lang.Short of variable (Short)value
   8 | Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage
   9 | Type java.lang.Boolean of variable (Boolean)value does not match with type java.lang.Short of variable (Short)value
   10 | Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage