for (Object primaryMappedObject : getPrimaryMappedObjects((Mapping)note.getOldValue())) { ENotificationImpl newNote2 = new ENotificationImpl( (InternalEObject)primaryMappedObject, Notification.SET, null, null, null, Notification.NO_INDEX); super.notifyChanged(newNote2); }
for (Object primaryMappedObject : getPrimaryMappedObjects((Mapping)note.getNewValue())) { ENotificationImpl newNote2 = new ENotificationImpl( (InternalEObject)primaryMappedObject, Notification.SET, null, null, null, Notification.NO_INDEX); super.notifyChanged(newNote2); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/presentation/MappingEditor.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/presentation/MappingEditor.java
Method name: void notifyChanged(Notification) Method name: void notifyChanged(Notification)
Number of AST nodes: 3 Number of AST nodes: 3
1
for (Object primaryMappedObject : getPrimaryMappedObjects((Mapping)note.getOldValue()))
1
for (Object primaryMappedObject : getPrimaryMappedObjects((Mapping)note.getNewValue()))
2
                  {
2
                  {
3
                     ENotificationImpl newNote2 = new ENotificationImpl(
3
                     ENotificationImpl newNote2 = new ENotificationImpl(
4
                      (InternalEObject)primaryMappedObject, 
4
                      (InternalEObject)primaryMappedObject, 
5
                      Notification.SET, 
5
                      Notification.SET, 
6
                      null, 
6
                      null, 
7
                      null, 
7
                      null, 
8
                      null, 
8
                      null, 
9
                      Notification.NO_INDEX);
9
                      Notification.NO_INDEX);
10
                    super.notifyChanged(newNote2);
10
                    super.notifyChanged(newNote2);
11
                  }
11
                  }
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.4
Clones locationClones are in the same method
Number of node comparisons10
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    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
    13
    for (Object primaryMappedObject : getPrimaryMappedObjects((Mapping)note.getOldValue()))
    13
    for (Object primaryMappedObject : getPrimaryMappedObjects((Mapping)note.getOldValue()))
    17
    for (Object primaryMappedObject : getPrimaryMappedObjects((Mapping)note.getNewValue()))
    Differences
    Expression1Expression2Difference
    getOldValuegetNewValueMETHOD_INVOCATION_NAME_MISMATCH
    17
    for (Object primaryMappedObject : getPrimaryMappedObjects((Mapping)note.getNewValue()))
    14
    ENotificationImpl newNote2 = new ENotificationImpl((InternalEObject)primaryMappedObject, Notification.SET, null, null, null, Notification.NO_INDEX);
    18
    ENotificationImpl newNote2 = new ENotificationImpl((InternalEObject)primaryMappedObject, Notification.SET, null, null, null, Notification.NO_INDEX);
    15
    super.notifyChanged(newNote2);
    19
    super.notifyChanged(newNote2);
    Precondition Violations (0)
    Row Violation