File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeByte.java | File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeTimestamp.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 | }↵ | |||
4 | else {↵ | |||
5 | pstmt.setInt(position, ((Byte)value).intV↵ | 3 | }↵ | |
4 | else {↵ | |||
6 | alue());↵ | 5 | pstmt.setTimestamp(position, ((Timestamp)value));↵ | |
7 | } | 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.setTimestamp(position, ((Timestamp)value)); | |||||
3 | pstmt.setInt(position, ((Byte)value).intValue()); |
| |
Row | Violation |
---|---|
1 | Unmatched statement pstmt.setTimestamp(position,((Timestamp)value)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement pstmt.setTimestamp(position,((Timestamp)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.setInt(position,((Byte)value).intValue()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement pstmt.setInt(position,((Byte)value).intValue()); 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 |