super.unset(); if (isNotificationRequired()) { boolean oldIsSet = isSet; isSet = false; owner.eNotify(createNotification(Notification.UNSET, oldIsSet, false)); } else { isSet = false; }
super.unset(); if (isNotificationRequired()) { boolean oldIsSet = isSet; isSet = false; dispatchNotification(createNotification(Notification.UNSET, oldIsSet, false)); } else { isSet = false; }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EObjectContainmentWithInverseEList.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/DelegatingEcoreEList.java
Method name: void unset() Method name: void unset()
Number of AST nodes: 6 Number of AST nodes: 6
1
super.unset();
1
super.unset();
2
      if (isNotificationRequired())
2
      if (isNotificationRequired())
3
      {
3
      {
4
        boolean oldIsSet = isSet;
4
        boolean oldIsSet = isSet;
5
        isSet = false;
5
        isSet = false;
6
        owner.eNotify(createNotification(Notification.UNSET, oldIsSet, false));
6
        dispatchNotification(createNotification(Notification.UNSET, oldIsSet, false));
7
      }
7
      }
8
      else
8
      else
9
      {
9
      {
10
        isSet = false;
10
        isSet = false;
11
      }
11
      }
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons26
  1. {Non-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)1.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    super.unset();
    1
    super.unset();
    2
    if (isNotificationRequired())
    2
    if (isNotificationRequired())
    3
    boolean oldIsSet = isSet;
    3
    boolean oldIsSet = isSet;
    4
    isSet = false;
    4
    isSet = false;
    5
    owner.eNotify(createNotification(Notification.UNSET, oldIsSet, false));
    5
    owner.eNotify(createNotification(Notification.UNSET, oldIsSet, false));
    5
    dispatchNotification(createNotification(Notification.UNSET, oldIsSet, false));
    Differences
    Expression1Expression2Difference
    eNotifydispatchNotificationMETHOD_INVOCATION_NAME_MISMATCH
    ownerMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression owner.eNotify(createNotification(Notification.UNSET,oldIsSet,false)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression dispatchNotification(createNotification(Notification.UNSET,oldIsSet,false)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression owner.eNotify(createNotification(Notification.UNSET,oldIsSet,false)) is a void method call, and thus it cannot be parameterized
    Expression dispatchNotification(createNotification(Notification.UNSET,oldIsSet,false)) is a void method call, and thus it cannot be parameterized
    Expression owner.eNotify(createNotification(Notification.UNSET,oldIsSet,false)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression dispatchNotification(createNotification(Notification.UNSET,oldIsSet,false)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression owner.eNotify(createNotification(Notification.UNSET,oldIsSet,false)) is a void method call, and thus it cannot be parameterized
    Expression dispatchNotification(createNotification(Notification.UNSET,oldIsSet,false)) is a void method call, and thus it cannot be parameterized
    5
    dispatchNotification(createNotification(Notification.UNSET, oldIsSet, false));
    else
    else
    6
    isSet = false;
    6
    isSet = false;
    Precondition Violations (8)
    Row Violation
    1Expression owner.eNotify(createNotification(Notification.UNSET,oldIsSet,false)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression dispatchNotification(createNotification(Notification.UNSET,oldIsSet,false)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression owner.eNotify(createNotification(Notification.UNSET,oldIsSet,false)) is a void method call, and thus it cannot be parameterized
    4Expression dispatchNotification(createNotification(Notification.UNSET,oldIsSet,false)) is a void method call, and thus it cannot be parameterized
    5Expression owner.eNotify(createNotification(Notification.UNSET,oldIsSet,false)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression dispatchNotification(createNotification(Notification.UNSET,oldIsSet,false)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression owner.eNotify(createNotification(Notification.UNSET,oldIsSet,false)) is a void method call, and thus it cannot be parameterized
    8Expression dispatchNotification(createNotification(Notification.UNSET,oldIsSet,false)) is a void method call, and thus it cannot be parameterized