11003-6-7

case EcorePackage.EREFERENCE__CONTAINER: return isContainer() ? Boolean.TRUE : Boolean.FALSE; case EcorePackage.EREFERENCE__RESOLVE_PROXIES: return isResolveProxies() ? Boolean.TRUE : Boolean.FALSE; case EcorePackage.EREFERENCE__EOPPOSITE: if (resolve) return getEOpposite(); return basicGetEOpposite(); case EcorePackage.EREFERENCE__EREFERENCE_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__CONTAINER:↵

1

    case EcorePackage.EOPERATION__MANY:↵

2

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

2

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

3

          case EcorePackage.EREFERENCE__RESOLVE_PROXIES:↵

3

          case EcorePackage.EOPERATION__REQUIRED:↵

4

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

4

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

5

          case EcorePackage.EREFERENCE__EOPPOSITE:↵

5

          case EcorePackage.EOPERATION__ETYPE:↵

6

            if (resolve) return getEOpposite();↵

6

            if (resolve) return getEType();↵

7

            return basicGetEOpposite();↵

7

            return basicGetEType();↵

8

          case EcorePackage.EREFERENCE__EREFERENCE_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 | 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 | 37

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 7
   Number of unmapped statements in the first code fragment | 2
   Number of unmapped statements in the second code fragment | 2
   Time elapsed for statement mapping (ms) | 299.0
   Clone type | Type 2

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

   42

       case EcorePackage.EREFERENCE__CONTAINER:

   42 | case EcorePackage.EREFERENCE__CONTAINER:
   16 | case EcorePackage.EOPERATION__REQUIRED:

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

   16

       case EcorePackage.EOPERATION__REQUIRED:

   43

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

   43 | return isContainer() ? Boolean.TRUE : Boolean.FALSE;
   17 | return isRequired() ? Boolean.TRUE : Boolean.FALSE;

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   isContainer | isRequired | METHOD_INVOCATION_NAME_MISMATCH

   17

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

   44

       case EcorePackage.EREFERENCE__RESOLVE_PROXIES:

   44 | case EcorePackage.EREFERENCE__RESOLVE_PROXIES:
   14 | case EcorePackage.EOPERATION__MANY:

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

   14

       case EcorePackage.EOPERATION__MANY:

   45

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

   45 | return isResolveProxies() ? Boolean.TRUE : Boolean.FALSE;
   15 | return isMany() ? Boolean.TRUE : Boolean.FALSE;

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   isResolveProxies | isMany | METHOD_INVOCATION_NAME_MISMATCH

   15

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

   46

       case EcorePackage.EREFERENCE__EOPPOSITE:

   46 | case EcorePackage.EREFERENCE__EOPPOSITE:
   22 | case EcorePackage.EOPERATION__EGENERIC_TYPE:

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

   22

       case EcorePackage.EOPERATION__EGENERIC_TYPE:

   47

       if (resolve)

   19

       if (resolve)

   20 | return getEType();

   Preondition Violations
   Unmatched return getEType();

   20

       return getEType();

   48

       return getEOpposite();

   48 | return getEOpposite();

   Preondition Violations
   Unmatched return getEOpposite();

   49

       return basicGetEOpposite();

   49 | return basicGetEOpposite();

   Preondition Violations
   Unmatched return basicGetEOpposite();

   50

       case EcorePackage.EREFERENCE__EREFERENCE_TYPE:

   50 | case EcorePackage.EREFERENCE__EREFERENCE_TYPE:
   18 | case EcorePackage.EOPERATION__ETYPE:

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

   18

       case EcorePackage.EOPERATION__ETYPE:

   21 | return basicGetEType();

   Preondition Violations
   Unmatched return basicGetEType();

   21

       return basicGetEType();

   Precondition Violations (4)
   Row | Violation
   --- | ---
   1 | Unmatched return getEType();
   2 | Unmatched return getEOpposite();
   3 | Unmatched return basicGetEOpposite();
   4 | Unmatched return basicGetEType();