final Date results = _rs.getDate(columnIdx); _wasNull = results == null; return results;
final String results = _rs.getString(columnIdx); _wasNull = results == null; return results;
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/sql/ResultSetColumnReader.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/sql/ResultSetColumnReader.java
Method name: Date getDate(int) Method name: String getString(int)
Number of AST nodes: 3 Number of AST nodes: 3
1
final Date results = _rs.getDate(columnIdx);
1
final String results = _rs.getString(columnIdx);
2
		_wasNull = results == null;
2
		_wasNull = results == null;
3
		return results;
3
		return results;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are declared in the same class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                                      
    1
    final String results = _rs.getString(columnIdx);
    1
    final Date results = _rs.getDate(columnIdx);
                                                                                              
    2
    _wasNull = results == null;
    2
    _wasNull = results == null;
    2
    _wasNull = results == null;
    Differences
    Expression1Expression2Difference
    java.sql.Datejava.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.sql.Date of variable results does not match with type java.lang.String of variable results
    • Make classes java.sql.Date and java.lang.String extend a common superclass
    2
    _wasNull = results == null;
                                        
    3
    return results;
    Preondition Violations
    Unmatched return results;
    3
    return results;
    3
    return results;
    3
    return results;
    Preondition Violations
    Unmatched return results;
                                        
    Precondition Violations (3)
    Row Violation
    1Type java.sql.Date of variable results does not match with type java.lang.String of variable results
    2Unmatched return results;
    3Unmatched return results;