final String key = "getURL"; String value = (String)_cache.get(key); if (value != null) { return value; } value = privateGetJDBCMetaData().getURL(); _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 getURL() Method name: String getCatalogSeparator()
Number of AST nodes: 7 Number of AST nodes: 7
1
final String key = "getURL";
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().getURL();
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;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are declared in the same class
Number of node comparisons29
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    final String key = "getURL";
    1
    final String key = "getURL";
    1
    final String key = "getCatalogSeparator";
    Differences
    Expression1Expression2Difference
    "getURL""getCatalogSeparator"LITERAL_VALUE_MISMATCH
    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
    return value;
    4
    return value;
    5
    value = privateGetJDBCMetaData().getURL();
    5
    value = privateGetJDBCMetaData().getURL();
    5
    value = privateGetJDBCMetaData().getCatalogSeparator();
    Differences
    Expression1Expression2Difference
    getURLgetCatalogSeparatorMETHOD_INVOCATION_NAME_MISMATCH
    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