File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/CellComponentFactory.java | File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/CellComponentFactory.java | |||
Method name: Object validateAndConvert(ColumnDisplayDefinition, Object, String, StringBuffer)
|
Method name: Object validateAndConvertInPopup(ColumnDisplayDefinition, Object, String, StringBuffer)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef);↵ | 1 | IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef);↵ | |
2 | if (dataTypeObject != null) {↵ | 2 | if (dataTypeObject != null) {↵ | |
3 | // we have an appropriate data type object↵ | 3 | // we have an appropriate data type object↵ | |
4 | return dataTypeObject.validateAndConvert(inputValue, originalValue, messageBuffer);↵ | 4 | return dataTypeObject.validateAndConvertInPopup(inputValue, originalValue, messageBuffer);↵ | |
5 | }↵ | 5 | }↵ | |
6 | // No appropriate DataType for this column, so do the best↵ | 6 | // No appropriate DataType for this column, so do the best↵ | |
7 | // we can with what we know.↵ | 7 | // we can with what we know.↵ | |
8 | //↵ | 8 | //↵ | |
9 | // THIS MAY NOT BE THE BEST BEHAVIOR HERE!!!!!!!↵ | 9 | // THIS MAY NOT BE THE BEST BEHAVIOR HERE!!!!!!!↵ | |
10 | ↵ | 10 | ↵ | |
11 | // Default Operation↵ | 11 | // Default Operation↵ | |
12 | if (inputValue.equals("<null>"))↵ | 12 | if (inputValue.equals("<null>"))↵ | |
13 | return null;↵ | 13 | return null;↵ | |
14 | else return inputValue; | 14 |
| |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 16 |
Number of mapped statements | 6 |
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) | 5.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef); | 1 | IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef); | |||||||||||||
2 | if (dataTypeObject != null) | 2 | if (dataTypeObject != null) | |||||||||||||
3 | return dataTypeObject.validateAndConvert(inputValue, originalValue, messageBuffer); |
| 3 | return dataTypeObject.validateAndConvertInPopup(inputValue, originalValue, messageBuffer); | ||||||||||||
4 | if (inputValue.equals("<null>")) | 4 | if (inputValue.equals("<null>")) | |||||||||||||
5 | return null; | 5 | return null; | |||||||||||||
else | else | |||||||||||||||
6 | return inputValue; | 6 | return inputValue; |
Row | Violation |
---|---|
1 | Expression dataTypeObject.validateAndConvert(inputValue,originalValue,messageBuffer) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression dataTypeObject.validateAndConvertInPopup(inputValue,originalValue,messageBuffer) cannot be parameterized, because it has dependencies to/from statements that will be extracted |