super.eSetProxyURI(uri);
if (uri != null)
{
eFlags |= EPROXY;
}
else
{
eFlags &= ~EPROXY;
}
setTypedKeyGen(newKey);
if (key != null)
{
eFlags |= EPROXY_KEY;
}
else
{
eFlags &= ~EPROXY_KEY;
}
Clone fragments detected by clone detection tool
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 eSetProxyURI(URI)
|
|
Method name: void setTypedKey(EObject)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | super.eSetProxyURI(uri);↵ | | 1 | setTypedKeyGen(newKey);↵
|
2 | if (uri != null)↵ | | 2 | if (key != null)↵
|
3 | {↵ | | 3 | {↵
|
4 | eFlags |= EPROXY;↵ | | 4 | eFlags |= EPROXY_KEY;↵
|
5 | }↵ | | 5 | }↵
|
6 | else↵ | | 6 | else↵
|
7 | {↵ | | 7 | {↵
|
8 | eFlags &= ~EPROXY;↵ | | 8 | eFlags &= ~EPROXY_KEY;↵
|
9 | } | | 9 | }
|
See real code fragment |
|
See real code fragment |
Summary
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 |
-
{Non-refactorable}
Mapping Summary
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 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | super.eSetProxyURI(uri); | | 1 | setTypedKeyGen(newKey); |
2 | if (uri != null) | | 2 | if (key != null) |
3 | | | 3 | |
| | | | |
4 | | | 4 | |
Precondition Violations (4)
Row |
Violation |
1 | Expression super.eSetProxyURI(uri) 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.common.util.URI of variable uri does not match with type org.eclipse.emf.ecore.EObject of variable key |