11903-1-3

case ChangePackage.CHANGE_DESCRIPTION__OBJECTS_TO_DETACH: return objectsToDetach != null && !objectsToDetach.isEmpty(); case ChangePackage.CHANGE_DESCRIPTION__OBJECTS_TO_ATTACH: return objectsToAttach != null && !objectsToAttach.isEmpty(); case ChangePackage.CHANGE_DESCRIPTION__RESOURCE_CHANGES: return resourceChanges != null && !resourceChanges.isEmpty();
case ChangePackage.CHANGE_DESCRIPTION__OBJECT_CHANGES: return objectChanges != null && !objectChanges.isEmpty(); case ChangePackage.CHANGE_DESCRIPTION__OBJECTS_TO_DETACH: return objectsToDetach != null && !objectsToDetach.isEmpty(); case ChangePackage.CHANGE_DESCRIPTION__OBJECTS_TO_ATTACH: return objectsToAttach != null && !objectsToAttach.isEmpty();

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

1

    case ChangePackage.CHANGE_DESCRIPTION__OBJECT_CHANGES:↵

2

            return objectChanges != null && !objectChanges.isEmpty();↵

1

    case ChangePackage.CHANGE_DESCRIPTION__OBJECTS_TO_DETACH:↵

3

          case ChangePackage.CHANGE_DESCRIPTION__OBJECTS_TO_DETACH:↵

2

            return objectsToDetach != null && !objectsToDetach.isEmpty();↵

4

            return objectsToDetach != null && !objectsToDetach.isEmpty();↵

3

          case ChangePackage.CHANGE_DESCRIPTION__OBJECTS_TO_ATTACH:↵

5

          case ChangePackage.CHANGE_DESCRIPTION__OBJECTS_TO_ATTACH:↵

4

            return objectsToAttach != null && !objectsToAttach.isEmpty();↵

6

            return objectsToAttach != null && !objectsToAttach.isEmpty();

5

          case ChangePackage.CHANGE_DESCRIPTION__RESOURCE_CHANGES:↵

6

            return resourceChanges != null && !resourceChanges.isEmpty();

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

   4

       case ChangePackage.CHANGE_DESCRIPTION__OBJECTS_TO_DETACH:

   4

       case ChangePackage.CHANGE_DESCRIPTION__OBJECTS_TO_DETACH:

   5

       return objectsToDetach != null && !objectsToDetach.isEmpty();

   5

       return objectsToDetach != null && !objectsToDetach.isEmpty();

   6

       case ChangePackage.CHANGE_DESCRIPTION__OBJECTS_TO_ATTACH:

   6

       case ChangePackage.CHANGE_DESCRIPTION__OBJECTS_TO_ATTACH:

   7

       return objectsToAttach != null && !objectsToAttach.isEmpty();

   7

       return objectsToAttach != null && !objectsToAttach.isEmpty();

   8

       case ChangePackage.CHANGE_DESCRIPTION__RESOURCE_CHANGES:

   8 | case ChangePackage.CHANGE_DESCRIPTION__RESOURCE_CHANGES:
   2 | case ChangePackage.CHANGE_DESCRIPTION__OBJECT_CHANGES:

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   CHANGE_DESCRIPTION__RESOURCE_CHANGES | CHANGE_DESCRIPTION__OBJECT_CHANGES | VARIABLE_NAME_MISMATCH

   2

       case ChangePackage.CHANGE_DESCRIPTION__OBJECT_CHANGES:

   9

       return resourceChanges != null && !resourceChanges.isEmpty();

   9 | return resourceChanges != null && ! resourceChanges.isEmpty();
   3 | return objectChanges != null && ! objectChanges.isEmpty();

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   resourceChanges | objectChanges | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.common.util.EList | org.eclipse.emf.common.util.EMap> | VARIABLE_TYPE_MISMATCH
   resourceChanges | objectChanges | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.common.util.EList | org.eclipse.emf.common.util.EMap> | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.change.ResourceChange> of variable resourceChanges does not match with type org.eclipse.emf.common.util.EMap<org.eclipse.emf.ecore.EObject,org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.change.FeatureChange>> of variable objectChanges
   - Make classes org.eclipse.emf.common.util.EList and org.eclipse.emf.common.util.EMap> extend a common superclass

   Type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.change.ResourceChange> of variable resourceChanges does not match with type org.eclipse.emf.common.util.EMap<org.eclipse.emf.ecore.EObject,org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.change.FeatureChange>> of variable objectChanges
   - Make classes org.eclipse.emf.common.util.EList and org.eclipse.emf.common.util.EMap> extend a common superclass

   3

       return objectChanges != null && !objectChanges.isEmpty();

   Precondition Violations (2)
   Row | Violation
   --- | ---
   1 | Type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.change.ResourceChange> of variable resourceChanges does not match with type org.eclipse.emf.common.util.EMap<org.eclipse.emf.ecore.EObject,org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.change.FeatureChange>> of variable objectChanges
   2 | Type org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.change.ResourceChange> of variable resourceChanges does not match with type org.eclipse.emf.common.util.EMap<org.eclipse.emf.ecore.EObject,org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.change.FeatureChange>> of variable objectChanges