File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/FeatureMapUtil.java | File path: /emf-2.4.1/src/org/eclipse/emf/common/notify/impl/NotificationImpl.java | |||
Method name: boolean merge(Notification)
|
Method name: boolean merge(Notification)
|
|||
Number of AST nodes: 7 | 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 | return true;↵ | 10 | return true;↵ | |
10 | }↵ | 11 | ↵ | |
11 | break; | 12 |
| |
See real code fragment | See real code fragment |
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.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 16 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||
---|---|---|---|---|---|---|---|---|---|---|
4 | Object notificationNotifier = notification.getNotifier(); | 8 | Object notificationNotifier = notification.getNotifier(); | |||||||
5 | if (notificationNotifier == getNotifier() && getFeatureID(null) == notification.getFeatureID(null)) | 9 | if (notificationNotifier == getNotifier() && getFeatureID(null) == notification.getFeatureID(null)) | |||||||
6 | newValue = notification.getNewValue(); | 10 | newValue = notification.getNewValue(); | |||||||
7 | if (notification.getEventType() == Notification.SET) | 11 | if (notification.getEventType() == Notification.SET) | |||||||
8 | eventType = Notification.SET; | 12 | eventType = Notification.SET; | |||||||
9 | return true; |
| 13 | return true; | ||||||
10 | break; |
| |
Row | Violation |
---|---|
1 | Unmatched break; |
2 | Conditional return true; |
3 | Conditional return true; |