IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef); // if no DataType object, then there is nothing to handle File IO, // so cannot do it if (dataTypeObject == null) throw new IOException( "No internal Data Type class for this column's SQL type"); // let DataType object speak for itself return dataTypeObject.importObject(inStream);
IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef); // if no DataType object, then there is nothing to handle File IO, // so cannot do it if (dataTypeObject == null) throw new IOException( "No internal Data Type class for this column's SQL type"); // let DataType object speak for itself dataTypeObject.exportObject(outStream, text);
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: String importObject(ColumnDisplayDefinition, FileInputStream) Method name: void exportObject(ColumnDisplayDefinition, FileOutputStream, String)
Number of AST nodes: 4 Number of AST nodes: 4
1
IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef);
1
IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef);
2
		
2
		
3
		// if no DataType object, then there is nothing to handle File IO,
3
		// if no DataType object, then there is nothing to handle File IO,
4
		// so cannot do it
4
		// so cannot do it
5
		if (dataTypeObject == null)
5
		if (dataTypeObject == null)
6
			throw new IOException(
6
			throw new IOException(
7
				"No internal Data Type class for this column's SQL type");
7
				"No internal Data Type class for this column's SQL type");
8
		// let DataType object speak for itself
8
		// let DataType object speak for itself
9
		return dataTypeObject.importObject(inStream);
9
		dataTypeObject.exportObject(outStream, text);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are declared in the same class
Number of node comparisons8
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.8
    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
    throw new IOException("No internal Data Type class for this column's SQL type");
    3
    throw new IOException("No internal Data Type class for this column's SQL type");
                                                                                                  
    4
    dataTypeObject.exportObject(outStream, text);
    Preondition Violations
    Unmatched statement dataTypeObject.exportObject(outStream,text); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4
    dataTypeObject.exportObject(outStream, text);
    4
    return dataTypeObject.importObject(inStream);
    4
    return dataTypeObject.importObject(inStream);
    Preondition Violations
    Unmatched statement return dataTypeObject.importObject(inStream); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    Unmatched return dataTypeObject.importObject(inStream);
                                                                                                    
    Precondition Violations (3)
    Row Violation
    1Unmatched statement dataTypeObject.exportObject(outStream,text); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement return dataTypeObject.importObject(inStream); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Unmatched return dataTypeObject.importObject(inStream);