File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeBlob.java | File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeClob.java | |||
Method name: Object staticReadResultSet(ResultSet, int)
|
Method name: Object staticReadResultSet(ResultSet, int)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | int len = (int)blob.length();↵ | 1 | int len = (int)clob.length();↵ | |
2 | if (len > 0)↵ | 2 | if (len > 0)↵ | |
3 | {↵ | 3 | {↵ | |
4 | int charsToRead = len;↵ | 4 | int charsToRead = len;↵ | |
5 | if (! _readCompleteBlobs)↵ | 5 | if ( ! _readCompleteClobs)↵ | |
6 | {↵ | 6 | {↵ | |
7 | charsToRead = _readBlobsSize;↵ | 7 | charsToRead = _readClobsSize;↵ | |
8 | }↵ | 8 | }↵ | |
9 | if (charsToRead > len)↵ | 9 | if (charsToRead > len)↵ | |
10 | {↵ | 10 | {↵ | |
11 | charsToRead = len;↵ | 11 | charsToRead = len;↵ | |
12 | }↵ | 12 | }↵ | |
13 | blobData = blob.getBytes(1, charsToRead);↵ | 13 | clobData = clob.getSubString(1, charsToRead);↵ | |
14 | } | 14 |
| |
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.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 21 |
Number of mapped statements | 7 |
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) | 2.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | int len = (int)blob.length(); |
| 7 | int len = (int)clob.length(); | ||||||||||||||
8 | if (len > 0) | 8 | if (len > 0) | |||||||||||||||
9 | int charsToRead = len; | 9 | int charsToRead = len; | |||||||||||||||
10 | if (!_readCompleteBlobs) |
| 10 | if (!_readCompleteClobs) | ||||||||||||||
11 | charsToRead = _readBlobsSize; |
| 11 | charsToRead = _readClobsSize; | ||||||||||||||
12 | if (charsToRead > len) | 12 | if (charsToRead > len) | |||||||||||||||
13 | charsToRead = len; | 13 | charsToRead = len; | |||||||||||||||
|
| 14 | clobData = clob.getSubString(1, charsToRead); | |||||||||||||||
14 | blobData = blob.getBytes(1, charsToRead); |
| |
Row | Violation |
---|---|
1 | Type java.sql.Blob of variable blob does not match with type java.sql.Clob of variable clob |
2 | Unmatched statement clobData=clob.getSubString(1,charsToRead); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement clobData=clob.getSubString(1,charsToRead); 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 |
4 | Unmatched statement blobData=blob.getBytes(1,charsToRead); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement blobData=blob.getBytes(1,charsToRead); 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 |