File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeShort.java | File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeByte.java | |||
Method name: Object readResultSet(ResultSet, int, boolean)
|
Method name: Object readResultSet(ResultSet, int, boolean)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | short data = rs.getShort(index);↵ | 1 | byte data = rs.getByte(index);↵ | |
2 | if (rs.wasNull()) {↵ | 2 | if (rs.wasNull()) {↵ | |
3 | return null;↵ | 3 | return null;↵ | |
4 | } else {↵ | 4 | } else {↵ | |
5 | return Short.valueOf(data);↵ | 5 | return Byte.valueOf(data);↵ | |
6 | } | 6 |
| |
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 10 |
Number of mapped statements | 3 |
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) | 1.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | byte data = rs.getByte(index); | |||||||||||||||||
1 | short data = rs.getShort(index); | | |||||||||||||||||
2 | if (rs.wasNull()) | 2 | if (rs.wasNull()) | ||||||||||||||||
3 | return null; | 3 | return null; | ||||||||||||||||
else | else | ||||||||||||||||||
4 | return Short.valueOf(data); |
| 4 | return Byte.valueOf(data); |
Row | Violation |
---|---|
1 | Type short of variable data does not match with type byte of variable data |
2 | Expression Short cannot be unified with expression Byte , because common superclass java.lang.Number does not declare member(s) public static java.lang.Short valueOf(short) , public static java.lang.Byte valueOf(byte) |