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);
}
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);
}
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: 4
|
|
Number of AST nodes: 4
|
|
1 | ENotificationImpl notification =↵ | | 1 | ENotificationImpl notification =↵
|
2 | new ENotificationImpl↵ | | 2 | new ENotificationImpl↵
|
3 | (eContainer, ↵ | | 3 | (eContainer, ↵
|
4 | Notification.SET, ↵ | | 4 | Notification.SET, ↵
|
5 | EcorePackage.ECLASS__ESUPER_TYPES, ↵ | | 5 | EcorePackage.EOPERATION__EEXCEPTIONS, ↵
|
6 | oldERawType,↵ | | 6 | oldERawType,↵
|
7 | newERawType,↵ | | 7 | newERawType,↵
|
8 | ((EClass)eContainer).getEGenericSuperTypes().indexOf(this), ↵ | | 8 | ((EOperation)eContainer).getEGenericExceptions().indexOf(this), ↵
|
9 | false);↵ | | 9 | false);↵
|
10 | ↵ | | 10 | ↵
|
11 | if (msgs == null)↵ | | 11 | if (msgs == null)↵
|
12 | {↵ | | 12 | {↵
|
13 | msgs = notification;↵ | | 13 | msgs = notification;↵
|
14 | }↵ | | 14 | }↵
|
15 | else↵ | | 15 | else↵
|
16 | {↵ | | 16 | {↵
|
17 | msgs.add(notification);↵ | | 17 | msgs.add(notification);↵
|
18 | } | | 18 | }
|
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 the same method |
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) | 1.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
| | | 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); | | | |
32 | if (msgs == null) | | 21 | if (msgs == null) |
33 | | | 22 | |
| | | | |
34 | | | 23 | |
Precondition Violations (0)
Row |
Violation |