if (isNotificationRequired()) { boolean oldIsSet = isSet(); E object = doMove(targetIndex, sourceIndex); dispatchNotification (createNotification (Notification.MOVE, sourceIndex, object, targetIndex, oldIsSet)); return object; } else { return doMove(targetIndex, sourceIndex); }
if (isNotificationRequired()) { boolean oldIsSet = isSet(); E object = doMove(targetIndex, sourceIndex); dispatchNotification (createNotification (Notification.MOVE, sourceIndex, object, targetIndex, oldIsSet)); return object; } else { return doMove(targetIndex, sourceIndex); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/common/notify/impl/NotifyingListImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/common/notify/impl/DelegatingNotifyingListImpl.java
Method name: E move(int, int) Method name: E move(int, int)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (isNotificationRequired())
1
if (isNotificationRequired())
2
    {
2
    {
3
      boolean oldIsSet = isSet();
3
      boolean oldIsSet = isSet();
4
      E object = doMove(targetIndex, sourceIndex);
4
      E object = doMove(targetIndex, sourceIndex);
5
      dispatchNotification
5
      dispatchNotification
6
        (createNotification
6
        (createNotification
7
           (Notification.MOVE, 
7
           (Notification.MOVE, 
8
            sourceIndex,
8
            sourceIndex,
9
            object, 
9
            object, 
10
            targetIndex,
10
            targetIndex,
11
            oldIsSet));
11
            oldIsSet));
12
      return object;
12
      return object;
13
    }
13
    }
14
    else
14
    else
15
    {
15
    {
16
      return doMove(targetIndex, sourceIndex);
16
      return doMove(targetIndex, sourceIndex);
17
    }
17
    }
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 comparisons36
  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 1
    Mapped Statements
    ID Statement ID Statement
    1
    if (isNotificationRequired())
    1
    if (isNotificationRequired())
    2
    boolean oldIsSet = isSet();
    2
    boolean oldIsSet = isSet();
    3
    E object = doMove(targetIndex, sourceIndex);
    3
    E object = doMove(targetIndex, sourceIndex);
    4
    dispatchNotification(createNotification(Notification.MOVE, sourceIndex, object, targetIndex, oldIsSet));
    4
    dispatchNotification(createNotification(Notification.MOVE, sourceIndex, object, targetIndex, oldIsSet));
    5
    return object;
    5
    return object;
    else
    else
    6
    return doMove(targetIndex, sourceIndex);
    6
    return doMove(targetIndex, sourceIndex);
    Precondition Violations (0)
    Row Violation