11003-5-7

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:
case EcorePackage.EOPERATION__MANY: return isMany() ? Boolean.TRUE : Boolean.FALSE; case EcorePackage.EOPERATION__REQUIRED: return isRequired() ? Boolean.TRUE : Boolean.FALSE; case EcorePackage.EOPERATION__ETYPE: if (resolve) return getEType(); return basicGetEType(); case EcorePackage.EOPERATION__EGENERIC_TYPE:

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

1

    case EcorePackage.EREFERENCE__MANY:↵

1

    case EcorePackage.EOPERATION__MANY:↵

2

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

2

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

3

          case EcorePackage.EREFERENCE__REQUIRED:↵

3

          case EcorePackage.EOPERATION__REQUIRED:↵

4

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

4

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

5

          case EcorePackage.EREFERENCE__ETYPE:↵

5

          case EcorePackage.EOPERATION__ETYPE:↵

6

            if (resolve) return getEType();↵

6

            if (resolve) return getEType();↵

7

            return basicGetEType();↵

7

            return basicGetEType();↵

8

          case EcorePackage.EREFERENCE__EGENERIC_TYPE:

8

          case EcorePackage.EOPERATION__EGENERIC_TYPE:

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

1. {Refactorable}

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

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

   14

       case EcorePackage.EREFERENCE__MANY:

   14 | case EcorePackage.EREFERENCE__MANY:
   14 | case EcorePackage.EOPERATION__MANY:

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

   14

       case EcorePackage.EOPERATION__MANY:

   15

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

   15

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

   16

       case EcorePackage.EREFERENCE__REQUIRED:

   16 | case EcorePackage.EREFERENCE__REQUIRED:
   16 | case EcorePackage.EOPERATION__REQUIRED:

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

   16

       case EcorePackage.EOPERATION__REQUIRED:

   17

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

   17

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

   18

       case EcorePackage.EREFERENCE__ETYPE:

   18 | case EcorePackage.EREFERENCE__ETYPE:
   18 | case EcorePackage.EOPERATION__ETYPE:

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

   18

       case EcorePackage.EOPERATION__ETYPE:

   19

       if (resolve)

   19

       if (resolve)

   20

       return getEType();

   20

       return getEType();

   21

       return basicGetEType();

   21

       return basicGetEType();

   22

       case EcorePackage.EREFERENCE__EGENERIC_TYPE:

   22 | case EcorePackage.EREFERENCE__EGENERIC_TYPE:
   22 | case EcorePackage.EOPERATION__EGENERIC_TYPE:

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

   22

       case EcorePackage.EOPERATION__EGENERIC_TYPE:

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