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);
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/provider/EPackageItemProvider.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(EPackage.class))
2
    switch (notification.getFeatureID(ResourceChange.class))
3
    {
3
    {
4
      case EcorePackage.EPACKAGE__NS_URI:
4
      case ChangePackage.RESOURCE_CHANGE__RESOURCE_URI:
5
      case EcorePackage.EPACKAGE__NS_PREFIX:
5
      case ChangePackage.RESOURCE_CHANGE__RESOURCE:
6
      case EcorePackage.EPACKAGE__EFACTORY_INSTANCE:
6
      case ChangePackage.RESOURCE_CHANGE__VALUE:
7
        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
7
        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
8
        return;
8
        return;
9
      case EcorePackage.EPACKAGE__ECLASSIFIERS:
9
      case ChangePackage.
10
      case EcorePackage.EPACKAGE__ESUBPACKAGES:
10
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 cases0
Number of non-refactorable cases1
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 comparisons47
  1. {Non-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.5
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    updateChildren(notification);
    1
    updateChildren(notification);
    2
    switch (notification.getFeatureID(EPackage.class))
    2
    switch (notification.getFeatureID(ResourceChange.class))
    3
    case EcorePackage.EPACKAGE__NS_URI:
    3
    case EcorePackage.EPACKAGE__NS_URI:
    3
    case ChangePackage.RESOURCE_CHANGE__RESOURCE_URI:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.EcorePackageorg.eclipse.emf.ecore.change.ChangePackageVARIABLE_TYPE_MISMATCH
    EPACKAGE__NS_URIRESOURCE_CHANGE__RESOURCE_URIVARIABLE_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
    3
    case ChangePackage.RESOURCE_CHANGE__RESOURCE_URI:
    4
    case EcorePackage.EPACKAGE__NS_PREFIX:
    4
    case EcorePackage.EPACKAGE__NS_PREFIX:
    4
    case ChangePackage.RESOURCE_CHANGE__RESOURCE:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.EcorePackageorg.eclipse.emf.ecore.change.ChangePackageVARIABLE_TYPE_MISMATCH
    EPACKAGE__NS_PREFIXRESOURCE_CHANGE__RESOURCEVARIABLE_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
    4
    case ChangePackage.RESOURCE_CHANGE__RESOURCE:
    5
    case EcorePackage.EPACKAGE__EFACTORY_INSTANCE:
    5
    case EcorePackage.EPACKAGE__EFACTORY_INSTANCE:
    5
    case ChangePackage.RESOURCE_CHANGE__VALUE:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.EcorePackageorg.eclipse.emf.ecore.change.ChangePackageVARIABLE_TYPE_MISMATCH
    EPACKAGE__EFACTORY_INSTANCERESOURCE_CHANGE__VALUEVARIABLE_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
    5
    case ChangePackage.RESOURCE_CHANGE__VALUE:
    6
    fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
    6
    fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
    7
    return;
    7
    return;
    8
    case EcorePackage.EPACKAGE__ECLASSIFIERS:
    8
    case EcorePackage.EPACKAGE__ECLASSIFIERS:
    8
    case ChangePackage.RESOURCE_CHANGE__LIST_CHANGES:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.EcorePackageorg.eclipse.emf.ecore.change.ChangePackageVARIABLE_TYPE_MISMATCH
    EPACKAGE__ECLASSIFIERSRESOURCE_CHANGE__LIST_CHANGESVARIABLE_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.RESOURCE_CHANGE__LIST_CHANGES:
    9
    case EcorePackage.EPACKAGE__ESUBPACKAGES:
                                                                                            
    10
    fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
    9
    fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
    11
    return;
    10
    return;
    12
    super.notifyChanged(notification);
    11
    super.notifyChanged(notification);
    Precondition Violations (4)
    Row Violation
    1Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage
    2Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage
    3Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage
    4Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage