ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.ETYPED_ELEMENT__ETYPE, oldEType, eType);
if (msgs == null)
{
msgs = notification;
}
else
{
msgs.add(notification);
}
ENotificationImpl notification =
new ENotificationImpl
(this,
Notification.SET,
newContainerFeatureID,
oldContainerFeatureID == newContainerFeatureID ? oldContainer : null,
newContainer);
if (msgs == null)
{
msgs = notification;
}
else
{
msgs.add(notification);
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/ETypedElementImpl.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/BasicEObjectImpl.java
|
Method name: NotificationChain setEType(EClassifier, NotificationChain)
|
|
Method name: NotificationChain eBasicSetContainer(InternalEObject, int, NotificationChain)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | ENotificationImpl notification =↵ | | 1 | ENotificationImpl notification =↵
|
2 | new ENotificationImpl(this, Notification.SET, EcorePackage.ETYPED_ELEMENT__ETYPE, oldEType, eType↵ | | 2 | new ENotificationImpl↵
|
| | | 3 | (this,↵
|
| | | 4 | Notification.SET,↵
|
| | | 5 | newContainerFeatureID, ↵
|
| | | 6 | oldContainerFeatureID == newContainerFeatureID ? oldContainer : null,↵
|
3 | );↵ | | 7 | newContainer);↵
|
4 | if (msgs == null)↵ | | 8 | if (msgs == null)↵
|
5 | {↵ | | 9 | {↵
|
6 | msgs = notification;↵ | | 10 | msgs = notification;↵
|
7 | }↵ | | 11 | ↵
|
| | | 12 | }↵
|
8 | else↵ | | 13 | else↵
|
9 | {↵ | | 14 | ↵
|
| | | 15 | {↵
|
10 | msgs.add(notification);↵ | | 16 | msgs.add(notification);↵
|
11 | } | | 17 | }
|
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 | 11 |
-
{Refactorable}
Mapping Summary
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) | 0.8 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
4 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.ETYPED_ELEMENT__ETYPE, oldEType, eType); | | | |
| | | 27 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, newContainerFeatureID, oldContainerFeatureID == newContainerFeatureID ? oldContainer : null, newContainer); |
5 | if (msgs == null) | | 28 | if (msgs == null) |
6 | | | 29 | |
| | | | |
7 | | | 30 | |
Precondition Violations (0)
Row |
Violation |