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 validateAndConvert(String, Object, StringBuffer)
|
Method name: Object validateAndConvert(String, Object, StringBuffer)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (originalValue == null) {↵ | 1 | if (originalValue == null) {↵ | |
2 | // no existing blob to re-use↵ | 2 | // no existing clob to re-use↵ | |
3 | bdesc = new BlobDescriptor(null, byteData, true, true, 0);↵ | 3 | cdesc = new ClobDescriptor(null, value, true, true, 0);↵ | |
4 | }↵ | 4 | }↵ | |
5 | else {↵ | 5 | else {↵ | |
6 | // for convenience, cast the existing object↵ | 6 | // for convenience, cast the existing object↵ | |
7 | bdesc = (BlobDescriptor)originalValue;↵ | 7 | cdesc = (ClobDescriptor)originalValue;↵ | |
8 | // create new object to hold the different value, but use the same internal BLOB pointer↵ | 8 | // create new object to hold the different value, but use the same internal CLOB pointer↵ | |
9 | // as the original↵ | 9 | // as the original↵ | |
10 | bdesc = new BlobDescriptor(bdesc.getBlob(), byteData, ↵ | 10 | cdesc = new ClobDescriptor(cdesc.getClob(),value,↵ | |
11 | true, true, 0);↵ | 11 | true, true, 0);↵ | |
12 | } | 12 |
| |
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 | 16 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
10 | if (originalValue == null) | 4 | if (originalValue == null) | ||||
|
| 5 | cdesc = new ClobDescriptor(null, value, true, true, 0); | ||||
11 | bdesc = new BlobDescriptor(null, byteData, true, true, 0); |
| | ||||
else | | ||||||
|
| 6 | cdesc = (ClobDescriptor)originalValue; | ||||
|
| 7 | cdesc = new ClobDescriptor(cdesc.getClob(), value, true, true, 0); | ||||
12 | bdesc = (BlobDescriptor)originalValue; |
| | ||||
13 | bdesc = new BlobDescriptor(bdesc.getBlob(), byteData, true, true, 0); |
| |
Row | Violation |
---|---|
1 | Unmatched statement cdesc=new ClobDescriptor(null,value,true,true,0); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement bdesc=new BlobDescriptor(null,byteData,true,true,0); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement cdesc=(ClobDescriptor)originalValue; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement cdesc=new ClobDescriptor(cdesc.getClob(),value,true,true,0); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Unmatched statement bdesc=(BlobDescriptor)originalValue; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
6 | Unmatched statement bdesc=new BlobDescriptor(bdesc.getBlob(),byteData,true,true,0); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
7 | The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero |