10661-3-6

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();
case EcorePackage.ECLASSIFIER__INSTANCE_CLASS: return getInstanceClass(); 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();

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EEnumImpl.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 EcorePackage.EENUM__INSTANCE_CLASS:↵

1

    case EcorePackage.ECLASSIFIER__INSTANCE_CLASS:↵

2

            return getInstanceClass();↵

2

            return getInstanceClass();↵

3

          case EcorePackage.EENUM__DEFAULT_VALUE:↵

3

          case EcorePackage.ECLASSIFIER__DEFAULT_VALUE:↵

4

            return getDefaultValue();↵

4

            return getDefaultValue();↵

5

          case EcorePackage.EENUM__INSTANCE_TYPE_NAME:↵

5

          case EcorePackage.ECLASSIFIER__INSTANCE_TYPE_NAME:↵

6

            return getInstanceTypeName();↵

6

            return getInstanceTypeName();↵

7

          case EcorePackage.EENUM__EPACKAGE:↵

7

          case EcorePackage.ECLASSIFIER__EPACKAGE:↵

8

            if (resolve) return getEPackage();↵

8

            if (resolve) return getEPackage();↵

9

            return basicGetEPackage();

9

            return basicGetEPackage();

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 1
Number of non-refactorable cases | 0
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 | 45

1. {Refactorable}

   Mapping Summary
   Number of mapped statements | 10
   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) | 52.1
   Clone type | Type 2

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

   8

       case EcorePackage.EENUM__INSTANCE_CLASS:

   8 | case EcorePackage.EENUM__INSTANCE_CLASS:
   8 | case EcorePackage.ECLASSIFIER__INSTANCE_CLASS:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   EENUM__INSTANCE_CLASS | ECLASSIFIER__INSTANCE_CLASS | VARIABLE_NAME_MISMATCH

   8

       case EcorePackage.ECLASSIFIER__INSTANCE_CLASS:

   9

       return getInstanceClass();

   9

       return getInstanceClass();

   10

       case EcorePackage.EENUM__DEFAULT_VALUE:

   10 | case EcorePackage.EENUM__DEFAULT_VALUE:
   10 | case EcorePackage.ECLASSIFIER__DEFAULT_VALUE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   EENUM__DEFAULT_VALUE | ECLASSIFIER__DEFAULT_VALUE | VARIABLE_NAME_MISMATCH

   10

       case EcorePackage.ECLASSIFIER__DEFAULT_VALUE:

   11

       return getDefaultValue();

   11

       return getDefaultValue();

   12

       case EcorePackage.EENUM__INSTANCE_TYPE_NAME:

   12 | case EcorePackage.EENUM__INSTANCE_TYPE_NAME:
   12 | case EcorePackage.ECLASSIFIER__INSTANCE_TYPE_NAME:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   EENUM__INSTANCE_TYPE_NAME | ECLASSIFIER__INSTANCE_TYPE_NAME | VARIABLE_NAME_MISMATCH

   12

       case EcorePackage.ECLASSIFIER__INSTANCE_TYPE_NAME:

   13

       return getInstanceTypeName();

   13

       return getInstanceTypeName();

   14

       case EcorePackage.EENUM__EPACKAGE:

   14 | case EcorePackage.EENUM__EPACKAGE:
   14 | case EcorePackage.ECLASSIFIER__EPACKAGE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   EENUM__EPACKAGE | ECLASSIFIER__EPACKAGE | VARIABLE_NAME_MISMATCH

   14

       case EcorePackage.ECLASSIFIER__EPACKAGE:

   15

       if (resolve)

   15

       if (resolve)

   16

       return getEPackage();

   16

       return getEPackage();

   17

       return basicGetEPackage();

   17

       return basicGetEPackage();

   Precondition Violations (0)
   Row | Violation
   --- | ---