Object notificationNotifier = notification.getNotifier(); if (notificationNotifier == getNotifier() && getFeatureID(null) == notification.getFeatureID(null)) { newValue = notification.getNewValue(); if (notification.getEventType() == Notification.SET) { eventType = Notification.SET; } return true; } break;
Object notificationNotifier = notification.getNotifier(); if (notificationNotifier == getNotifier() && getFeatureID(null) == notification.getFeatureID(null)) { newValue = notification.getNewValue(); if (notification.getEventType() == Notification.SET) { eventType = Notification.SET; } return true; }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/FeatureMapUtil.java File path: /emf-2.4.1/src/org/eclipse/emf/common/notify/impl/NotificationImpl.java
Method name: boolean merge(Notification) Method name: boolean merge(Notification)
Number of AST nodes: 7 Number of AST nodes: 6
1
Object notificationNotifier = notification.getNotifier();
1
Object notificationNotifier = notification.getNotifier();
2
          if (notificationNotifier == getNotifier() && getFeatureID(null) == notification.getFeatureID(null))
2
            if (notificationNotifier == getNotifier() && getFeatureID(null) == notification.getFeatureID(null))
3
          {
3
            {
4
            newValue = notification.getNewValue();
4
              newValue = notification.getNewValue();
5
            if (notification.getEventType() == Notification.SET)
5
              if (notification.getEventType() == Notification.SET)
6
            {
6
              {
7
              eventType = Notification.SET;
7
                eventType = Notification.SET;
8
            }
8
            
9
  }
9
            return true;
10
              return true;
10
          }
11
          
11
          break;
12
  }
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.4
Clones locationClones are in different classes having the same super class
Number of node comparisons16
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.8
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    4
    Object notificationNotifier = notification.getNotifier();
    8
    Object notificationNotifier = notification.getNotifier();
    5
    if (notificationNotifier == getNotifier() && getFeatureID(null) == notification.getFeatureID(null))
    9
    if (notificationNotifier == getNotifier() && getFeatureID(null) == notification.getFeatureID(null))
    6
    newValue = notification.getNewValue();
    10
    newValue = notification.getNewValue();
    7
    if (notification.getEventType() == Notification.SET)
    11
    if (notification.getEventType() == Notification.SET)
    8
    eventType = Notification.SET;
    12
    eventType = Notification.SET;
    9
    return true;
    9
    return true;
    13
    return true;
    Preondition Violations
    Conditional return true;
    Conditional return true;
    13
    return true;
    10
    break;
    10
    break;
    Preondition Violations
    Unmatched break;
                        
    Precondition Violations (3)
    Row Violation
    1Unmatched break;
    2Conditional return true;
    3Conditional return true;