Object[] selected = clips.getSelectedValues();
StringBuffer clip = new StringBuffer();
for(int i = 0; i < selected.length; i++)
{
if(i != 0)
clip.append('\n');
clip.append(selected[i]);
}
return clip.toString();
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;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/PasteFromListDialog.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/pluginmgr/PluginList.java
|
Method name: String getSelectedClipText()
|
|
Method name: String getInstalledPath()
|
Number of AST nodes: 7
|
|
Number of AST nodes: 6
|
|
1 | Object[] selected = clips.getSelectedValues();↵ | | |
|
2 | StringBuffer clip = new StringBuffer();↵ | | 1 | PluginJAR[] jars = jEdit.getPluginJARs();↵
|
3 | for(int i = 0; i < selected.length; i++)↵ | | 2 | for(int i = 0; i < jars.length; i++)↵
|
4 | {↵ | | 3 | {↵
|
5 | if(i != 0)↵ | | 4 | ↵
|
6 | clip.append('\n');↵ | | 5 | String path = jars[i].getPath();↵
|
|
7 | clip.append(selected[i]);↵ | | 6 | if(MiscUtilities.getFileName(path).equals(jar))↵
|
8 | }↵ | | 7 | ↵
|
9 | return clip.toString()↵ | | 8 | return path;↵
|
| | | 9 | }↵
|
|
10 | ; | | 10 | return null;
|
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 in different classes |
Number of node comparisons | 1 |