final String key = "getSchemaTerm";
String value = (String)_cache.get(key);
if (value != null) {
return value;
}
value = privateGetJDBCMetaData().getSchemaTerm();
_cache.put(key, value);
return value;
final String key = "getCatalogSeparator";
String value = (String)_cache.get(key);
if (value != null)
{
return value;
}
value = privateGetJDBCMetaData().getCatalogSeparator();
_cache.put(key, value);
return value;
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/sql/SQLDatabaseMetaData.java
|
|
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/sql/SQLDatabaseMetaData.java
|
Method name: String getSchemaTerm()
|
|
Method name: String getCatalogSeparator()
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | final String key = "getSchemaTerm";↵ | | 1 | final String key = "get↵
|
2 | ↵ | | 2 | CatalogSeparator";↵
|
3 | String value = (String)_cache.get(key);↵ | | 3 | String value = (String)_cache.get(key);↵
|
4 | if (value != null) {↵ | | 4 | if (value != null)↵
|
5 | return value;↵ | | |
|
6 | }↵ | | |
|
7 | ↵ | | |
|
8 | ↵ | | |
|
| | | 5 | {↵
|
| | | 6 | return value;↵
|
| | | 7 | }↵
|
|
9 | value = privateGetJDBCMetaData().getSchemaTerm();↵ | | 8 | value = privateGetJDBCMetaData().get↵
|
10 | ↵ | | 9 | CatalogSeparator();↵
|
11 | _cache.put(key, value);↵ | | 10 | _cache.put(key, value);↵
|
12 | ↵ | | |
|
13 | ↵ | | |
|
14 | return value; | | 11 | return value;
|
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 29 |
-
{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) | 15.1 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | final String key = "getSchemaTerm"; | | 1 | final String key = "getCatalogSeparator"; |
2 | String value = (String)_cache.get(key); | | 2 | String value = (String)_cache.get(key); |
3 | if (value != null) | | 3 | if (value != null) |
4 | | | 4 | |
5 | value = privateGetJDBCMetaData().getSchemaTerm(); | | 5 | value = privateGetJDBCMetaData().getCatalogSeparator(); |
6 | _cache.put(key, value); | | 6 | _cache.put(key, value); |
7 | return value; | | 7 | return value; |
Precondition Violations (0)
Row |
Violation |