if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__ERAW_TYPE, oldERawType, eRawType); if (msgs == null) { msgs = notification; } else { msgs.add(notification); } }
if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.ETYPED_ELEMENT__ETYPE, oldEType, eType); if (msgs == null) { msgs = notification; } else { msgs.add(notification); } }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EGenericTypeImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/ETypedElementImpl.java
Method name: NotificationChain setERawType(EClassifier, NotificationChain) Method name: NotificationChain setEType(EClassifier, NotificationChain)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (eNotificationRequired())
1
if (eNotificationRequired())
2
    {
2
    {
3
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__ERAW_TYPE, oldERawType, eRawType);
3
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.ETYPED_ELEMENT__ETYPE, oldEType, eType);
4
      if (msgs == null)
4
      if (msgs == null)
5
      {
5
      {
6
        msgs = notification;
6
        msgs = notification;
7
      }
7
      }
8
      else
8
      else
9
      {
9
      {
10
        msgs.add(notification);
10
        msgs.add(notification);
11
      }
11
      }
12
    }
12
    }
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 different classes having the same super class
Number of node comparisons13
  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)1.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    5
    if (eNotificationRequired())
    3
    if (eNotificationRequired())
    6
    ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__ERAW_TYPE, oldERawType, eRawType);
    6
    ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__ERAW_TYPE, oldERawType, eRawType);
    4
    ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.ETYPED_ELEMENT__ETYPE, oldEType, eType);
    Differences
    Expression1Expression2Difference
    EGENERIC_TYPE__ERAW_TYPEETYPED_ELEMENT__ETYPEVARIABLE_NAME_MISMATCH
    oldERawTypeoldETypeVARIABLE_NAME_MISMATCH
    eRawTypeeTypeVARIABLE_NAME_MISMATCH
    4
    ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.ETYPED_ELEMENT__ETYPE, oldEType, eType);
    7
    if (msgs == null)
    5
    if (msgs == null)
    8
    msgs = notification;
    6
    msgs = notification;
    else
    else
    9
    msgs.add(notification);
    7
    msgs.add(notification);
    Precondition Violations (0)
    Row Violation