File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeBigDecimal.java | File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeDate.java | |||
Method name: void setPreparedStatementValue(PreparedStatement, Object, int)
|
Method name: void setPreparedStatementValue(PreparedStatement, Object, int)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if (value == null) {↵ | 1 | if (value == null) {↵ | |
2 | pstmt.setNull(position, _colDef.getSqlType());↵ | 2 | pstmt.setNull(position, _colDef.getSqlType());↵ | |
3 | }↵ | 3 | }↵ | |
4 | else {↵ | 4 | else {↵ | |
5 | pstmt.setBigDecimal(position, (BigDecimal)value);↵ | 5 | pstmt.setDate(position, ((Date)value));↵ | |
6 | } | 6 |
| |
See real code fragment | See real code fragment |
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 in different classes having the same super class |
Number of node comparisons | 9 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 9.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
1 | if (value == null) | 1 | if (value == null) | |||||
2 | pstmt.setNull(position, _colDef.getSqlType()); | 2 | pstmt.setNull(position, _colDef.getSqlType()); | |||||
else | | |||||||
|
| 3 | pstmt.setDate(position, ((Date)value)); | |||||
3 | pstmt.setBigDecimal(position, (BigDecimal)value); |
| |
Row | Violation |
---|---|
1 | Unmatched statement pstmt.setDate(position,((Date)value)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement pstmt.setDate(position,((Date)value)); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
3 | Unmatched statement pstmt.setBigDecimal(position,(BigDecimal)value); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement pstmt.setBigDecimal(position,(BigDecimal)value); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |