File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/ECrossReferenceAdapter.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/ECrossReferenceAdapter.java | |||
Method name: void handleContainment(Notification)
|
Method name: void handleCrossReference(EReference, Notification)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | Notifier newValue = (Notifier)notification.getNewValue();↵ | 1 | EObject oldValue = (EObject)notification.getOldValue();↵ | |
2 | if (newValue != null)↵ | 2 | if (oldValue != null)↵ | |
3 | {↵ | 3 | {↵ | |
4 | addAdapter(newValue);↵ | 4 | inverseCrossReferencer.remove((EObject)notification.getNotifier(), (EReference)notification.getFeature(), oldValue);↵ | |
5 | }↵ | 5 | }↵ | |
6 | break; | 6 |
| |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 9 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 272.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
14 | Notifier newValue = (Notifier)notification.getNewValue(); | | ||||||||||||||||||||||
| 26 | EObject oldValue = (EObject)notification.getOldValue(); | ||||||||||||||||||||||
15 | if (newValue != null) |
| 27 | if (oldValue != null) | ||||||||||||||||||||
16 | addAdapter(newValue); |
| 28 | inverseCrossReferencer.remove((EObject)notification.getNotifier(), (EReference)notification.getFeature(), oldValue); | ||||||||||||||||||||
17 | break; | 29 | break; |
Row | Violation |
---|---|
1 | Type org.eclipse.emf.common.notify.Notifier of variable newValue does not match with type org.eclipse.emf.ecore.EObject of variable oldValue |
2 | Expression addAdapter(newValue) is a void method call, and thus it cannot be parameterized |
3 | Expression inverseCrossReferencer.remove((EObject)notification.getNotifier(),(EReference)notification.getFeature(),oldValue) is a void method call, and thus it cannot be parameterized |
4 | Expression addAdapter(newValue) is a void method call, and thus it cannot be parameterized |
5 | Expression inverseCrossReferencer.remove((EObject)notification.getNotifier(),(EReference)notification.getFeature(),oldValue) is a void method call, and thus it cannot be parameterized |