FileOutputStream out = null;
try
{
out = new FileOutputStream(file);
out.write('\n');
out.close();
}
catch(IOException io)
{
Log.log(Log.ERROR,this,io);
}
finally
{
try
{
if(out != null)
out.close();
}
catch(IOException e)
{
}
}
FileWriter out = null;
try
{
out = new FileWriter(userCatalog);
out.write(jEdit.getProperty("defaultCatalog"));
out.close();
}
catch(IOException io)
{
Log.log(Log.ERROR,jEdit.class,io);
}
finally
{
try
{
if(out != null)
out.close();
}
catch(IOException e)
{
}
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/options/AppearanceOptionPane.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/jEdit.java
|
Method name: void _save()
|
|
Method name: void reloadModes()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | FileOutputStream out = null;↵ | | 1 | FileWriter out = null;↵
|
2 | try↵ | | 2 | try↵
|
3 | {↵ | | 3 | {↵
|
4 | out = new FileOutputStream(file);↵ | | 4 | out = new File↵
|
5 | out.write('\n'↵ | | 5 | Writer(userCatalog);↵
|
6 | );↵ | | 6 | out.write(jEdit.getProperty("defaultCatalog"));↵
|
7 | out.close();↵ | | 7 | out.close();↵
|
8 | }↵ | | 8 | }↵
|
9 | catch(IOException io)↵ | | 9 | catch(IOException io)↵
|
10 | {↵ | | 10 | {↵
|
11 | Log.log(Log.ERROR,this,io);↵ | | 11 | Log.log(Log.ERROR,jEdit.class,io);↵
|
12 | }↵ | | 12 | }↵
|
13 | finally↵ | | 13 | finally↵
|
14 | {↵ | | 14 | {↵
|
15 | try↵ | | 15 | try↵
|
16 | {↵ | | 16 | {↵
|
17 | if(out != null)↵ | | 17 | if(out != null)↵
|
18 | out.close();↵ | | 18 | out.close();↵
|
19 | }↵ | | 19 | }↵
|
20 | catch(IOException e)↵ | | 20 | catch(IOException e)↵
|
21 | {↵ | | 21 | {↵
|
22 | }↵ | | 22 | }↵
|
23 | } | | 23 | }
|
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) | 1.7 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |