10915-3-4

case EcorePackage.EATTRIBUTE__DEFAULT_VALUE: return getDefaultValue(); case EcorePackage.EATTRIBUTE__UNSETTABLE: return isUnsettable() ? Boolean.TRUE : Boolean.FALSE; case EcorePackage.EATTRIBUTE__DERIVED: return isDerived() ? Boolean.TRUE : Boolean.FALSE; case EcorePackage.EATTRIBUTE__ECONTAINING_CLASS: return getEContainingClass();
case EcorePackage.EREFERENCE__DEFAULT_VALUE: return getDefaultValue(); case EcorePackage.EREFERENCE__UNSETTABLE: return isUnsettable() ? Boolean.TRUE : Boolean.FALSE; case EcorePackage.EREFERENCE__DERIVED: return isDerived() ? Boolean.TRUE : Boolean.FALSE; case EcorePackage.EREFERENCE__ECONTAINING_CLASS: return getEContainingClass();

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EAttributeImpl.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: 8 |  | Number of AST nodes: 8

1

    case EcorePackage.EATTRIBUTE__DEFAULT_VALUE:↵

1

    case EcorePackage.EREFERENCE__DEFAULT_VALUE:↵

2

            return getDefaultValue();↵

2

            return getDefaultValue();↵

3

          case EcorePackage.EATTRIBUTE__UNSETTABLE:↵

3

          case EcorePackage.EREFERENCE__UNSETTABLE:↵

4

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

4

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

5

          case EcorePackage.EATTRIBUTE__DERIVED:↵

5

          case EcorePackage.EREFERENCE__DERIVED:↵

6

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

6

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

7

          case EcorePackage.EATTRIBUTE__ECONTAINING_CLASS:↵

7

          case EcorePackage.EREFERENCE__ECONTAINING_CLASS:↵

8

            return getEContainingClass();

8

            return getEContainingClass();

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.0
Clones location | Clones are in different classes having the same super class
Number of node comparisons | 40

1. {Refactorable}

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

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

   32

       case EcorePackage.EATTRIBUTE__DEFAULT_VALUE:

   32 | case EcorePackage.EATTRIBUTE__DEFAULT_VALUE:
   32 | case EcorePackage.EREFERENCE__DEFAULT_VALUE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   EATTRIBUTE__DEFAULT_VALUE | EREFERENCE__DEFAULT_VALUE | VARIABLE_NAME_MISMATCH

   32

       case EcorePackage.EREFERENCE__DEFAULT_VALUE:

   33

       return getDefaultValue();

   33

       return getDefaultValue();

   34

       case EcorePackage.EATTRIBUTE__UNSETTABLE:

   34 | case EcorePackage.EATTRIBUTE__UNSETTABLE:
   34 | case EcorePackage.EREFERENCE__UNSETTABLE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   EATTRIBUTE__UNSETTABLE | EREFERENCE__UNSETTABLE | VARIABLE_NAME_MISMATCH

   34

       case EcorePackage.EREFERENCE__UNSETTABLE:

   35

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

   35

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

   36

       case EcorePackage.EATTRIBUTE__DERIVED:

   36 | case EcorePackage.EATTRIBUTE__DERIVED:
   36 | case EcorePackage.EREFERENCE__DERIVED:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   EATTRIBUTE__DERIVED | EREFERENCE__DERIVED | VARIABLE_NAME_MISMATCH

   36

       case EcorePackage.EREFERENCE__DERIVED:

   37

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

   37

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

   38

       case EcorePackage.EATTRIBUTE__ECONTAINING_CLASS:

   38 | case EcorePackage.EATTRIBUTE__ECONTAINING_CLASS:
   38 | case EcorePackage.EREFERENCE__ECONTAINING_CLASS:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   EATTRIBUTE__ECONTAINING_CLASS | EREFERENCE__ECONTAINING_CLASS | VARIABLE_NAME_MISMATCH

   38

       case EcorePackage.EREFERENCE__ECONTAINING_CLASS:

   39

       return getEContainingClass();

   39

       return getEContainingClass();

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