updateChildren(notification); switch (notification.getFeatureID(EFactory.class)) { case EcorePackage.EFACTORY__EPACKAGE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } super.notifyChanged(notification);
updateChildren(notification); switch (notification.getFeatureID(ENamedElement.class)) { case EcorePackage.ENAMED_ELEMENT__NAME: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } super.notifyChanged(notification);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/EFactoryItemProvider.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/ENamedElementItemProvider.java
Method name: void notifyChanged(Notification) Method name: void notifyChanged(Notification)
Number of AST nodes: 6 Number of AST nodes: 6
1
updateChildren(notification);
1
updateChildren(notification);
2
    switch (notification.getFeatureID(EFactory.class))
2
    switch (notification.getFeatureID(ENamedElement.class))
3
    {
3
    {
4
      case EcorePackage.EFACTORY__EPACKAGE:
4
      case EcorePackage.ENAMED_ELEMENT__NAME:
5
        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
5
        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
6
        return;
6
        return;
7
    }
7
    }
8
    super.notifyChanged(notification);
8
    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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons14
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    updateChildren(notification);
    1
    updateChildren(notification);
    2
    switch (notification.getFeatureID(EFactory.class))
    2
    switch (notification.getFeatureID(ENamedElement.class))
    3
    case EcorePackage.EFACTORY__EPACKAGE:
    3
    case EcorePackage.EFACTORY__EPACKAGE:
    3
    case EcorePackage.ENAMED_ELEMENT__NAME:
    Differences
    Expression1Expression2Difference
    EFACTORY__EPACKAGEENAMED_ELEMENT__NAMEVARIABLE_NAME_MISMATCH
    3
    case EcorePackage.ENAMED_ELEMENT__NAME:
    4
    fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
    4
    fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
    5
    return;
    5
    return;
    6
    super.notifyChanged(notification);
    6
    super.notifyChanged(notification);
    Precondition Violations (0)
    Row Violation