if (_wrapee != null)
{
_wrapee.printStackTrace();
}
else
{
super.printStackTrace();
}
if (_wrapee != null)
{
_wrapee.printStackTrace();
}
else
{
super.printStackTrace();
}
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/util/BaseRuntimeException.java
|
|
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/util/BaseException.java
|
Method name: void printStackTrace()
|
|
Method name: void printStackTrace()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (_wrapee != null)↵ | | 1 | if (_wrapee != null)↵
|
2 | {↵ | | 2 | {↵
|
3 | _wrapee.printStackTrace();↵ | | 3 | _wrapee.printStackTrace();↵
|
4 | }↵ | | 4 | }↵
|
5 | else↵ | | 5 | else↵
|
6 | {↵ | | 6 | {↵
|
7 | super.printStackTrace();↵ | | 7 | super.printStackTrace();↵
|
8 | } | | 8 | }
|
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.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 9 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 1.2 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (_wrapee != null) | | 1 | if (_wrapee != null) |
2 | _wrapee.printStackTrace(); | | 2 | _wrapee.printStackTrace(); |
| | | | |
3 | | | 3 | |
Precondition Violations (3)
Row |
Violation |
1 | Super method call super.printStackTrace(); cannot be extracted from method |
2 | Super method call super.printStackTrace(); cannot be extracted from method |
3 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.fw.util.BaseRuntimeException and net.sourceforge.squirrel_sql.fw.util.BaseException do not have a common superclass |