10661-2-5

case ChangePackage.FEATURE_MAP_ENTRY__FEATURE_NAME: return getFeatureName(); case ChangePackage.FEATURE_MAP_ENTRY__DATA_VALUE: return getDataValue(); case ChangePackage.FEATURE_MAP_ENTRY__VALUE: return getValue(); case ChangePackage.FEATURE_MAP_ENTRY__FEATURE: if (resolve) return getFeature(); return basicGetFeature();
case EcorePackage.EPACKAGE__EFACTORY_INSTANCE: return getEFactoryInstance(); case EcorePackage.EPACKAGE__ECLASSIFIERS: return getEClassifiers(); case EcorePackage.EPACKAGE__ESUBPACKAGES: return getESubpackages(); case EcorePackage.EPACKAGE__ESUPER_PACKAGE: if (resolve) return getESuperPackage(); return basicGetESuperPackage();

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/impl/FeatureMapEntryImpl.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EPackageImpl.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 ChangePackage.FEATURE_MAP_ENTRY__FEATURE_NAME:↵

1

    case EcorePackage.EPACKAGE__EFACTORY_INSTANCE:↵

2

            return getFeatureName();↵

2

            return getEFactoryInstance();↵

3

          case ChangePackage.FEATURE_MAP_ENTRY__DATA_VALUE:↵

3

          case EcorePackage.EPACKAGE__ECLASSIFIERS:↵

4

            return getDataValue();↵

4

            return getEClassifiers();↵

5

          case ChangePackage.FEATURE_MAP_ENTRY__VALUE:↵

5

          case EcorePackage.EPACKAGE__ESUBPACKAGES:↵

6

            return getValue();↵

6

            return getESubpackages();↵

7

          case ChangePackage.FEATURE_MAP_ENTRY__FEATURE:↵

7

          case EcorePackage.EPACKAGE__ESUPER_PACKAGE:↵

8

            if (resolve) return getFeature();↵

8

            if (resolve) return getESuperPackage();↵

9

            return basicGetFeature();

9

            return basicGetESuperPackage();

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) | 2.0
   Clone type | Type 2

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

   2

       case ChangePackage.FEATURE_MAP_ENTRY__FEATURE_NAME:

   2 | case ChangePackage.FEATURE_MAP_ENTRY__FEATURE_NAME:
   10 | case EcorePackage.EPACKAGE__EFACTORY_INSTANCE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.change.ChangePackage | org.eclipse.emf.ecore.EcorePackage | VARIABLE_TYPE_MISMATCH
   FEATURE_MAP_ENTRY__FEATURE_NAME | EPACKAGE__EFACTORY_INSTANCE | VARIABLE_NAME_MISMATCH

   Preondition Violations

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

   10

       case EcorePackage.EPACKAGE__EFACTORY_INSTANCE:

   3

       return getFeatureName();

   3 | return getFeatureName();

   Preondition Violations
   Unmatched return getFeatureName();

   11 | return getEFactoryInstance();

   Preondition Violations
   Unmatched return getEFactoryInstance();

   11

       return getEFactoryInstance();

   4

       case ChangePackage.FEATURE_MAP_ENTRY__DATA_VALUE:

   4 | case ChangePackage.FEATURE_MAP_ENTRY__DATA_VALUE:
   12 | case EcorePackage.EPACKAGE__ECLASSIFIERS:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.change.ChangePackage | org.eclipse.emf.ecore.EcorePackage | VARIABLE_TYPE_MISMATCH
   FEATURE_MAP_ENTRY__DATA_VALUE | EPACKAGE__ECLASSIFIERS | VARIABLE_NAME_MISMATCH

   Preondition Violations

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

   12

       case EcorePackage.EPACKAGE__ECLASSIFIERS:

   5

       return getDataValue();

   5 | return getDataValue();

   Preondition Violations
   Unmatched return getDataValue();

   13 | return getEClassifiers();

   Preondition Violations
   Unmatched return getEClassifiers();

   13

       return getEClassifiers();

   6

       case ChangePackage.FEATURE_MAP_ENTRY__VALUE:

   6 | case ChangePackage.FEATURE_MAP_ENTRY__VALUE:
   14 | case EcorePackage.EPACKAGE__ESUBPACKAGES:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.change.ChangePackage | org.eclipse.emf.ecore.EcorePackage | VARIABLE_TYPE_MISMATCH
   FEATURE_MAP_ENTRY__VALUE | EPACKAGE__ESUBPACKAGES | VARIABLE_NAME_MISMATCH

   Preondition Violations

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

   14

       case EcorePackage.EPACKAGE__ESUBPACKAGES:

   7

       return getValue();

   7 | return getValue();

   Preondition Violations
   Unmatched return getValue();

   15 | return getESubpackages();

   Preondition Violations
   Unmatched return getESubpackages();

   15

       return getESubpackages();

   8

       case ChangePackage.FEATURE_MAP_ENTRY__FEATURE:

   8 | case ChangePackage.FEATURE_MAP_ENTRY__FEATURE:
   16 | case EcorePackage.EPACKAGE__ESUPER_PACKAGE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.change.ChangePackage | org.eclipse.emf.ecore.EcorePackage | VARIABLE_TYPE_MISMATCH
   FEATURE_MAP_ENTRY__FEATURE | EPACKAGE__ESUPER_PACKAGE | VARIABLE_NAME_MISMATCH

   Preondition Violations

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

   16

       case EcorePackage.EPACKAGE__ESUPER_PACKAGE:

   9

       if (resolve)

   17

       if (resolve)

   10

       return getFeature();

   10 | return getFeature();

   Preondition Violations
   Unmatched return getFeature();

   18 | return getESuperPackage();

   Preondition Violations
   Unmatched return getESuperPackage();

   18

       return getESuperPackage();

   11

       return basicGetFeature();

   11 | return basicGetFeature();

   Preondition Violations
   Unmatched return basicGetFeature();

   19 | return basicGetESuperPackage();

   Preondition Violations
   Unmatched return basicGetESuperPackage();

   19

       return basicGetESuperPackage();

   Precondition Violations (14)
   Row | Violation
   --- | ---
   1 | Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
   2 | Unmatched return getFeatureName();
   3 | Unmatched return getEFactoryInstance();
   4 | Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
   5 | Unmatched return getDataValue();
   6 | Unmatched return getEClassifiers();
   7 | Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
   8 | Unmatched return getValue();
   9 | Unmatched return getESubpackages();
   10 | Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
   11 | Unmatched return getFeature();
   12 | Unmatched return getESuperPackage();
   13 | Unmatched return basicGetFeature();
   14 | Unmatched return basicGetESuperPackage();