synchronized (chars)
{
try
{
chars.wait();
}
catch (InterruptedException e)
{
}
}
try
{
_callback.wait();
}
catch (InterruptedException 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/util/TaskExecuter.java
|
Method name: void waitChars()
|
|
Method name: void run()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 2
|
|
1 | synchronized (chars)↵ | | |
|
2 | {↵ | | |
|
3 | try↵ | | 1 | try↵
|
4 | {↵ | | 2 | {↵
|
5 | chars.wait();↵ | | 3 | _callback.wait();↵
|
6 | }↵ | | 4 | }↵
|
7 | catch (InterruptedException e)↵ | | 5 | catch (InterruptedException ignore)↵
|
8 | {↵ | | 6 | {↵
|
9 | }↵ | | 7 | ↵
|
| | | 8 | // Ignore↵
|
10 | } | | 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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 4 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
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) | 0.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
3 | try | | 10 | try |
4 | | | 11 | |
Precondition Violations (2)
Row |
Violation |
1 | Type java.text.CharacterIterator of variable chars does not match with type net.sourceforge.squirrel_sql.fw.util.ITaskThreadPoolCallback of variable _callback |
2 | 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.util.TaskExecuter do not have a common superclass |