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(ResourceChange.class)) { case ChangePackage.RESOURCE_CHANGE__RESOURCE_URI: case ChangePackage.RESOURCE_CHANGE__RESOURCE: case ChangePackage.RESOURCE_CHANGE__VALUE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case ChangePackage.RESOURCE_CHANGE__LIST_CHANGES: 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/change/provider/ResourceChangeItemProvider.java
Method name: void notifyChanged(Notification) Method name: void notifyChanged(Notification)
Number of AST nodes: 12 Number of AST nodes: 11
1
updateChildren(notification);
1
updateChildren(notification);
2
    switch (notification.getFeatureID(ListChange.class))
2
    switch (notification.getFeatureID(ResourceChange.class))
3
    {
3
    {
4
      case ChangePackage.LIST_CHANGE__KIND:
4
      case ChangePackage.RESOURCE_CHANGE__
5
      case ChangePackage.LIST_CHANGE__INDEX:
5
RESOURCE_URI:
6
      case ChangePackage.LIST_CHANGE__MOVE_TO_INDEX:
6
      case ChangePackage.RESOURCE_CHANGE__RESOURCE:
7
      case ChangePackage.LIST_CHANGE__VALUES:
7
      case ChangePackage.RESOURCE_CHANGE__VALUE:
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_VALUES:
10
      case ChangePackage.RESOURCE_CHANGE__LIST_CHANGES:
11
        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
11
        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
12
        return;
12
        return;
13
    }
13
    }
14
    super.notifyChanged(notification);
14
    super.notifyChanged(notification);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in different classes having the same super class
Number of node comparisons41
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements11
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.2
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    updateChildren(notification);
    1
    updateChildren(notification);
    2
    switch (notification.getFeatureID(ListChange.class))
    2
    switch (notification.getFeatureID(ResourceChange.class))
    3
    case ChangePackage.LIST_CHANGE__KIND:
    3
    case ChangePackage.LIST_CHANGE__KIND:
    3
    case ChangePackage.RESOURCE_CHANGE__RESOURCE_URI:
    Differences
    Expression1Expression2Difference
    LIST_CHANGE__KINDRESOURCE_CHANGE__RESOURCE_URIVARIABLE_NAME_MISMATCH
    3
    case ChangePackage.RESOURCE_CHANGE__RESOURCE_URI:
    4
    case ChangePackage.LIST_CHANGE__INDEX:
    4
    case ChangePackage.LIST_CHANGE__INDEX:
    4
    case ChangePackage.RESOURCE_CHANGE__RESOURCE:
    Differences
    Expression1Expression2Difference
    LIST_CHANGE__INDEXRESOURCE_CHANGE__RESOURCEVARIABLE_NAME_MISMATCH
    4
    case ChangePackage.RESOURCE_CHANGE__RESOURCE:
    5
    case ChangePackage.LIST_CHANGE__MOVE_TO_INDEX:
    5
    case ChangePackage.LIST_CHANGE__MOVE_TO_INDEX:
    5
    case ChangePackage.RESOURCE_CHANGE__VALUE:
    Differences
    Expression1Expression2Difference
    LIST_CHANGE__MOVE_TO_INDEXRESOURCE_CHANGE__VALUEVARIABLE_NAME_MISMATCH
    5
    case ChangePackage.RESOURCE_CHANGE__VALUE:
    6
    case ChangePackage.LIST_CHANGE__VALUES:
    6
    case ChangePackage.LIST_CHANGE__VALUES:
    8
    case ChangePackage.RESOURCE_CHANGE__LIST_CHANGES:
    Differences
    Expression1Expression2Difference
    LIST_CHANGE__VALUESRESOURCE_CHANGE__LIST_CHANGESVARIABLE_NAME_MISMATCH
    8
    case ChangePackage.RESOURCE_CHANGE__LIST_CHANGES:
    7
    fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
    7
    fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
    9
    fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
    Differences
    Expression1Expression2Difference
    falsetrueLITERAL_VALUE_MISMATCH
    truefalseLITERAL_VALUE_MISMATCH
    9
    fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
    8
    return;
    10
    return;
    9
    case ChangePackage.LIST_CHANGE__FEATURE_MAP_ENTRY_VALUES:
                                                                                                                            
    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);
    11
    super.notifyChanged(notification);
    Precondition Violations (0)
    Row Violation