10661-1-3

case MappingPackage.MAPPING__NESTED_IN: return getNestedIn(); case MappingPackage.MAPPING__INPUTS: return getInputs(); case MappingPackage.MAPPING__OUTPUTS: return getOutputs(); case MappingPackage.MAPPING__TYPE_MAPPING: if (resolve) return getTypeMapping(); return basicGetTypeMapping();
case EcorePackage.EENUM__INSTANCE_CLASS: return getInstanceClass(); case EcorePackage.EENUM__DEFAULT_VALUE: return getDefaultValue(); case EcorePackage.EENUM__INSTANCE_TYPE_NAME: return getInstanceTypeName(); case EcorePackage.EENUM__EPACKAGE: if (resolve) return getEPackage(); return basicGetEPackage();

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/impl/MappingImpl.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EEnumImpl.java
Method name: `Object eGet(int, boolean, boolean)` |  | Method name: `Object eGet(int, boolean, boolean)`
Number of AST nodes: 10 |  | Number of AST nodes: 10

1

    case MappingPackage.MAPPING__NESTED_IN:↵

1

    case EcorePackage.EENUM__INSTANCE_CLASS:↵

2

            return getNestedIn();↵

2

            return getInstanceClass();↵

3

          case MappingPackage.MAPPING__INPUTS:↵

3

          case EcorePackage.EENUM__DEFAULT_VALUE:↵

4

            return getInputs();↵

4

            return getDefaultValue();↵

5

          case MappingPackage.MAPPING__OUTPUTS:↵

5

          case EcorePackage.EENUM__INSTANCE_TYPE_NAME:↵

6

            return getOutputs();↵

6

            return getInstanceTypeName();↵

7

          case MappingPackage.MAPPING__TYPE_MAPPING:↵

7

          case EcorePackage.EENUM__EPACKAGE:↵

8

            if (resolve) return getTypeMapping();↵

8

            if (resolve) return getEPackage();↵

9

            return basicGetTypeMapping();

9

            return basicGetEPackage();

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.1
Clones location | Clones are in different classes having the same super class
Number of node comparisons | 51

1. {Non-refactorable}

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

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

   6

       case MappingPackage.MAPPING__NESTED_IN:

   6 | case MappingPackage.MAPPING__NESTED_IN:
   8 | case EcorePackage.EENUM__INSTANCE_CLASS:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.mapping.MappingPackage | org.eclipse.emf.ecore.EcorePackage | VARIABLE_TYPE_MISMATCH
   MAPPING__NESTED_IN | EENUM__INSTANCE_CLASS | VARIABLE_NAME_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
   - Make classes org.eclipse.emf.mapping.MappingPackage and org.eclipse.emf.ecore.EcorePackage extend a common superclass

   8

       case EcorePackage.EENUM__INSTANCE_CLASS:

   7

       return getNestedIn();

   7 | return getNestedIn();

   Preondition Violations
   Unmatched return getNestedIn();

   9 | return getInstanceClass();

   Preondition Violations
   Unmatched return getInstanceClass();

   9

       return getInstanceClass();

   8

       case MappingPackage.MAPPING__INPUTS:

   8 | case MappingPackage.MAPPING__INPUTS:
   10 | case EcorePackage.EENUM__DEFAULT_VALUE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.mapping.MappingPackage | org.eclipse.emf.ecore.EcorePackage | VARIABLE_TYPE_MISMATCH
   MAPPING__INPUTS | EENUM__DEFAULT_VALUE | VARIABLE_NAME_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
   - Make classes org.eclipse.emf.mapping.MappingPackage and org.eclipse.emf.ecore.EcorePackage extend a common superclass

   10

       case EcorePackage.EENUM__DEFAULT_VALUE:

   9

       return getInputs();

   9 | return getInputs();

   Preondition Violations
   Unmatched return getInputs();

   11 | return getDefaultValue();

   Preondition Violations
   Unmatched return getDefaultValue();

   11

       return getDefaultValue();

   10

       case MappingPackage.MAPPING__OUTPUTS:

   10 | case MappingPackage.MAPPING__OUTPUTS:
   12 | case EcorePackage.EENUM__INSTANCE_TYPE_NAME:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.mapping.MappingPackage | org.eclipse.emf.ecore.EcorePackage | VARIABLE_TYPE_MISMATCH
   MAPPING__OUTPUTS | EENUM__INSTANCE_TYPE_NAME | VARIABLE_NAME_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
   - Make classes org.eclipse.emf.mapping.MappingPackage and org.eclipse.emf.ecore.EcorePackage extend a common superclass

   12

       case EcorePackage.EENUM__INSTANCE_TYPE_NAME:

   11

       return getOutputs();

   11 | return getOutputs();

   Preondition Violations
   Unmatched return getOutputs();

   13 | return getInstanceTypeName();

   Preondition Violations
   Unmatched return getInstanceTypeName();

   13

       return getInstanceTypeName();

   12

       case MappingPackage.MAPPING__TYPE_MAPPING:

   12 | case MappingPackage.MAPPING__TYPE_MAPPING:
   14 | case EcorePackage.EENUM__EPACKAGE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.mapping.MappingPackage | org.eclipse.emf.ecore.EcorePackage | VARIABLE_TYPE_MISMATCH
   MAPPING__TYPE_MAPPING | EENUM__EPACKAGE | VARIABLE_NAME_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
   - Make classes org.eclipse.emf.mapping.MappingPackage and org.eclipse.emf.ecore.EcorePackage extend a common superclass

   14

       case EcorePackage.EENUM__EPACKAGE:

   13

       if (resolve)

   15

       if (resolve)

   14

       return getTypeMapping();

   14 | return getTypeMapping();

   Preondition Violations
   Unmatched return getTypeMapping();

   16 | return getEPackage();

   Preondition Violations
   Unmatched return getEPackage();

   16

       return getEPackage();

   15

       return basicGetTypeMapping();

   15 | return basicGetTypeMapping();

   Preondition Violations
   Unmatched return basicGetTypeMapping();

   17 | return basicGetEPackage();

   Preondition Violations
   Unmatched return basicGetEPackage();

   17

       return basicGetEPackage();

   Precondition Violations (14)
   Row | Violation
   --- | ---
   1 | Type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
   2 | Unmatched return getNestedIn();
   3 | Unmatched return getInstanceClass();
   4 | Type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
   5 | Unmatched return getInputs();
   6 | Unmatched return getDefaultValue();
   7 | Type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
   8 | Unmatched return getOutputs();
   9 | Unmatched return getInstanceTypeName();
   10 | Type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
   11 | Unmatched return getTypeMapping();
   12 | Unmatched return getEPackage();
   13 | Unmatched return basicGetTypeMapping();
   14 | Unmatched return basicGetEPackage();