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/DataTypeShort.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.setInt(position, ((Byte)value).intValue());↵ | 5 | pstmt.setInt(position, ((Short)value).intValue());↵ | |
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 | 3 |
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) | 10.3 |
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 | else | |||||||||||||||
3 | pstmt.setInt(position, ((Byte)value).intValue()); |
| 3 | pstmt.setInt(position, ((Short)value).intValue()); |
Row | Violation |
---|---|
1 | Expression (Byte)value cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression (Short)value cannot be parameterized, because it has dependencies to/from statements that will be extracted |