if (crossReference != null)
{
EObject otherRoot = EcoreUtil.getRootContainer(crossReference);
if (!allRoots.contains(otherRoot))
{
roots.add(otherRoot);
}
}
if (crossReference != null)
{
EObject otherRoot = EcoreUtil.getRootContainer(crossReference);
if (!allRoots.contains(otherRoot))
{
roots.add(otherRoot);
}
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ReflectiveItemProvider.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ReflectiveItemProvider.java
|
Method name: void gatherMetaData(EModelElement)
|
|
Method name: void gatherMetaData(EModelElement)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (crossReference != null)↵ | | 1 | if (crossReference != null)↵
|
2 | {↵ | | 2 | ↵
|
3 | ↵ | | 3 | {↵
|
4 | EObject otherRoot = EcoreUtil.getRootContainer(crossReference);↵ | | 4 | EObject otherRoot = EcoreUtil.getRootContainer(crossReference);↵
|
5 | if (!allRoots.contains(otherRoot))↵ | | 5 | if (!allRoots.contains(otherRoot))↵
|
6 | {↵ | | 6 | {↵
|
7 | roots.add(otherRoot);↵ | | 7 | roots.add(otherRoot);↵
|
8 | }↵ | | 8 | ↵
|
9 | ↵ | | 9 | }↵
|
10 | } | | 10 | }
|
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 | 19 |
-
{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) | 1.5 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
28 | if (crossReference != null) | | 33 | if (crossReference != null) |
29 | EObject otherRoot = EcoreUtil.getRootContainer(crossReference); | | 34 | EObject otherRoot = EcoreUtil.getRootContainer(crossReference); |
30 | if (!allRoots.contains(otherRoot)) | | 35 | if (!allRoots.contains(otherRoot)) |
31 | | | 36 | |
Precondition Violations (0)
Row |
Violation |