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/ETypedElementImpl.java | |||
Method name: NotificationChain setEClassifier(EClassifier, NotificationChain)
|
Method name: NotificationChain setEType(EClassifier, NotificationChain)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | EClassifier oldEClassifier = eClassifier;↵ | 1 | EClassifier oldE↵ | |
2 | eClassifier = newEClassifier↵ | 2 | Type = eType;↵ | |
3 | ;↵ | 3 | eType = newEType;↵ | |
4 | if (eNotificationRequired())↵ | 4 | if (eNotificationRequired())↵ | |
5 | {↵ | 5 | {↵ | |
6 | ENotificationImpl notification = ↵ | 6 | ENotificationImpl notification = ↵ | |
7 | new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__ECLASSIFIER, oldEClassifier, eClassifier);↵ | 7 | new ENotificationImpl(this, Notification.SET, EcorePackage.ETYPED_ELEMENT__ETYPE, oldEType, eType);↵ | |
8 | if (msgs == null)↵ | 8 | if (msgs == null)↵ | |
9 | {↵ | 9 | {↵ | |
10 | msgs = notification;↵ | 10 | msgs = notification;↵ | |
11 | }↵ | 11 | }↵ | |
12 | else↵ | 12 | else↵ | |
13 | {↵ | 13 | {↵ | |
14 | msgs.add(notification);↵ | 14 | msgs.add(notification);↵ | |
15 | }↵ | 15 | }↵ | |
16 | }↵ | 16 | }↵ | |
17 | return msgs; | 17 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 18 |
Number of mapped statements | 8 |
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) | 1.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | EClassifier oldEClassifier = eClassifier; |
| 1 | EClassifier oldEType = eType; | ||||||||||||||||||
2 | eClassifier = newEClassifier; |
| 2 | eType = newEType; | ||||||||||||||||||
3 | if (eNotificationRequired()) | 3 | if (eNotificationRequired()) | |||||||||||||||||||
4 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__ECLASSIFIER, oldEClassifier, eClassifier); |
| 4 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.ETYPED_ELEMENT__ETYPE, oldEType, eType); | ||||||||||||||||||
5 | if (msgs == null) | 5 | if (msgs == null) | |||||||||||||||||||
6 | msgs = notification; | 6 | msgs = notification; | |||||||||||||||||||
else | else | |||||||||||||||||||||
7 | msgs.add(notification); | 7 | msgs.add(notification); | |||||||||||||||||||
8 | return msgs; | 8 | return msgs; |
Row | Violation |
---|---|
1 | Expression eClassifier is a field being modified, and thus it cannot be parameterized |
2 | Expression eType is a field being modified, and thus it cannot be parameterized |
3 | Expression eClassifier cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression eType cannot be parameterized, because it has dependencies to/from statements that will be extracted |