Object[] result = getResult();
for (int i = 0; i < result.length; i++)
{
if (result[i] instanceof IContainer)
{
containers.add((IContainer)result[i]);
}
}
Object[] result = getResult();
for (int i = 0; i < result.length; i++)
{
if (result[i] instanceof IFile)
{
files.add((IFile)result[i]);
}
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/common/ui/dialogs/WorkspaceResourceDialog.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/common/ui/dialogs/WorkspaceResourceDialog.java
|
Method name: IContainer[] getSelectedContainers()
|
|
Method name: IFile[] getSelectedFiles()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | Object[] result = getResult();↵ | | 1 | Object[] result = getResult();↵
|
2 | for (int i = 0; i < result.length; i++)↵ | | 2 | for (int i = 0; i < result.length; i++)↵
|
3 | {↵ | | 3 | {↵
|
4 | if (result[i] instanceof IContainer)↵ | | 4 | if (result[i] instanceof IFile)↵
|
5 | {↵ | | 5 | {↵
|
6 | containers.add((IContainer)result[i]);↵ | | 6 | files.add((IFile)result[i]);↵
|
7 | }↵ | | 7 | }↵
|
8 | } | | 8 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 1 |