updateChildren(notification); switch (notification.getFeatureID(ListChange.class)) { case ChangePackage.LIST_CHANGE__KIND: case ChangePackage.LIST_CHANGE__INDEX: case ChangePackage.LIST_CHANGE__MOVE_TO_INDEX: case ChangePackage.LIST_CHANGE__VALUES: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case ChangePackage.LIST_CHANGE__FEATURE_MAP_ENTRY_VALUES: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } super.notifyChanged(notification);
updateChildren(notification); switch (notification.getFeatureID(EPackage.class)) { case EcorePackage.EPACKAGE__NS_URI: case EcorePackage.EPACKAGE__NS_PREFIX: case EcorePackage.EPACKAGE__EFACTORY_INSTANCE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case EcorePackage.EPACKAGE__ECLASSIFIERS: case EcorePackage.EPACKAGE__ESUBPACKAGES: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } super.notifyChanged(notification);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/provider/ListChangeItemProvider.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/EPackageItemProvider.java
Method name: void notifyChanged(Notification) Method name: void notifyChanged(Notification)
Number of AST nodes: 12 Number of AST nodes: 12
1
updateChildren(notification);
1
updateChildren(notification);
2
    switch (notification.getFeatureID(ListChange.class))
2
    switch (notification.getFeatureID(EPackage.class))
3
    {
3
    {
4
      case ChangePackage.LIST_CHANGE__KIND:
4
      case EcorePackage.EPACKAGE__NS_URI:
5
      case ChangePackage.LIST_CHANGE__INDEX:
5
      case EcorePackage.EPACKAGE__NS_PREFIX:
6
      case ChangePackage.LIST_CHANGE__MOVE_TO_INDEX:
6
      case EcorePackage.
7
      case ChangePackage.LIST_CHANGE__VALUES:
7
EPACKAGE__EFACTORY_INSTANCE:
8
        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
8
        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
9
        return;
9
        return;
10
      case ChangePackage.LIST_CHANGE__FEATURE_MAP_ENTRY_VALU
10
      case EcorePackage.EPACKAGE__ECLASSIFIERS:
11
ES:
11
      case EcorePackage.EPACKAGE__ESUBPACKAGES:
12
        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
12
        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
13
        return;
13
        return;
14
    }
14
    }
15
    super.notifyChanged(notification);
15
    super.notifyChanged(notification);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are in different classes having the same super class
Number of node comparisons48
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements12
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    updateChildren(notification);
    1
    updateChildren(notification);
    2
    switch (notification.getFeatureID(ListChange.class))
    2
    switch (notification.getFeatureID(EPackage.class))
    3
    case ChangePackage.LIST_CHANGE__KIND:
    3
    case ChangePackage.LIST_CHANGE__KIND:
    3
    case EcorePackage.EPACKAGE__NS_URI:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.change.ChangePackageorg.eclipse.emf.ecore.EcorePackageVARIABLE_TYPE_MISMATCH
    LIST_CHANGE__KINDEPACKAGE__NS_URIVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
    • Make classes org.eclipse.emf.ecore.change.ChangePackage and org.eclipse.emf.ecore.EcorePackage extend a common superclass
    3
    case EcorePackage.EPACKAGE__NS_URI:
    4
    case ChangePackage.LIST_CHANGE__INDEX:
    4
    case ChangePackage.LIST_CHANGE__INDEX:
    4
    case EcorePackage.EPACKAGE__NS_PREFIX:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.change.ChangePackageorg.eclipse.emf.ecore.EcorePackageVARIABLE_TYPE_MISMATCH
    LIST_CHANGE__INDEXEPACKAGE__NS_PREFIXVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
    • Make classes org.eclipse.emf.ecore.change.ChangePackage and org.eclipse.emf.ecore.EcorePackage extend a common superclass
    4
    case EcorePackage.EPACKAGE__NS_PREFIX:
    5
    case ChangePackage.LIST_CHANGE__MOVE_TO_INDEX:
    5
    case ChangePackage.LIST_CHANGE__MOVE_TO_INDEX:
    5
    case EcorePackage.EPACKAGE__EFACTORY_INSTANCE:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.change.ChangePackageorg.eclipse.emf.ecore.EcorePackageVARIABLE_TYPE_MISMATCH
    LIST_CHANGE__MOVE_TO_INDEXEPACKAGE__EFACTORY_INSTANCEVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
    • Make classes org.eclipse.emf.ecore.change.ChangePackage and org.eclipse.emf.ecore.EcorePackage extend a common superclass
    5
    case EcorePackage.EPACKAGE__EFACTORY_INSTANCE:
    6
    case ChangePackage.LIST_CHANGE__VALUES:
    6
    case ChangePackage.LIST_CHANGE__VALUES:
    9
    case EcorePackage.EPACKAGE__ESUBPACKAGES:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.change.ChangePackageorg.eclipse.emf.ecore.EcorePackageVARIABLE_TYPE_MISMATCH
    LIST_CHANGE__VALUESEPACKAGE__ESUBPACKAGESVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
    • Make classes org.eclipse.emf.ecore.change.ChangePackage and org.eclipse.emf.ecore.EcorePackage extend a common superclass
    9
    case EcorePackage.EPACKAGE__ESUBPACKAGES:
    7
    fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
    7
    fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
    10
    fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
    Differences
    Expression1Expression2Difference
    falsetrueLITERAL_VALUE_MISMATCH
    truefalseLITERAL_VALUE_MISMATCH
    10
    fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
    8
    return;
    11
    return;
    9
    case ChangePackage.LIST_CHANGE__FEATURE_MAP_ENTRY_VALUES:
    9
    case ChangePackage.LIST_CHANGE__FEATURE_MAP_ENTRY_VALUES:
    8
    case EcorePackage.EPACKAGE__ECLASSIFIERS:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.change.ChangePackageorg.eclipse.emf.ecore.EcorePackageVARIABLE_TYPE_MISMATCH
    LIST_CHANGE__FEATURE_MAP_ENTRY_VALUESEPACKAGE__ECLASSIFIERSVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
    • Make classes org.eclipse.emf.ecore.change.ChangePackage and org.eclipse.emf.ecore.EcorePackage extend a common superclass
    8
    case EcorePackage.EPACKAGE__ECLASSIFIERS:
    10
    fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
    10
    fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
    6
    fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
    Differences
    Expression1Expression2Difference
    truefalseLITERAL_VALUE_MISMATCH
    falsetrueLITERAL_VALUE_MISMATCH
    6
    fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
    11
    return;
    7
    return;
    12
    super.notifyChanged(notification);
    12
    super.notifyChanged(notification);
    Precondition Violations (5)
    Row Violation
    1Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
    2Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
    3Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
    4Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
    5Type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage