updateChildren(notification);
switch (notification.getFeatureID(EFactory.class))
{
case EcorePackage.EFACTORY__EPACKAGE:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
updateChildren(notification);
switch (notification.getFeatureID(ENamedElement.class))
{
case EcorePackage.ENAMED_ELEMENT__NAME:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/EFactoryItemProvider.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/ENamedElementItemProvider.java
|
Method name: void notifyChanged(Notification)
|
|
Method name: void notifyChanged(Notification)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | updateChildren(notification);↵ | | 1 | updateChildren(notification);↵
|
|
2 | switch (notification.getFeatureID(EFactory.class))↵ | | 2 | switch (notification.getFeatureID(ENamedElement.class))↵
|
3 | {↵ | | 3 | {↵
|
4 | case EcorePackage.EFACTORY__EPACKAGE:↵ | | 4 | case EcorePackage.ENAMED_ELEMENT__NAME:↵
|
5 | fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));↵ | | 5 | fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));↵
|
6 | return;↵ | | 6 | return;↵
|
7 | }↵ | | 7 | }↵
|
8 | super.notifyChanged(notification); | | 8 | super.notifyChanged(notification);
|
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 14 |
-
{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.8 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | updateChildren(notification); | | 1 | updateChildren(notification); |
2 | switch (notification.getFeatureID(EFactory.class)) | | 2 | switch (notification.getFeatureID(ENamedElement.class)) |
3 | case EcorePackage.EFACTORY__EPACKAGE: | | 3 | case EcorePackage.ENAMED_ELEMENT__NAME: |
4 | fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); | | 4 | fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); |
5 | | | 5 | |
6 | super.notifyChanged(notification); | | 6 | super.notifyChanged(notification); |
Precondition Violations (0)
Row |
Violation |