for(int i = 0; i < actions.length; i++)
{
EditAction action = actions[i];
String label = action.getLabel();
if(label == null)
continue;
listModel.addElement(new ContextOptionPane.MenuItem(
action.getName(),label));
}
if(file.isDirectory())
{
String path = file.getPath();
String[] children = file.list();
for(int i = 0; i < children.length; i++)
{
ok &= deleteRecursively(new File(path,children[i]));
}
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/options/ContextOptionPane.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/pluginmgr/Roster.java
|
Method name: void updateList()
|
|
Method name: boolean deleteRecursively(File)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 5
|
|
1 | for(int i = 0; i < actions.length; i++)↵ | | 1 | if(file.isDirectory())↵
|
2 | {↵ | | 2 | {↵
|
3 | EditAction action = actions[i];↵ | | 3 | String path = file.getPath();↵
|
4 | String label = action.getLabel();↵ | | 4 | String↵
|
5 | if(label == null)↵ | | |
|
6 | continue;↵ | | |
|
|
7 | listModel.addElement(new ContextOptionPane.MenuItem(↵ | | |
|
8 | action.getName(),label));↵ | | |
|
| | | 5 | [] children = file.list();↵
|
| | | 6 | for(int i = 0; i < children.length; i++)↵
|
| | | 7 | {↵
|
| | | 8 | ok &= deleteRecursively(new File(path,children[i]));↵
|
| | | 9 | }↵
|
9 | } | | 10 | }
|
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.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |