10196-2-3

case ChangePackage.LIST_CHANGE__VALUES: return getValues(); case ChangePackage.LIST_CHANGE__REFERENCE_VALUES: return getReferenceValues(); case ChangePackage.LIST_CHANGE__FEATURE: if (resolve) return getFeature(); return basicGetFeature(); case ChangePackage.LIST_CHANGE__FEATURE_MAP_ENTRY_VALUES: return getFeatureMapEntryValues();
case EcorePackage.ECLASSIFIER__DEFAULT_VALUE: return getDefaultValue(); case EcorePackage.ECLASSIFIER__INSTANCE_TYPE_NAME: return getInstanceTypeName(); case EcorePackage.ECLASSIFIER__EPACKAGE: if (resolve) return getEPackage(); return basicGetEPackage(); case EcorePackage.ECLASSIFIER__ETYPE_PARAMETERS: return getETypeParameters();

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

1

    case EcorePackage.ECLASSIFIER__DEFAULT_VALUE:↵

2

            return getValues();↵

2

            return getDefaultValue();↵

3

          case ChangePackage.LIST_CHANGE__REFERENCE_VALUES:↵

3

          case EcorePackage.ECLASSIFIER__INSTANCE_TYPE_NAME:↵

4

            return getReferenceValues();↵

4

            return getInstanceTypeName();↵

5

          case ChangePackage.LIST_CHANGE__FEATURE:↵

5

          case EcorePackage.ECLASSIFIER__EPACKAGE:↵

6

            if (resolve) return getFeature();↵

6

            if (resolve) return getEPackage();↵

7

            return basicGetFeature();↵

7

            return basicGetEPackage();↵

8

          case ChangePackage.LIST_CHANGE__FEATURE_MAP_ENTRY_VALUES:↵

8

          case EcorePackage.ECLASSIFIER__ETYPE_PARAMETERS:↵

9

            return getFeatureMapEntryValues();

9

            return getETypeParameters();

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

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

   10

       case ChangePackage.LIST_CHANGE__VALUES:

   10 | case ChangePackage.LIST_CHANGE__VALUES:
   10 | case EcorePackage.ECLASSIFIER__DEFAULT_VALUE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.change.ChangePackage | org.eclipse.emf.ecore.EcorePackage | VARIABLE_TYPE_MISMATCH
   LIST_CHANGE__VALUES | ECLASSIFIER__DEFAULT_VALUE | 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.ECLASSIFIER__DEFAULT_VALUE:

   11 | return getDefaultValue();

   Preondition Violations
   Unmatched return getDefaultValue();

   11

       return getDefaultValue();

   11

       return getValues();

   11 | return getValues();

   Preondition Violations
   Unmatched return getValues();

   12

       case ChangePackage.LIST_CHANGE__REFERENCE_VALUES:

   12 | case ChangePackage.LIST_CHANGE__REFERENCE_VALUES:
   12 | case EcorePackage.ECLASSIFIER__INSTANCE_TYPE_NAME:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.change.ChangePackage | org.eclipse.emf.ecore.EcorePackage | VARIABLE_TYPE_MISMATCH
   LIST_CHANGE__REFERENCE_VALUES | ECLASSIFIER__INSTANCE_TYPE_NAME | 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.ECLASSIFIER__INSTANCE_TYPE_NAME:

   13 | return getInstanceTypeName();

   Preondition Violations
   Unmatched return getInstanceTypeName();

   13

       return getInstanceTypeName();

   13

       return getReferenceValues();

   13 | return getReferenceValues();

   Preondition Violations
   Unmatched return getReferenceValues();

   14

       case ChangePackage.LIST_CHANGE__FEATURE:

   14 | case ChangePackage.LIST_CHANGE__FEATURE:
   14 | case EcorePackage.ECLASSIFIER__EPACKAGE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.change.ChangePackage | org.eclipse.emf.ecore.EcorePackage | VARIABLE_TYPE_MISMATCH
   LIST_CHANGE__FEATURE | ECLASSIFIER__EPACKAGE | 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.ECLASSIFIER__EPACKAGE:

   15

       if (resolve)

   15

       if (resolve)

   16 | return getEPackage();

   Preondition Violations
   Unmatched return getEPackage();

   16

       return getEPackage();

   16

       return getFeature();

   16 | return getFeature();

   Preondition Violations
   Unmatched return getFeature();

   17 | return basicGetEPackage();

   Preondition Violations
   Unmatched return basicGetEPackage();

   17

       return basicGetEPackage();

   17

       return basicGetFeature();

   17 | return basicGetFeature();

   Preondition Violations
   Unmatched return basicGetFeature();

   18

       case ChangePackage.LIST_CHANGE__FEATURE_MAP_ENTRY_VALUES:

   18 | case ChangePackage.LIST_CHANGE__FEATURE_MAP_ENTRY_VALUES:
   18 | case EcorePackage.ECLASSIFIER__ETYPE_PARAMETERS:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.change.ChangePackage | org.eclipse.emf.ecore.EcorePackage | VARIABLE_TYPE_MISMATCH
   LIST_CHANGE__FEATURE_MAP_ENTRY_VALUES | ECLASSIFIER__ETYPE_PARAMETERS | 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

   18

       case EcorePackage.ECLASSIFIER__ETYPE_PARAMETERS:

   19 | return getETypeParameters();

   Preondition Violations
   Unmatched return getETypeParameters();

   19

       return getETypeParameters();

   19

       return getFeatureMapEntryValues();

   19 | return getFeatureMapEntryValues();

   Preondition Violations
   Unmatched return getFeatureMapEntryValues();

   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 getDefaultValue();
   3 | Unmatched return getValues();
   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 getInstanceTypeName();
   6 | Unmatched return getReferenceValues();
   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 getEPackage();
   9 | Unmatched return getFeature();
   10 | Unmatched return basicGetEPackage();
   11 | Unmatched return basicGetFeature();
   12 | Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
   13 | Unmatched return getETypeParameters();
   14 | Unmatched return getFeatureMapEntryValues();