Object notificationNotifier = notification.getNotifier();
if (notificationNotifier == getNotifier() && getFeatureID(null) == notification.getFeatureID(null))
{
newValue = notification.getNewValue();
if (notification.getEventType() == Notification.SET)
{
eventType = Notification.SET;
}
return true;
}
Object notificationNotifier = notification.getNotifier();
if (notificationNotifier == getNotifier() && getFeatureID(null) == notification.getFeatureID(null))
{
newValue = notification.getNewValue();
if (notification.getEventType() == Notification.SET)
{
eventType = Notification.SET;
}
return true;
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/common/notify/impl/NotificationImpl.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/FeatureMapUtil.java
|
Method name: boolean merge(Notification)
|
|
Method name: boolean merge(Notification)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | Object notificationNotifier = notification.getNotifier();↵ | | 1 | Object notificationNotifier = notification.getNotifier();↵
|
2 | if (notificationNotifier == getNotifier() && getFeatureID(null) == notification.getFeatureID(null))↵ | | 2 | if (notificationNotifier == getNotifier() && getFeatureID(null) == notification.getFeatureID(null))↵
|
3 | {↵ | | 3 | {↵
|
4 | newValue = notification.getNewValue();↵ | | 4 | newValue = notification.getNewValue();↵
|
5 | if (notification.getEventType() == Notification.SET)↵ | | 5 | if (notification.getEventType() == Notification.SET)↵
|
6 | {↵ | | 6 | {↵
|
7 | eventType = Notification.SET;↵ | | 7 | eventType = Notification.SET;↵
|
8 | }↵ | | 8 | ↵
|
9 | ↵ | | 9 | }↵
|
10 | return true;↵ | | 10 | return true;↵
|
11 | } | | 11 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 15 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 6 |
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) | 0.9 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
8 | Object notificationNotifier = notification.getNotifier(); | | 4 | Object notificationNotifier = notification.getNotifier(); |
9 | if (notificationNotifier == getNotifier() && getFeatureID(null) == notification.getFeatureID(null)) | | 5 | if (notificationNotifier == getNotifier() && getFeatureID(null) == notification.getFeatureID(null)) |
10 | newValue = notification.getNewValue(); | | 6 | newValue = notification.getNewValue(); |
11 | if (notification.getEventType() == Notification.SET) | | 7 | if (notification.getEventType() == Notification.SET) |
12 | eventType = Notification.SET; | | 8 | eventType = Notification.SET; |
13 | | | 9 | |
Precondition Violations (2)
Row |
Violation |
1 | Conditional return true; |
2 | Conditional return true; |