synchronized (chars)
{
try
{
chars.wait();
}
catch (InterruptedException e)
{
}
}
try
{
child.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/fw/src/net/sourceforge/squirrel_sql/fw/gui/CascadeInternalFramePositioner.java
|
Method name: void waitChars()
|
|
Method name: void positionInternalFrame(JInternalFrame)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 2
|
|
1 | synchronized (chars)↵ | | |
|
2 | {↵ | | |
|
3 | try↵ | | 1 | try↵
|
4 | {↵ | | 2 | {↵
|
5 | chars.wait();↵ | | 3 | child.setIcon(false);↵
|
6 | }↵ | | 4 | }↵
|
7 | catch (InterruptedException e)↵ | | 5 | catch (PropertyVetoException ignore)↵
|
8 | {↵ | | 6 | {↵
|
9 | }↵ | | 7 | // Ignore.↵
|
10 | } | | 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.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) | 0.9 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
3 | try | | 15 | try |
4 | | | | |
| | | 16 | |
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 child.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.fw.gui.CascadeInternalFramePositioner do not have a common superclass |