if(_loading)
{
return;
}
_loading = true;
_schemasAndCatalogsLoaded = false;
_tablesLoaded = false;
_storedProceduresLoaded = false;
if(_loading)
{
return;
}
_loading = true;
_schemasAndCatalogsLoaded = false;
_tablesLoaded = false;
_storedProceduresLoaded = false;
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 reload(IDatabaseObjectInfo, boolean)
|
|
Method name: void privateLoadAll()
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | if(_loading)↵ | | 1 | if(_loading)↵
|
2 | {↵ | | 2 | ↵
|
3 | ↵ | | 3 | {↵
|
4 | return;↵ | | 4 | return;↵
|
5 | }↵ | | 5 | ↵
|
6 | ↵ | | 6 | }↵
|
|
7 | _loading = true;↵ | | 7 | _loading = true;↵
|
8 | ↵ | | |
|
9 | _schemasAndCatalogsLoaded = false;↵ | | 8 | _schemasAndCatalogsLoaded = false;↵
|
10 | _tablesLoaded = false;↵ | | 9 | _tablesLoaded = false;↵
|
11 | _storedProceduresLoaded = false; | | 10 | _storedProceduresLoaded = false;
|
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 declared in the same class |
Number of node comparisons | 15 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 6 |
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.7 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
4 | if (_loading) | | 2 | if (_loading) |
5 | | | 3 | |
6 | _loading = true; | | 4 | _loading = true; |
7 | _schemasAndCatalogsLoaded = false; | | 5 | _schemasAndCatalogsLoaded = false; |
8 | _tablesLoaded = false; | | 6 | _tablesLoaded = false; |
9 | _storedProceduresLoaded = false; | | 7 | _storedProceduresLoaded = false; |
Precondition Violations (2)
Row |
Violation |
1 | Conditional return; |
2 | Conditional return; |