try
{
synchronized (this)
{
while (false == _tablesLoaded)
{
this.wait();
}
}
}
catch (InterruptedException e)
{
throw new RuntimeException(e);
}
try
{
synchronized (this)
{
while (false == _storedProceduresLoaded)
{
this.wait();
}
}
}
catch (InterruptedException e)
{
throw new RuntimeException(e);
}
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/schemainfo/SchemaInfo.java
|
|
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/schemainfo/SchemaInfo.java
|
Method name: void waitTillTablesLoaded()
|
|
Method name: void waitTillStoredProceduresLoaded()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | try↵ | | 1 | try↵
|
2 | {↵ | | 2 | {↵
|
3 | synchronized (this)↵ | | 3 | synchronized (this)↵
|
4 | {↵ | | 4 | {↵
|
5 | while (false == _tablesLoaded)↵ | | 5 | while (false == _storedProceduresLoaded)↵
|
6 | {↵ | | 6 | {↵
|
7 | this.wait();↵ | | 7 | this.wait();↵
|
8 | }↵ | | 8 | }↵
|
9 | }↵ | | 9 | }↵
|
10 | }↵ | | 10 | }↵
|
11 | catch (InterruptedException e)↵ | | 11 | catch (InterruptedException e)↵
|
12 | {↵ | | 12 | {↵
|
13 | throw new RuntimeException(e);↵ | | 13 | throw new RuntimeException(e);↵
|
14 | } | | 14 | }
|
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 6 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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.7 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | try | | 1 | try |
2 | | | 2 | |
3 | while (false == _tablesLoaded) | | 3 | while (false == _storedProceduresLoaded) |
4 | | | 4 | |
Precondition Violations (0)
Row |
Violation |