try
{
chars.wait();
}
catch (InterruptedException e)
{
}
try
{
frame.setIcon(false);
} catch (PropertyVetoException ignore)
{
// Ignore.
}
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/parser/kernel/ParserThread.java
|
|
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/mainframe/action/TileInternalFramesAction.java
|
Method name: void waitChars()
|
|
Method name: void actionPerformed(ActionEvent)
|
Number of AST nodes: 2
|
|
Number of AST nodes: 2
|
|
1 | try↵ | | 1 | try↵
|
2 | {↵ | | 2 | {↵
|
3 | chars.wait();↵ | | 3 | frame.setIcon(false);↵
|
4 | }↵ | | 4 | ↵
|
5 | catch (InterruptedException e)↵ | | 5 | } catch (PropertyVetoException ignore)↵
|
6 | {↵ | | 6 | ↵
|
| | | 7 | {↵
|
| | | 8 | // Ignore.↵
|
7 | } | | 9 | }
|
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 | 5 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.1 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
3 | try | | 21 | try |
4 | | | | |
| | | 22 | |
Precondition Violations (3)
Row |
Violation |
1 | Unmatched statement chars.wait(); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
2 | Unmatched statement frame.setIcon(false); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
3 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.session.parser.kernel.ParserThread.IncrementalBuffer and net.sourceforge.squirrel_sql.client.mainframe.action.TileInternalFramesAction do not have a common superclass |