try
{
waitSocket.getOutputStream().write('\0');
waitSocket.getOutputStream().flush();
waitSocket.getInputStream().close();
waitSocket.getOutputStream().close();
waitSocket.close();
}
catch(IOException io)
{
//Log.log(Log.ERROR,this,io);
}
try
{
waitSocket.getOutputStream().write('\0');
waitSocket.getOutputStream().flush();
waitSocket.getInputStream().close();
waitSocket.getOutputStream().close();
waitSocket.close();
}
catch(IOException io)
{
//Log.log(Log.ERROR,this,io);
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/View.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/Buffer.java
|
Method name: void close()
|
|
Method name: void close()
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | try↵ | | 1 | try↵
|
2 | {↵ | | 2 | {↵
|
3 | waitSocket.getOutputStream().write('\0');↵ | | 3 | waitSocket.getOutputStream().write('\0');↵
|
4 | waitSocket.getOutputStream().flush();↵ | | 4 | waitSocket.getOutputStream().flush();↵
|
5 | waitSocket.getInputStream().close();↵ | | 5 | waitSocket.getInputStream().close();↵
|
6 | waitSocket.getOutputStream().close();↵ | | 6 | waitSocket.getOutputStream().close();↵
|
7 | waitSocket.close();↵ | | 7 | waitSocket.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,this,io);↵
|
12 | } | | 12 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 37 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 12.1 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
17 | try | | 5 | try |
18 | waitSocket.getOutputStream().write('\0'); | | 6 | waitSocket.getOutputStream().write('\0'); |
19 | waitSocket.getOutputStream().flush(); | | 7 | waitSocket.getOutputStream().flush(); |
20 | waitSocket.getInputStream().close(); | | 8 | waitSocket.getInputStream().close(); |
21 | waitSocket.getOutputStream().close(); | | 9 | waitSocket.getOutputStream().close(); |
22 | | | 10 | |
Precondition Violations (1)
Row |
Violation |
1 | The refactoring of the clones is infeasible, because classes org.gjt.sp.jedit.View and org.gjt.sp.jedit.Buffer do not have a common superclass |