case Notification.ADD:
{
Notifier newValue = (Notifier)notification.getNewValue();
if (newValue != null)
{
addAdapter(newValue);
}
break;
case Notification.SET:
{
Notifier newValue = (Notifier)notification.getNewValue();
if (newValue != null)
{
addAdapter(newValue);
}
break;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EContentAdapter.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/ECrossReferenceAdapter.java
|
Method name: void handleContainment(Notification)
|
|
Method name: void handleContainment(Notification)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | case Notification.ADD:↵ | | 1 | case Notification.SET:↵
|
2 | {↵ | | 2 | {↵
|
3 | Notifier newValue = (Notifier)notification.getNewValue();↵ | | 3 | Notifier newValue = (Notifier)notification.getNewValue();↵
|
4 | if (newValue != null)↵ | | 4 | if (newValue != null)↵
|
5 | {↵ | | 5 | {↵
|
6 | addAdapter(newValue);↵ | | 6 | addAdapter(newValue);↵
|
7 | }↵ | | 7 | }↵
|
8 | break; | | 8 | break;
|
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 14 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
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.8 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
26 | case Notification.ADD: | | 13 | case Notification.SET: |
27 | Notifier newValue = (Notifier)notification.getNewValue(); | | 14 | Notifier newValue = (Notifier)notification.getNewValue(); |
28 | if (newValue != null) | | 15 | if (newValue != null) |
29 | | | 16 | |
30 | break; | | 17 | break; |
Precondition Violations (0)
Row |
Violation |