final String key = "getStringFunctions";
String[] value = (String[])_cache.get(key);
if (value != null)
{
return value;
}
value = makeArray(privateGetJDBCMetaData().getStringFunctions());
_cache.put(key, value);
return value;
final String key = "getTimeDateFunctions";
String[] value = (String[])_cache.get(key);
if (value != null)
{
return value;
}
value = makeArray(privateGetJDBCMetaData().getTimeDateFunctions());
_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[] getStringFunctions()
|
|
Method name: String[] getTimeDateFunctions()
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | final String key = "getStringFunctions";↵ | | 1 | final String key = "getTimeDateFunctions";↵
|
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 | return value;↵ | | 5 | return value;↵
|
6 | }↵ | | 6 | }↵
|
|
7 | value = makeArray(privateGetJDBCMetaData().getStringFunctions());↵ | | 7 | value = makeArray(privateGetJDBCMetaData().getTimeDateFunctions());↵
|
8 | _cache.put(key, value);↵ | | 8 | _cache.put(key, value);↵
|
9 | return value; | | 9 | 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.2 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | final String key = "getStringFunctions"; | | 1 | final String key = "getTimeDateFunctions"; |
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 = makeArray(privateGetJDBCMetaData().getStringFunctions()); | | 5 | value = makeArray(privateGetJDBCMetaData().getTimeDateFunctions()); |
6 | _cache.put(key, value); | | 6 | _cache.put(key, value); |
7 | return value; | | 7 | return value; |
Precondition Violations (0)
Row |
Violation |