ENotificationImpl notification = new ENotificationImpl (owner, Notification.REMOVE, EcorePackage.ECLASS__ESUPER_TYPES, unwrap(eGenericType), null, indexOf(eGenericType), false); if (notifications == null) { notifications = notification; } else { notifications.add(notification); } return notifications;
ENotificationImpl notification = new ENotificationImpl (owner, Notification.ADD, EcorePackage.EOPERATION__EEXCEPTIONS, null, unwrap(eGenericType), indexOf(eGenericType), false); if (notifications == null) { notifications = notification; } else { notifications.add(notification); } return notifications;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EClassImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EOperationImpl.java
Method name: NotificationChain shadowRemove(EGenericType, NotificationChain) Method name: NotificationChain shadowAdd(EGenericType, NotificationChain)
Number of AST nodes: 5 Number of AST nodes: 5
1
ENotificationImpl notification =
1
ENotificationImpl notification =
2
              new ENotificationImpl
2
              new ENotificationImpl
3
                (owner, Notification.REMOVE, EcorePackage.ECLASS__ESUPER_TYPES, unwrap(eGenericType), null, indexOf(eGenericType), false);
3
                (owner, Notification.ADD, EcorePackage.EOPERATION__EEXCEPTIONS, null, unwrap(eGenericType), indexOf(eGenericType), false);
4
            if (notifications == null)
4
            if (notifications == null)
5
            {
5
            {
6
              notifications = notification;
6
              notifications = notification;
7
            }
7
            }
8
            else
8
            else
9
            {
9
            {
10
              notifications.add(notification);
10
              notifications.add(notification);
11
            }
11
            }
12
            return notifications;
12
            return notifications;
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 comparisons11
  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.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    ENotificationImpl notification = new ENotificationImpl(owner, Notification.REMOVE, EcorePackage.ECLASS__ESUPER_TYPES, unwrap(eGenericType), null, indexOf(eGenericType), false);
    1
    ENotificationImpl notification = new ENotificationImpl(owner, Notification.REMOVE, EcorePackage.ECLASS__ESUPER_TYPES, unwrap(eGenericType), null, indexOf(eGenericType), false);
    1
    ENotificationImpl notification = new ENotificationImpl(owner, Notification.ADD, EcorePackage.EOPERATION__EEXCEPTIONS, null, unwrap(eGenericType), indexOf(eGenericType), false);
    Differences
    Expression1Expression2Difference
    REMOVEADDVARIABLE_NAME_MISMATCH
    ECLASS__ESUPER_TYPESEOPERATION__EEXCEPTIONSVARIABLE_NAME_MISMATCH
    unwrap(eGenericType)nullTYPE_COMPATIBLE_REPLACEMENT
    nullunwrap(eGenericType)TYPE_COMPATIBLE_REPLACEMENT
    1
    ENotificationImpl notification = new ENotificationImpl(owner, Notification.ADD, EcorePackage.EOPERATION__EEXCEPTIONS, null, unwrap(eGenericType), indexOf(eGenericType), false);
    2
    if (notifications == null)
    2
    if (notifications == null)
    3
    notifications = notification;
    3
    notifications = notification;
    else
    else
    4
    notifications.add(notification);
    4
    notifications.add(notification);
    5
    return notifications;
    5
    return notifications;
    Precondition Violations (0)
    Row Violation