PluginJAR[] jars = jEdit.getPluginJARs();
for(int i = 0; i < jars.length; i++)
{
String path = jars[i].getPath();
if(MiscUtilities.getFileName(path).equals(jar))
return path;
}
return null;
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/pluginmgr/PluginList.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/pluginmgr/Roster.java
|
Method name: String getInstalledPath()
|
|
Method name: boolean deleteRecursively(File)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 5
|
|
1 | PluginJAR[] jars = jEdit.getPluginJARs↵ | | 1 | if(file.isDirectory())↵
|
| | | 2 | {↵
|
| | | 3 | String path = file.getPath();↵
|
2 | ();↵ | | 4 | String[] children = file.list();↵
|
3 | for(int i = 0; i < jars.length; i++)↵ | | 5 | for(int i = 0; i < children.length; i++)↵
|
4 | {↵ | | 6 | {↵
|
5 | String path = jars[i].getPath();↵ | | 7 | ↵
|
|
6 | if(MiscUtilities.getFileName(path).equals(jar))↵ | | |
|
7 | return path;↵ | | 8 | ok &= deleteRecursively(new File(path,children[i]));↵
|
8 | }↵ | | 9 | }↵
|
|
9 | return null; | | 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 |