10588-5-7

case EcorePackage.EDATE: return validateEDate((Date)value, diagnostics, context); case EcorePackage.EDIAGNOSTIC_CHAIN: return validateEDiagnosticChain((DiagnosticChain)value, diagnostics, context); case EcorePackage.EDOUBLE: return validateEDouble(((Double)value).doubleValue(), diagnostics, context); case EcorePackage.EDOUBLE_OBJECT: return validateEDoubleObject((Double)value, diagnostics, context); case EcorePackage.EE_LIST:
case XMLTypePackage.DATE_TIME: return validateDateTime((XMLGregorianCalendar)value, diagnostics, context); case XMLTypePackage.DECIMAL: return validateDecimal((BigDecimal)value, diagnostics, context); case XMLTypePackage.DOUBLE: return validateDouble(((Double)value).doubleValue(), diagnostics, context); case XMLTypePackage.DOUBLE_OBJECT: return validateDoubleObject((Double)value, diagnostics, context); case XMLTypePackage.DURATION:

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.EDATE:↵

1

    case XMLTypePackage.DATE_TIME:↵

2

            return validateEDate((Date)value, diagnostics, context);↵

2

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

3

          case EcorePackage.EDIAGNOSTIC_CHAIN:↵

3

          case XMLTypePackage.DECIMAL:↵

4

            return validateEDiagnosticChain((DiagnosticChain)value, diagnostics, context);↵

4

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

5

          case EcorePackage.EDOUBLE:↵

5

          case XMLTypePackage.DOUBLE:↵

6

            return validateEDouble(((Double)value).doubleValue(), diagnostics, context);↵

6

            return validateDouble(((Double)value).doubleValue(), diagnostics, context);↵

7

          case EcorePackage.EDOUBLE_OBJECT:↵

7

          case XMLTypePackage.DOUBLE_OBJECT:↵

8

            return validateEDoubleObject((Double)value, diagnostics, context);↵

8

            return validateDoubleObject((Double)value, diagnostics, context);↵

9

          case EcorePackage.EE_LIST:

9

          case XMLTypePackage.DURATION:

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

   60

       case EcorePackage.EDATE:

   60 | case EcorePackage.EDATE:
   32 | case XMLTypePackage.DOUBLE_OBJECT:

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

   32

       case XMLTypePackage.DOUBLE_OBJECT:

   61

       return validateEDate((Date)value, diagnostics, context);

   61 | return validateEDate((Date)value, diagnostics, context);
   33 | return validateDoubleObject((Double)value, diagnostics, context);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   validateEDate | validateDoubleObject | METHOD_INVOCATION_NAME_MISMATCH
   java.util.Date | java.lang.Double | VARIABLE_TYPE_MISMATCH

   Preondition Violations

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

   33

       return validateDoubleObject((Double)value, diagnostics, context);

   62

       case EcorePackage.EDIAGNOSTIC_CHAIN:

   62 | case EcorePackage.EDIAGNOSTIC_CHAIN:
   28 | case XMLTypePackage.DECIMAL:

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

   28

       case XMLTypePackage.DECIMAL:

   63

       return validateEDiagnosticChain((DiagnosticChain)value, diagnostics, context);

   63 | return validateEDiagnosticChain((DiagnosticChain)value, diagnostics, context);
   29 | return validateDecimal((BigDecimal)value, diagnostics, context);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   validateEDiagnosticChain | validateDecimal | METHOD_INVOCATION_NAME_MISMATCH
   org.eclipse.emf.common.util.DiagnosticChain | java.math.BigDecimal | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.common.util.DiagnosticChain of variable (DiagnosticChain)value does not match with type java.math.BigDecimal of variable (BigDecimal)value
   - Make classes org.eclipse.emf.common.util.DiagnosticChain and java.math.BigDecimal extend a common superclass

   29

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

   64

       case EcorePackage.EDOUBLE:

   64 | case EcorePackage.EDOUBLE:
   30 | case XMLTypePackage.DOUBLE:

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

   30

       case XMLTypePackage.DOUBLE:

   65

       return validateEDouble(((Double)value).doubleValue(), diagnostics, context);

   65 | return validateEDouble(((Double)value).doubleValue(), diagnostics, context);
   31 | return validateDouble(((Double)value).doubleValue(), diagnostics, context);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   validateEDouble | validateDouble | METHOD_INVOCATION_NAME_MISMATCH

   31

       return validateDouble(((Double)value).doubleValue(), diagnostics, context);

   66

       case EcorePackage.EDOUBLE_OBJECT:

   66 | case EcorePackage.EDOUBLE_OBJECT:
   26 | case XMLTypePackage.DATE_TIME:

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

   26

       case XMLTypePackage.DATE_TIME:

   67

       return validateEDoubleObject((Double)value, diagnostics, context);

   67 | return validateEDoubleObject((Double)value, diagnostics, context);
   27 | return validateDateTime((XMLGregorianCalendar)value, diagnostics, context);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   validateEDoubleObject | validateDateTime | METHOD_INVOCATION_NAME_MISMATCH
   java.lang.Double | javax.xml.datatype.XMLGregorianCalendar | VARIABLE_TYPE_MISMATCH

   Preondition Violations

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

   27

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

   68

       case EcorePackage.EE_LIST:

   68 | case EcorePackage.EE_LIST:
   34 | case XMLTypePackage.DURATION:

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

   34

       case XMLTypePackage.DURATION:

   Precondition Violations (8)
   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.util.Date of variable (Date)value does not match with type java.lang.Double of variable (Double)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 org.eclipse.emf.common.util.DiagnosticChain of variable (DiagnosticChain)value does not match with type java.math.BigDecimal of variable (BigDecimal)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 org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage
   7 | Type java.lang.Double of variable (Double)value does not match with type javax.xml.datatype.XMLGregorianCalendar of variable (XMLGregorianCalendar)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