if (thisThread != threadWork)
{
return true;
}
try
{
synchronized (this)
{
while (threadSuspended)
{
wait(200);
}
}
} catch (InterruptedException e)
{
}
return false;
if (thisThread != threadWork) {
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/SmarttoolMissingIndicesFrame.java
|
|
File path: /sql12/plugins/smarttools/src/net/sourceforge/squirrel_sql/plugins/smarttools/gui/SmarttoolFindBadNullValuesFrame.java
|
Method name: boolean isThreadInvalid()
|
|
Method name: boolean isThreadInvalid()
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | if (thisThread != threadWork)↵ | | 1 | if (thisThread != threadWork)↵
|
2 | {↵ | | 2 | {↵
|
3 | return true;↵ | | 3 | return true;↵
|
4 | }↵ | | 4 | }↵
|
5 | try↵ | | 5 | try↵
|
6 | {↵ | | 6 | {↵
|
7 | synchronized (this)↵ | | 7 | synchronized (this)↵
|
8 | {↵ | | 8 | {↵
|
9 | while (threadSuspended)↵ | | 9 | while (threadSuspended)↵
|
10 | {↵ | | 10 | {↵
|
11 | wait(200);↵ | | 11 | wait(200);↵
|
12 | }↵ | | 12 | }↵
|
13 | }↵ | | 13 | }↵
|
14 | } catch (InterruptedException e)↵ | | 14 | } catch (InterruptedException e)↵
|
15 | {↵ | | 15 | {↵
|
16 | }↵ | | 16 | }↵
|
17 | return false; | | 17 | 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.4 |
Clones location | Clones are in different classes having the same super class |
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.4 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (thisThread != threadWork) | | 1 | if (thisThread != threadWork) |
2 | | | 2 | |
3 | try | | 3 | try |
4 | | | 4 | |
5 | | | 5 | |
6 | | | 6 | |
7 | return false; | | 7 | return false; |
Precondition Violations (0)
Row |
Violation |