File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeBoolean.java | File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeByte.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 | {↵ | 2 | {↵ | |
3 | pstmt.setNull(position, _colDef.getSqlType());↵ | 3 | pstmt.setNull(position, _colDef.getSqlType());↵ | |
4 | }↵ | 4 | }↵ | |
5 | else↵ | 5 | else↵ | |
6 | {↵ | 6 | {↵ | |
7 | pstmt.setBoolean(position, ((Boolean) value).booleanValue());↵ | 7 | pstmt.setInt(position, ((Byte)value).intValue());↵ | |
8 | } | 8 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
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) | 12.4 |
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.setBoolean(position, ((Boolean)value).booleanValue()); |
| 3 | pstmt.setInt(position, ((Byte)value).intValue()); |
Row | Violation |
---|---|
1 | Expression ((Boolean)value).booleanValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression ((Byte)value).intValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type boolean of variable ((Boolean)value).booleanValue() does not match with type int of variable ((Byte)value).intValue() |
4 | Expression (Boolean)value cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression (Byte)value cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type java.lang.Boolean does not match with type java.lang.Byte |
7 | Expression pstmt.setBoolean(position,((Boolean)value).booleanValue()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression pstmt.setInt(position,((Byte)value).intValue()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression pstmt.setBoolean(position,((Boolean)value).booleanValue()) is a void method call, and thus it cannot be parameterized |
10 | Expression pstmt.setInt(position,((Byte)value).intValue()) is a void method call, and thus it cannot be parameterized |