if (eContainer.eNotificationRequired())
{
ENotificationImpl notification =
new ENotificationImpl
(eContainer,
Notification.SET,
EcorePackage.EOPERATION__EEXCEPTIONS,
oldERawType,
newERawType,
((EOperation)eContainer).getEGenericExceptions().indexOf(this),
false);
if (msgs == null)
{
msgs = notification;
}
else
{
msgs.add(notification);
}
}
if (eContainer.eNotificationRequired())
{
ENotificationImpl notification =
new ENotificationImpl
(eContainer,
Notification.SET,
EcorePackage.ECLASS__ESUPER_TYPES,
oldERawType,
newERawType,
((EClass)eContainer).getEGenericSuperTypes().indexOf(this),
false);
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/EGenericTypeImpl.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EGenericTypeImpl.java
|
Method name: NotificationChain setERawType(EClassifier, NotificationChain)
|
|
Method name: NotificationChain setERawType(EClassifier, NotificationChain)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (eContainer.eNotificationRequired())↵ | | 1 | if (eContainer.eNotificationRequired())↵
|
2 | {↵ | | 2 | {↵
|
3 | ENotificationImpl notification =↵ | | 3 | ENotificationImpl notification =↵
|
4 | new ENotificationImpl↵ | | 4 | new ENotificationImpl↵
|
5 | (eContainer, ↵ | | 5 | (eContainer, ↵
|
6 | Notification.SET, ↵ | | 6 | Notification.SET, ↵
|
7 | EcorePackage.EOPERATION__EEXCEPTIONS, ↵ | | 7 | EcorePackage.ECLASS__ESUPER_TYPES, ↵
|
8 | oldERawType,↵ | | 8 | oldERawType,↵
|
9 | newERawType,↵ | | 9 | newERawType,↵
|
10 | ((EOperation)eContainer).getEGenericExceptions().indexOf(this), ↵ | | 10 | ((EClass)eContainer).getEGenericSuperTypes().indexOf(this), ↵
|
11 | false);↵ | | 11 | false);↵
|
12 | ↵ | | 12 | ↵
|
13 | if (msgs == null)↵ | | 13 | if (msgs == null)↵
|
14 | {↵ | | 14 | {↵
|
15 | msgs = notification;↵ | | 15 | msgs = notification;↵
|
16 | }↵ | | 16 | }↵
|
17 | else↵ | | 17 | else↵
|
18 | {↵ | | 18 | {↵
|
19 | msgs.add(notification);↵ | | 19 | msgs.add(notification);↵
|
20 | }↵ | | 20 | }↵
|
21 | } | | 21 | }
|
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 14 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 1.2 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
19 | if (eContainer.eNotificationRequired()) | | 30 | if (eContainer.eNotificationRequired()) |
20 | ENotificationImpl notification = new ENotificationImpl(eContainer, Notification.SET, EcorePackage.EOPERATION__EEXCEPTIONS, oldERawType, newERawType, ((EOperation)eContainer).getEGenericExceptions().indexOf(this), false); | | | |
| | | 31 | ENotificationImpl notification = new ENotificationImpl(eContainer, Notification.SET, EcorePackage.ECLASS__ESUPER_TYPES, oldERawType, newERawType, ((EClass)eContainer).getEGenericSuperTypes().indexOf(this), false); |
21 | | | 32 | |
22 | | | 33 | |
| | | | |
23 | | | 34 | |
Precondition Violations (0)
Row |
Violation |