11309-2-3

switch (featureID) { case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__KEY: return KEY_EDEFAULT == null ? key != null : !KEY_EDEFAULT.equals(key); case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__VALUE: return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); }
switch (featureID) { case XMLTypePackage.PROCESSING_INSTRUCTION__DATA: return DATA_EDEFAULT == null ? data != null : !DATA_EDEFAULT.equals(data); case XMLTypePackage.PROCESSING_INSTRUCTION__TARGET: return TARGET_EDEFAULT == null ? target != null : !TARGET_EDEFAULT.equals(target); }

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EStringToStringMapEntryImpl.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/impl/ProcessingInstructionImpl.java
Method name: `boolean eIsSet(int)` |  | Method name: `boolean eIsSet(int)`
Number of AST nodes: 5 |  | Number of AST nodes: 5

1

    switch (featureID)↵

1

    switch (featureID)↵

2

        {↵

2

        {↵

3

          case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__KEY:↵

3

          case XMLTypePackage.PROCESSING_INSTRUCTION__DATA:↵

4

            return KEY_EDEFAULT == null ? key != null : !KEY_EDEFAULT.equals(key);↵

4

            return DATA_EDEFAULT == null ? data != null : !DATA_EDEFAULT.equals(data);↵

5

          case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__VALUE:↵

5

          case XMLTypePackage.PROCESSING_INSTRUCTION__TARGET:↵

6

            return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);↵

6

            return TARGET_EDEFAULT == null ? target != null : !TARGET_EDEFAULT.equals(target);↵

7

        }

7

        }

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 different classes having the same super class
Number of node comparisons | 13

1. {Non-refactorable}

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

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

   1

       switch (featureID)

   1

       switch (featureID)

   2

       case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__KEY:

   2 | case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__KEY:
   2 | case XMLTypePackage.PROCESSING_INSTRUCTION__DATA:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.EcorePackage | org.eclipse.emf.ecore.xml.type.XMLTypePackage | VARIABLE_TYPE_MISMATCH
   ESTRING_TO_STRING_MAP_ENTRY__KEY | PROCESSING_INSTRUCTION__DATA | VARIABLE_NAME_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage
   - Make classes org.eclipse.emf.ecore.EcorePackage and org.eclipse.emf.ecore.xml.type.XMLTypePackage extend a common superclass

   2

       case XMLTypePackage.PROCESSING_INSTRUCTION__DATA:

   3

       return KEY_EDEFAULT == null ? key != null : !KEY_EDEFAULT.equals(key);

   3 | return KEY_EDEFAULT == null ? key != null : ! KEY_EDEFAULT.equals(key);
   3 | return DATA_EDEFAULT == null ? data != null : ! DATA_EDEFAULT.equals(data);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   KEY_EDEFAULT | DATA_EDEFAULT | VARIABLE_NAME_MISMATCH
   key | data | VARIABLE_NAME_MISMATCH
   key | data | VARIABLE_NAME_MISMATCH
   KEY_EDEFAULT | DATA_EDEFAULT | VARIABLE_NAME_MISMATCH

   3

       return DATA_EDEFAULT == null ? data != null : !DATA_EDEFAULT.equals(data);

   4

       case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__VALUE:

   4 | case EcorePackage.ESTRING_TO_STRING_MAP_ENTRY__VALUE:
   4 | case XMLTypePackage.PROCESSING_INSTRUCTION__TARGET:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.EcorePackage | org.eclipse.emf.ecore.xml.type.XMLTypePackage | VARIABLE_TYPE_MISMATCH
   ESTRING_TO_STRING_MAP_ENTRY__VALUE | PROCESSING_INSTRUCTION__TARGET | VARIABLE_NAME_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage
   - Make classes org.eclipse.emf.ecore.EcorePackage and org.eclipse.emf.ecore.xml.type.XMLTypePackage extend a common superclass

   4

       case XMLTypePackage.PROCESSING_INSTRUCTION__TARGET:

   5

       return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);

   5 | return VALUE_EDEFAULT == null ? value != null : ! VALUE_EDEFAULT.equals(value);
   5 | return TARGET_EDEFAULT == null ? target != null : ! TARGET_EDEFAULT.equals(target);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   VALUE_EDEFAULT | TARGET_EDEFAULT | VARIABLE_NAME_MISMATCH
   value | target | VARIABLE_NAME_MISMATCH
   value | target | VARIABLE_NAME_MISMATCH
   VALUE_EDEFAULT | TARGET_EDEFAULT | VARIABLE_NAME_MISMATCH

   5

       return TARGET_EDEFAULT == null ? target != null : !TARGET_EDEFAULT.equals(target);

   Precondition Violations (2)
   Row | Violation
   --- | ---
   1 | Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage
   2 | Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.xml.type.XMLTypePackage of variable XMLTypePackage