10279-4-6

case EcorePackage.ESTRUCTURAL_FEATURE__EANNOTATIONS: return getEAnnotations(); case EcorePackage.ESTRUCTURAL_FEATURE__NAME: return getName(); case EcorePackage.ESTRUCTURAL_FEATURE__ORDERED: return isOrdered() ? Boolean.TRUE : Boolean.FALSE; case EcorePackage.ESTRUCTURAL_FEATURE__UNIQUE: return isUnique() ? Boolean.TRUE : Boolean.FALSE; case EcorePackage.ESTRUCTURAL_FEATURE__LOWER_BOUND: return new Integer(getLowerBound()); case EcorePackage.ESTRUCTURAL_FEATURE__UPPER_BOUND: return new Integer(getUpperBound()); case EcorePackage.ESTRUCTURAL_FEATURE__MANY: return isMany() ? Boolean.TRUE : Boolean.FALSE; case EcorePackage.ESTRUCTURAL_FEATURE__REQUIRED: return isRequired() ? Boolean.TRUE : Boolean.FALSE; case EcorePackage.ESTRUCTURAL_FEATURE__ETYPE: if (resolve) return getEType(); return basicGetEType(); case EcorePackage.ESTRUCTURAL_FEATURE__EGENERIC_TYPE: return getEGenericType();
case EcorePackage.EREFERENCE__EANNOTATIONS: return getEAnnotations(); case EcorePackage.EREFERENCE__NAME: return getName(); case EcorePackage.EREFERENCE__ORDERED: return isOrdered() ? Boolean.TRUE : Boolean.FALSE; case EcorePackage.EREFERENCE__UNIQUE: return isUnique() ? Boolean.TRUE : Boolean.FALSE; case EcorePackage.EREFERENCE__LOWER_BOUND: return new Integer(getLowerBound()); case EcorePackage.EREFERENCE__UPPER_BOUND: return new Integer(getUpperBound()); case EcorePackage.EREFERENCE__MANY: return isMany() ? Boolean.TRUE : Boolean.FALSE; case EcorePackage.EREFERENCE__REQUIRED: return isRequired() ? Boolean.TRUE : Boolean.FALSE; case EcorePackage.EREFERENCE__ETYPE: if (resolve) return getEType(); return basicGetEType(); case EcorePackage.EREFERENCE__EGENERIC_TYPE: return getEGenericType();

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

1

    case EcorePackage.ESTRUCTURAL_FEATURE__EANNOTATIONS:↵

1

    case EcorePackage.EREFERENCE__EANNOTATIONS:↵

2

            return getEAnnotations();↵

2

            return getEAnnotations();↵

3

          case EcorePackage.ESTRUCTURAL_FEATURE__NAME:↵

3

          case EcorePackage.EREFERENCE__NAME:↵

4

            return getName();↵

4

            return getName();↵

5

          case EcorePackage.ESTRUCTURAL_FEATURE__ORDERED:↵

5

          case EcorePackage.EREFERENCE__ORDERED:↵

6

            return isOrdered() ? Boolean.TRUE : Boolean.FALSE;↵

6

            return isOrdered() ? Boolean.TRUE : Boolean.FALSE;↵

7

          case EcorePackage.ESTRUCTURAL_FEATURE__UNIQUE:↵

7

          case EcorePackage.EREFERENCE__UNIQUE:↵

8

            return isUnique() ? Boolean.TRUE : Boolean.FALSE;↵

8

            return isUnique() ? Boolean.TRUE : Boolean.FALSE;↵

9

          case EcorePackage.ESTRUCTURAL_FEATURE__LOWER_BOUND:↵

9

          case EcorePackage.EREFERENCE__LOWER_BOUND:↵

10

            return new Integer(getLowerBound());↵

10

            return new Integer(getLowerBound());↵

11

          case EcorePackage.ESTRUCTURAL_FEATURE__UPPER_BOUND:↵

11

          case EcorePackage.EREFERENCE__UPPER_BOUND:↵

12

            return new Integer(getUpperBound());↵

12

            return new Integer(getUpperBound());↵

13

          case EcorePackage.ESTRUCTURAL_FEATURE__MANY:↵

13

          case EcorePackage.EREFERENCE__MANY:↵

14

            return isMany() ? Boolean.TRUE : Boolean.FALSE;↵

14

            return isMany() ? Boolean.TRUE : Boolean.FALSE;↵

15

          case EcorePackage.ESTRUCTURAL_FEATURE__REQUIRED:↵

15

          case EcorePackage.EREFERENCE__REQUIRED:↵

16

            return isRequired() ? Boolean.TRUE : Boolean.FALSE;↵

16

            return isRequired() ? Boolean.TRUE : Boolean.FALSE;↵

17

          case EcorePackage.ESTRUCTURAL_FEATURE__ETYPE:↵

17

          case EcorePackage.EREFERENCE__ETYPE:↵

18

            if (resolve) return getEType();↵

18

            if (resolve) return getEType();↵

19

            return basicGetEType();↵

19

            return basicGetEType();↵

20

          case EcorePackage.ESTRUCTURAL_FEATURE__EGENERIC_TYPE:↵

20

          case EcorePackage.EREFERENCE__EGENERIC_TYPE:↵

21

            return getEGenericType();

21

            return getEGenericType();

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

1. {Refactorable}

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

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

   2

       case EcorePackage.ESTRUCTURAL_FEATURE__EANNOTATIONS:

   2 | case EcorePackage.ESTRUCTURAL_FEATURE__EANNOTATIONS:
   2 | case EcorePackage.EREFERENCE__EANNOTATIONS:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   ESTRUCTURAL_FEATURE__EANNOTATIONS | EREFERENCE__EANNOTATIONS | VARIABLE_NAME_MISMATCH

   2

       case EcorePackage.EREFERENCE__EANNOTATIONS:

   3

       return getEAnnotations();

   3

       return getEAnnotations();

   4

       case EcorePackage.ESTRUCTURAL_FEATURE__NAME:

   4 | case EcorePackage.ESTRUCTURAL_FEATURE__NAME:
   4 | case EcorePackage.EREFERENCE__NAME:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   ESTRUCTURAL_FEATURE__NAME | EREFERENCE__NAME | VARIABLE_NAME_MISMATCH

   4

       case EcorePackage.EREFERENCE__NAME:

   5

       return getName();

   5

       return getName();

   6

       case EcorePackage.ESTRUCTURAL_FEATURE__ORDERED:

   6 | case EcorePackage.ESTRUCTURAL_FEATURE__ORDERED:
   6 | case EcorePackage.EREFERENCE__ORDERED:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   ESTRUCTURAL_FEATURE__ORDERED | EREFERENCE__ORDERED | VARIABLE_NAME_MISMATCH

   6

       case EcorePackage.EREFERENCE__ORDERED:

   7

       return isOrdered() ? Boolean.TRUE : Boolean.FALSE;

   7

       return isOrdered() ? Boolean.TRUE : Boolean.FALSE;

   8

       case EcorePackage.ESTRUCTURAL_FEATURE__UNIQUE:

   8 | case EcorePackage.ESTRUCTURAL_FEATURE__UNIQUE:
   8 | case EcorePackage.EREFERENCE__UNIQUE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   ESTRUCTURAL_FEATURE__UNIQUE | EREFERENCE__UNIQUE | VARIABLE_NAME_MISMATCH

   8

       case EcorePackage.EREFERENCE__UNIQUE:

   9

       return isUnique() ? Boolean.TRUE : Boolean.FALSE;

   9

       return isUnique() ? Boolean.TRUE : Boolean.FALSE;

   10

       case EcorePackage.ESTRUCTURAL_FEATURE__LOWER_BOUND:

   10 | case EcorePackage.ESTRUCTURAL_FEATURE__LOWER_BOUND:
   10 | case EcorePackage.EREFERENCE__LOWER_BOUND:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   ESTRUCTURAL_FEATURE__LOWER_BOUND | EREFERENCE__LOWER_BOUND | VARIABLE_NAME_MISMATCH

   10

       case EcorePackage.EREFERENCE__LOWER_BOUND:

   11

       return new Integer(getLowerBound());

   11

       return new Integer(getLowerBound());

   12

       case EcorePackage.ESTRUCTURAL_FEATURE__UPPER_BOUND:

   12 | case EcorePackage.ESTRUCTURAL_FEATURE__UPPER_BOUND:
   12 | case EcorePackage.EREFERENCE__UPPER_BOUND:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   ESTRUCTURAL_FEATURE__UPPER_BOUND | EREFERENCE__UPPER_BOUND | VARIABLE_NAME_MISMATCH

   12

       case EcorePackage.EREFERENCE__UPPER_BOUND:

   13

       return new Integer(getUpperBound());

   13

       return new Integer(getUpperBound());

   14

       case EcorePackage.ESTRUCTURAL_FEATURE__MANY:

   14 | case EcorePackage.ESTRUCTURAL_FEATURE__MANY:
   14 | case EcorePackage.EREFERENCE__MANY:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   ESTRUCTURAL_FEATURE__MANY | EREFERENCE__MANY | VARIABLE_NAME_MISMATCH

   14

       case EcorePackage.EREFERENCE__MANY:

   15

       return isMany() ? Boolean.TRUE : Boolean.FALSE;

   15

       return isMany() ? Boolean.TRUE : Boolean.FALSE;

   16

       case EcorePackage.ESTRUCTURAL_FEATURE__REQUIRED:

   16 | case EcorePackage.ESTRUCTURAL_FEATURE__REQUIRED:
   16 | case EcorePackage.EREFERENCE__REQUIRED:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   ESTRUCTURAL_FEATURE__REQUIRED | EREFERENCE__REQUIRED | VARIABLE_NAME_MISMATCH

   16

       case EcorePackage.EREFERENCE__REQUIRED:

   17

       return isRequired() ? Boolean.TRUE : Boolean.FALSE;

   17

       return isRequired() ? Boolean.TRUE : Boolean.FALSE;

   18

       case EcorePackage.ESTRUCTURAL_FEATURE__ETYPE:

   18 | case EcorePackage.ESTRUCTURAL_FEATURE__ETYPE:
   18 | case EcorePackage.EREFERENCE__ETYPE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   ESTRUCTURAL_FEATURE__ETYPE | EREFERENCE__ETYPE | VARIABLE_NAME_MISMATCH

   18

       case EcorePackage.EREFERENCE__ETYPE:

   19

       if (resolve)

   19

       if (resolve)

   20

       return getEType();

   20

       return getEType();

   21

       return basicGetEType();

   21

       return basicGetEType();

   22

       case EcorePackage.ESTRUCTURAL_FEATURE__EGENERIC_TYPE:

   22 | case EcorePackage.ESTRUCTURAL_FEATURE__EGENERIC_TYPE:
   22 | case EcorePackage.EREFERENCE__EGENERIC_TYPE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   ESTRUCTURAL_FEATURE__EGENERIC_TYPE | EREFERENCE__EGENERIC_TYPE | VARIABLE_NAME_MISMATCH

   22

       case EcorePackage.EREFERENCE__EGENERIC_TYPE:

   23

       return getEGenericType();

   23

       return getEGenericType();

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