case Notification.SET: { Notifier newValue = (Notifier)notification.getNewValue(); if (newValue != null) { addAdapter(newValue); } break;
case Notification.ADD: { Notifier newValue = (Notifier)notification.getNewValue(); if (newValue != null) { addAdapter(newValue); } break;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/ECrossReferenceAdapter.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/ECrossReferenceAdapter.java
Method name: void handleContainment(Notification) Method name: void handleContainment(Notification)
Number of AST nodes: 5 Number of AST nodes: 5
1
case Notification.SET:
1
case Notification.ADD:
2
      {
2
      {
3
        Notifier newValue = (Notifier)notification.getNewValue();
3
        Notifier newValue = (Notifier)notification.getNewValue();
4
        if (newValue != null)
4
        if (newValue != null)
5
        {
5
        {
6
          addAdapter(newValue);
6
          addAdapter(newValue);
7
        }
7
        }
8
        break;
8
        break;
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 the same method
Number of node comparisons14
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements5
    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.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    13
    case Notification.SET:
    13
    case Notification.SET:
    18
    case Notification.ADD:
    Differences
    Expression1Expression2Difference
    SETADDVARIABLE_NAME_MISMATCH
    18
    case Notification.ADD:
    14
    Notifier newValue = (Notifier)notification.getNewValue();
    19
    Notifier newValue = (Notifier)notification.getNewValue();
    15
    if (newValue != null)
    20
    if (newValue != null)
    16
    addAdapter(newValue);
    21
    addAdapter(newValue);
    17
    break;
    22
    break;
    Precondition Violations (0)
    Row Violation