File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EObjectImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/impl/EObjectToChangesMapEntryImpl.java | |||
Method name: void eSetClass(EClass)
|
Method name: void setTypedKey(EObject)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | super.eSetClass(eClass);↵ | 1 | setTypedKeyGen(newKey);↵ | |
2 | if (eClass != null)↵ | 2 | if (key != null)↵ | |
3 | {↵ | 3 | {↵ | |
4 | eFlags |= EDYNAMIC_CLASS;↵ | 4 | eFlags |= EPROXY_KEY;↵ | |
5 | }↵ | 5 | }↵ | |
6 | else↵ | 6 | else↵ | |
7 | {↵ | 7 | {↵ | |
8 | eFlags &= ~EDYNAMIC_CLASS;↵ | 8 | eFlags &= ~EPROXY_KEY;↵ | |
9 | } | 9 |
| |
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 10 |
Number of mapped statements | 4 |
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.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | super.eSetClass(eClass); |
| 1 | setTypedKeyGen(newKey); | |||||||||||||||
2 | if (eClass != null) |
| 2 | if (key != null) | |||||||||||||||
3 | eFlags |= EDYNAMIC_CLASS; |
| 3 | eFlags |= EPROXY_KEY; | |||||||||||||||
else | else | ||||||||||||||||||
4 | eFlags &= ~EDYNAMIC_CLASS; |
| 4 | eFlags &= ~EPROXY_KEY; |
Row | Violation |
---|---|
1 | Expression super.eSetClass(eClass) is a void method call, and thus it cannot be parameterized |
2 | Expression setTypedKeyGen(newKey) is a void method call, and thus it cannot be parameterized |
3 | Expression key cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Type org.eclipse.emf.ecore.EClass of variable eClass does not match with type org.eclipse.emf.ecore.EObject of variable key |