10588-6-7

case EcorePackage.EFEATURE_MAP: return validateEFeatureMap((FeatureMap)value, diagnostics, context); case EcorePackage.EFEATURE_MAP_ENTRY: return validateEFeatureMapEntry((FeatureMap.Entry)value, diagnostics, context); case EcorePackage.EFLOAT: return validateEFloat(((Float)value).floatValue(), diagnostics, context); case EcorePackage.EFLOAT_OBJECT: return validateEFloatObject((Float)value, diagnostics, context); case EcorePackage.EINT:
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.EFEATURE_MAP:↵

1

    case XMLTypePackage.DATE_TIME:↵

2

            return validateEFeatureMap((FeatureMap)value, diagnostics, context);↵

2

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

3

          case EcorePackage.EFEATURE_MAP_ENTRY:↵

3

          case XMLTypePackage.DECIMAL:↵

4

            return validateEFeatureMapEntry((FeatureMap.Entry)value, diagnostics, context);↵

4

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

5

          case EcorePackage.EFLOAT:↵

5

          case XMLTypePackage.DOUBLE:↵

6

            return validateEFloat(((Float)value).floatValue(), diagnostics, context);↵

6

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

7

          case EcorePackage.EFLOAT_OBJECT:↵

7

          case XMLTypePackage.DOUBLE_OBJECT:↵

8

            return validateEFloatObject((Float)value, diagnostics, context);↵

8

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

9

          case EcorePackage.EINT:

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

1. {Non-refactorable}

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

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

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

   Preondition Violations
   Unmatched return validateDecimal((BigDecimal)value,diagnostics,context);

   29

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

   72

       case EcorePackage.EFEATURE_MAP:

   72 | case EcorePackage.EFEATURE_MAP:
   32 | case XMLTypePackage.DOUBLE_OBJECT:

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

   73

       return validateEFeatureMap((FeatureMap)value, diagnostics, context);

   73 | return validateEFeatureMap((FeatureMap)value, diagnostics, context);
   33 | return validateDoubleObject((Double)value, diagnostics, context);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   validateEFeatureMap | validateDoubleObject | METHOD_INVOCATION_NAME_MISMATCH
   org.eclipse.emf.ecore.util.FeatureMap | java.lang.Double | VARIABLE_TYPE_MISMATCH

   Preondition Violations

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

   33

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

   74

       case EcorePackage.EFEATURE_MAP_ENTRY:

   74 | case EcorePackage.EFEATURE_MAP_ENTRY:
   34 | case XMLTypePackage.DURATION:

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

   75

       return validateEFeatureMapEntry((FeatureMap.Entry)value, diagnostics, context);

   75 | return validateEFeatureMapEntry((FeatureMap.Entry)value, diagnostics, context);

   Preondition Violations
   Unmatched return validateEFeatureMapEntry((FeatureMap.Entry)value,diagnostics,context);

   76

       case EcorePackage.EFLOAT:

   76 | case EcorePackage.EFLOAT:
   30 | case XMLTypePackage.DOUBLE:

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

   77

       return validateEFloat(((Float)value).floatValue(), diagnostics, context);

   77 | return validateEFloat(((Float)value).floatValue(), diagnostics, context);

   Preondition Violations
   Unmatched return validateEFloat(((Float)value).floatValue(),diagnostics,context);

   78

       case EcorePackage.EFLOAT_OBJECT:

   78 | case EcorePackage.EFLOAT_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
   EFLOAT_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:

   79

       return validateEFloatObject((Float)value, diagnostics, context);

   79 | return validateEFloatObject((Float)value, diagnostics, context);
   27 | return validateDateTime((XMLGregorianCalendar)value, diagnostics, context);

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

   Preondition Violations

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

   27

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

   80

       case EcorePackage.EINT:

   80 | case EcorePackage.EINT:
   28 | case XMLTypePackage.DECIMAL:

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

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

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

   31

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

   Precondition Violations (11)
   Row | Violation
   --- | ---
   1 | Unmatched return validateDecimal((BigDecimal)value,diagnostics,context);
   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
   3 | Type org.eclipse.emf.ecore.util.FeatureMap of variable (FeatureMap)value does not match with type java.lang.Double of variable (Double)value
   4 | Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage
   5 | Unmatched return validateEFeatureMapEntry((FeatureMap.Entry)value,diagnostics,context);
   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 | Unmatched return validateEFloat(((Float)value).floatValue(),diagnostics,context);
   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.Float of variable (Float)value does not match with type javax.xml.datatype.XMLGregorianCalendar of variable (XMLGregorianCalendar)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
   11 | Unmatched return validateDouble(((Double)value).doubleValue(),diagnostics,context);