if (thisThread != threadChanging) { return true; }
try
{
synchronized (this)
{
while (threadSuspended)
{
wait(200);
}
}
}
catch (InterruptedException e)
{
}
return false;
if (thisThread != threadSearching) { return true; }
try
{
synchronized (this)
{
while (threadSuspended)
{
wait(200);
}
}
}
catch (InterruptedException e)
{
}
return false;
Clone fragments detected by clone detection tool
File path: /sql12/plugins/smarttools/src/net/sourceforge/squirrel_sql/plugins/smarttools/gui/SmarttoolChangeValuesFrame.java
|
|
File path: /sql12/plugins/smarttools/src/net/sourceforge/squirrel_sql/plugins/smarttools/gui/SmarttoolChangeValuesFrame.java
|
Method name: boolean isThreadInvalid()
|
|
Method name: boolean isThreadInvalid()
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | if (thisThread != threadChanging) { return true; }↵ | | 1 | if (thisThread != threadSearching) { return true; }↵
|
2 | try↵ | | 2 | try↵
|
3 | {↵ | | 3 | {↵
|
4 | synchronized (this)↵ | | 4 | synchronized (this)↵
|
5 | {↵ | | 5 | {↵
|
6 | while (threadSuspended)↵ | | 6 | while (threadSuspended)↵
|
7 | {↵ | | 7 | {↵
|
8 | wait(200);↵ | | 8 | wait(200);↵
|
9 | }↵ | | 9 | }↵
|
10 | }↵ | | 10 | }↵
|
11 | }↵ | | 11 | }↵
|
12 | catch (InterruptedException e)↵ | | 12 | catch (InterruptedException e)↵
|
13 | {↵ | | 13 | {↵
|
14 | }↵ | | 14 | }↵
|
15 | return false; | | 15 | return false;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in the same java file |
Number of node comparisons | 11 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 7 |
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 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (thisThread != threadChanging) | | 1 | if (thisThread != threadSearching) |
2 | | | 2 | |
3 | try | | 3 | try |
4 | | | 4 | |
5 | | | 5 | |
6 | | | 6 | |
7 | return false; | | 7 | return false; |
Precondition Violations (0)
Row |
Violation |