11473-3-6

case EcorePackage.EENUM__DEFAULT_VALUE: return DEFAULT_VALUE_EDEFAULT == null ? getDefaultValue() != null : !DEFAULT_VALUE_EDEFAULT.equals(getDefaultValue()); case EcorePackage.EENUM__INSTANCE_TYPE_NAME: return isSetInstanceTypeName(); case EcorePackage.EENUM__EPACKAGE: return basicGetEPackage() != null;
case ChangePackage.FEATURE_CHANGE__VALUE: return VALUE_EDEFAULT == null ? getValue() != null : !VALUE_EDEFAULT.equals(getValue()); case ChangePackage.FEATURE_CHANGE__FEATURE: return isSetFeature(); case ChangePackage.FEATURE_CHANGE__REFERENCE_VALUE: return basicGetReferenceValue() != null;

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EEnumImpl.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/impl/FeatureChangeImpl.java
Method name: `boolean eIsSet(int)` |  | Method name: `boolean eIsSet(int)`
Number of AST nodes: 6 |  | Number of AST nodes: 6

1

    case EcorePackage.EENUM__DEFAULT_VALUE:↵

1

    case ChangePackage.FEATURE_CHANGE__VALUE:↵

2

            return DEFAULT_VALUE_EDEFAULT == null ? getDefaultValue() != null : !DEFAULT_VALUE_EDEFAULT.equals(getDefaultValue());↵

2

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

3

          case EcorePackage.EENUM__INSTANCE_TYPE_NAME:↵

3

          case ChangePackage.FEATURE_CHANGE__FEATURE:↵

4

            return isSetInstanceTypeName();↵

4

            return isSetFeature();↵

5

          case EcorePackage.EENUM__EPACKAGE:↵

5

          case ChangePackage.FEATURE_CHANGE__REFERENCE_VALUE:↵

6

            return basicGetEPackage() != null;

6

            return basicGetReferenceValue() != null;

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

1. {Non-refactorable}

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

   10

       case EcorePackage.EENUM__DEFAULT_VALUE:

   10 | case EcorePackage.EENUM__DEFAULT_VALUE:
   8 | case ChangePackage.FEATURE_CHANGE__VALUE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.EcorePackage | org.eclipse.emf.ecore.change.ChangePackage | VARIABLE_TYPE_MISMATCH
   EENUM__DEFAULT_VALUE | FEATURE_CHANGE__VALUE | VARIABLE_NAME_MISMATCH

   Preondition Violations

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

   8

       case ChangePackage.FEATURE_CHANGE__VALUE:

   11

       return DEFAULT_VALUE_EDEFAULT == null ? getDefaultValue() != null : !DEFAULT_VALUE_EDEFAULT.equals(getDefaultValue());

   11 | return DEFAULT_VALUE_EDEFAULT == null ? getDefaultValue() != null : ! DEFAULT_VALUE_EDEFAULT.equals(getDefaultValue());
   9 | return VALUE_EDEFAULT == null ? getValue() != null : ! VALUE_EDEFAULT.equals(getValue());

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   DEFAULT_VALUE_EDEFAULT | VALUE_EDEFAULT | VARIABLE_NAME_MISMATCH
   getDefaultValue | getValue | METHOD_INVOCATION_NAME_MISMATCH
   getDefaultValue | getValue | METHOD_INVOCATION_NAME_MISMATCH
   DEFAULT_VALUE_EDEFAULT | VALUE_EDEFAULT | VARIABLE_NAME_MISMATCH

   9

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

   12

       case EcorePackage.EENUM__INSTANCE_TYPE_NAME:

   12 | case EcorePackage.EENUM__INSTANCE_TYPE_NAME:
   12 | case ChangePackage.FEATURE_CHANGE__REFERENCE_VALUE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.EcorePackage | org.eclipse.emf.ecore.change.ChangePackage | VARIABLE_TYPE_MISMATCH
   EENUM__INSTANCE_TYPE_NAME | FEATURE_CHANGE__REFERENCE_VALUE | VARIABLE_NAME_MISMATCH

   Preondition Violations

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

   12

       case ChangePackage.FEATURE_CHANGE__REFERENCE_VALUE:

   13

       return isSetInstanceTypeName();

   13 | return isSetInstanceTypeName();
   13 | return basicGetReferenceValue() != null;

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   isSetInstanceTypeName() | basicGetReferenceValue() != null | TYPE_COMPATIBLE_REPLACEMENT

   13

       return basicGetReferenceValue() != null;

   14

       case EcorePackage.EENUM__EPACKAGE:

   14 | case EcorePackage.EENUM__EPACKAGE:
   10 | case ChangePackage.FEATURE_CHANGE__FEATURE:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.eclipse.emf.ecore.EcorePackage | org.eclipse.emf.ecore.change.ChangePackage | VARIABLE_TYPE_MISMATCH
   EENUM__EPACKAGE | FEATURE_CHANGE__FEATURE | VARIABLE_NAME_MISMATCH

   Preondition Violations

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

   10

       case ChangePackage.FEATURE_CHANGE__FEATURE:

   15

       return basicGetEPackage() != null;

   15 | return basicGetEPackage() != null;
   11 | return isSetFeature();

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   basicGetEPackage() != null | isSetFeature() | TYPE_COMPATIBLE_REPLACEMENT

   11

       return isSetFeature();

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