IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef); if (dataTypeObject != null) { // we have an appropriate data type object return dataTypeObject.validateAndConvert(inputValue, originalValue, messageBuffer); } // No appropriate DataType for this column, so do the best // we can with what we know. // // THIS MAY NOT BE THE BEST BEHAVIOR HERE!!!!!!! // Default Operation if (inputValue.equals("<null>")) return null; else return inputValue;
IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef); if (dataTypeObject != null) { // we have an appropriate data type object return dataTypeObject.validateAndConvertInPopup(inputValue, originalValue, messageBuffer); } // No appropriate DataType for this column, so do the best // we can with what we know. // // THIS MAY NOT BE THE BEST BEHAVIOR HERE!!!!!!! // Default Operation if (inputValue.equals("<null>")) return null; else return inputValue;
Clone fragments detected by clone detection tool
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
	 	else return inputValue;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are declared in the same class
Number of node comparisons16
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)5.2
    Clone typeType 2
    Mapped Statements
    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.validateAndConvert(inputValue, originalValue, messageBuffer);
    3
    return dataTypeObject.validateAndConvertInPopup(inputValue, originalValue, messageBuffer);
    Differences
    Expression1Expression2Difference
    validateAndConvertvalidateAndConvertInPopupMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression dataTypeObject.validateAndConvert(inputValue,originalValue,messageBuffer) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression dataTypeObject.validateAndConvertInPopup(inputValue,originalValue,messageBuffer) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    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;
    Precondition Violations (2)
    Row Violation
    1Expression dataTypeObject.validateAndConvert(inputValue,originalValue,messageBuffer) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression dataTypeObject.validateAndConvertInPopup(inputValue,originalValue,messageBuffer) cannot be parameterized, because it has dependencies to/from statements that will be extracted