if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EFACTORY__EPACKAGE, oldEPackage, newEPackage); if (msgs == null) msgs = notification; else msgs.add(notification); }
if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__EUPPER_BOUND, oldEUpperBound, newEUpperBound); 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/EFactoryImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EGenericTypeImpl.java
Method name: NotificationChain basicSetEPackage(EPackage, NotificationChain) Method name: NotificationChain basicSetEUpperBound(EGenericType, 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.EFACTORY__EPACKAGE, oldEPackage, newEPackage);
3
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__EUPPER_BOUND, oldEUpperBound, newEUpperBound);
4
      if (msgs == null) msgs = notification; else msgs.add(notification);
4
      if (msgs == null) msgs = notification; else msgs.add(notification);
5
    }
5
    }
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons13
  1. {Non-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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    if (eNotificationRequired())
    3
    if (eNotificationRequired())
    4
    ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EFACTORY__EPACKAGE, oldEPackage, newEPackage);
    4
    ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EFACTORY__EPACKAGE, oldEPackage, newEPackage);
    4
    ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__EUPPER_BOUND, oldEUpperBound, newEUpperBound);
    Differences
    Expression1Expression2Difference
    EFACTORY__EPACKAGEEGENERIC_TYPE__EUPPER_BOUNDVARIABLE_NAME_MISMATCH
    oldEPackageoldEUpperBoundVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EPackageorg.eclipse.emf.ecore.EGenericTypeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EPackage of variable oldEPackage does not match with type org.eclipse.emf.ecore.EGenericType of variable oldEUpperBound
    • Make classes org.eclipse.emf.ecore.EPackage and org.eclipse.emf.ecore.EGenericType extend a common superclass
    4
    ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__EUPPER_BOUND, oldEUpperBound, newEUpperBound);
    5
    if (msgs == null)
    5
    if (msgs == null)
    6
    msgs = notification;
    6
    msgs = notification;
    else
    else
    7
    msgs.add(notification);
    7
    msgs.add(notification);
    Precondition Violations (1)
    Row Violation
    1Type org.eclipse.emf.ecore.EPackage of variable oldEPackage does not match with type org.eclipse.emf.ecore.EGenericType of variable oldEUpperBound