ENotificationImpl notification = new ENotificationImpl (eContainer, Notification.SET, EcorePackage.ECLASS__ESUPER_TYPES, oldERawType, newERawType, ((EClass)eContainer).getEGenericSuperTypes().indexOf(this), false); if (msgs == null) { msgs = notification; } else { msgs.add(notification); }
ENotificationImpl notification = new ENotificationImpl (eContainer, Notification.SET, EcorePackage.EOPERATION__EEXCEPTIONS, oldERawType, newERawType, ((EOperation)eContainer).getEGenericExceptions().indexOf(this), false); 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/EGenericTypeImpl.java
Method name: NotificationChain setERawType(EClassifier, NotificationChain) Method name: NotificationChain setERawType(EClassifier, NotificationChain)
Number of AST nodes: 4 Number of AST nodes: 4
1
ENotificationImpl notification =
1
ENotificationImpl notification =
2
              new ENotificationImpl
2
              new ENotificationImpl
3
                (eContainer, 
3
                (eContainer, 
4
                 Notification.SET, 
4
                 Notification.SET, 
5
                 EcorePackage.ECLASS__ESUPER_TYPES, 
5
                 EcorePackage.EOPERATION__EEXCEPTIONS, 
6
                 oldERawType,
6
                 oldERawType,
7
                 newERawType,
7
                 newERawType,
8
                 ((EClass)eContainer).getEGenericSuperTypes().indexOf(this), 
8
                 ((EOperation)eContainer).getEGenericExceptions().indexOf(this), 
9
                 false);
9
                 false);
10
            
10
            
11
            if (msgs == null)
11
            if (msgs == null)
12
            {
12
            {
13
              msgs = notification;
13
              msgs = notification;
14
            }
14
            }
15
            else
15
            else
16
            {
16
            {
17
              msgs.add(notification);
17
              msgs.add(notification);
18
            }
18
            }
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 comparisons11
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)1.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    20
    ENotificationImpl notification = new ENotificationImpl(eContainer, Notification.SET, EcorePackage.EOPERATION__EEXCEPTIONS, oldERawType, newERawType, ((EOperation)eContainer).getEGenericExceptions().indexOf(this), false);
    31
    ENotificationImpl notification = new ENotificationImpl(eContainer, Notification.SET, EcorePackage.ECLASS__ESUPER_TYPES, oldERawType, newERawType, ((EClass)eContainer).getEGenericSuperTypes().indexOf(this), false);
                                                                                                                                                                                                                                                                                                                                                                                                                                      
    32
    if (msgs == null)
    21
    if (msgs == null)
    33
    msgs = notification;
    22
    msgs = notification;
    else
    else
    34
    msgs.add(notification);
    23
    msgs.add(notification);
    Precondition Violations (0)
    Row Violation