10962-1-2

case BOOLEAN: { internalEObject.eSet(eStructuralFeatureData.featureID, readBoolean()); break; } case BYTE: { internalEObject.eSet(eStructuralFeatureData.featureID, readByte()); break; } case CHAR: { internalEObject.eSet(eStructuralFeatureData.featureID, readChar()); break; } case DOUBLE: { internalEObject.eSet(eStructuralFeatureData.featureID, readDouble()); break;
case FLOAT: { internalEObject.eSet(eStructuralFeatureData.featureID, readFloat()); break; } case INT: { internalEObject.eSet(eStructuralFeatureData.featureID, readInt()); break; } case LONG: { internalEObject.eSet(eStructuralFeatureData.featureID, readLong()); break; } case SHORT: { internalEObject.eSet(eStructuralFeatureData.featureID, readShort()); break;

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/BinaryResourceImpl.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/BinaryResourceImpl.java
Method name: `void loadFeatureValue(InternalEObject, EStructuralFeatureData)` |  | Method name: `void loadFeatureValue(InternalEObject, EStructuralFeatureData)`
Number of AST nodes: 12 |  | Number of AST nodes: 12

1

    case BOOLEAN:↵

1

    case FLOAT:↵

2

            {↵

2

            {↵

3

              internalEObject.eSet(eStructuralFeatureData.featureID, readBoolean());↵

3

              internalEObject.eSet(eStructuralFeatureData.featureID, readFloat());↵

4

              break;↵

4

              break;↵

5

            }↵

5

            }↵

6

            case BYTE:↵

6

            case INT:↵

7

            {↵

7

            {↵

8

              internalEObject.eSet(eStructuralFeatureData.featureID, readByte());↵

8

              internalEObject.eSet(eStructuralFeatureData.featureID, readInt());↵

9

              break;↵

9

              break;↵

10

            }↵

10

            }↵

11

            case CHAR:↵

11

            case LONG:↵

12

            {↵

12

            {↵

13

              internalEObject.eSet(eStructuralFeatureData.featureID, readChar());↵

13

              internalEObject.eSet(eStructuralFeatureData.featureID, readLong());↵

14

              break;↵

14

              break;↵

15

            }↵

15

            }↵

16

            case DOUBLE:↵

16

            case SHORT:↵

17

            {↵

17

            {↵

18

              internalEObject.eSet(eStructuralFeatureData.featureID, readDouble());↵

18

              internalEObject.eSet(eStructuralFeatureData.featureID, readShort());↵

19

              break;

19

              break;

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.0
Clones location | Clones are in the same method
Number of node comparisons | 90

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 12
   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
   --- | --- | --- | --- | ---

   39

       case BOOLEAN:

   39 | case BOOLEAN:
   51 | case FLOAT:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   BOOLEAN | FLOAT | VARIABLE_NAME_MISMATCH

   51

       case FLOAT:

   40

       internalEObject.eSet(eStructuralFeatureData.featureID, readBoolean());

   40 | internalEObject.eSet(eStructuralFeatureData.featureID, readBoolean());
   52 | internalEObject.eSet(eStructuralFeatureData.featureID, readFloat());

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   readBoolean | readFloat | METHOD_INVOCATION_NAME_MISMATCH
   boolean | float | VARIABLE_TYPE_MISMATCH

   Preondition Violations
   Type boolean of variable readBoolean() does not match with type float of variable readFloat()

   52

       internalEObject.eSet(eStructuralFeatureData.featureID, readFloat());

   41

       break;

   53

       break;

   42

       case BYTE:

   42 | case BYTE:
   54 | case INT:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   BYTE | INT | VARIABLE_NAME_MISMATCH

   54

       case INT:

   43

       internalEObject.eSet(eStructuralFeatureData.featureID, readByte());

   43 | internalEObject.eSet(eStructuralFeatureData.featureID, readByte());
   55 | internalEObject.eSet(eStructuralFeatureData.featureID, readInt());

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   readByte | readInt | METHOD_INVOCATION_NAME_MISMATCH
   byte | int | VARIABLE_TYPE_MISMATCH

   Preondition Violations
   Type byte of variable readByte() does not match with type int of variable readInt()

   55

       internalEObject.eSet(eStructuralFeatureData.featureID, readInt());

   44

       break;

   56

       break;

   45

       case CHAR:

   45 | case CHAR:
   57 | case LONG:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   CHAR | LONG | VARIABLE_NAME_MISMATCH

   57

       case LONG:

   46

       internalEObject.eSet(eStructuralFeatureData.featureID, readChar());

   46 | internalEObject.eSet(eStructuralFeatureData.featureID, readChar());
   58 | internalEObject.eSet(eStructuralFeatureData.featureID, readLong());

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   readChar | readLong | METHOD_INVOCATION_NAME_MISMATCH
   char | long | VARIABLE_TYPE_MISMATCH

   Preondition Violations
   Type char of variable readChar() does not match with type long of variable readLong()

   58

       internalEObject.eSet(eStructuralFeatureData.featureID, readLong());

   47

       break;

   59

       break;

   48

       case DOUBLE:

   48 | case DOUBLE:
   60 | case SHORT:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   DOUBLE | SHORT | VARIABLE_NAME_MISMATCH

   60

       case SHORT:

   49

       internalEObject.eSet(eStructuralFeatureData.featureID, readDouble());

   49 | internalEObject.eSet(eStructuralFeatureData.featureID, readDouble());
   61 | internalEObject.eSet(eStructuralFeatureData.featureID, readShort());

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   readDouble | readShort | METHOD_INVOCATION_NAME_MISMATCH
   double | short | VARIABLE_TYPE_MISMATCH

   Preondition Violations
   Type double of variable readDouble() does not match with type short of variable readShort()

   61

       internalEObject.eSet(eStructuralFeatureData.featureID, readShort());

   50

       break;

   62

       break;

   Precondition Violations (4)
   Row | Violation
   --- | ---
   1 | Type boolean of variable readBoolean() does not match with type float of variable readFloat()
   2 | Type byte of variable readByte() does not match with type int of variable readInt()
   3 | Type char of variable readChar() does not match with type long of variable readLong()
   4 | Type double of variable readDouble() does not match with type short of variable readShort()