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 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are in the same method |
Number of node comparisons | 10 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
13 | for (Object primaryMappedObject : getPrimaryMappedObjects((Mapping)note.getOldValue())) | | 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 |