CloneSet489


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
11210.979method_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
116624
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeClob.java
211468
E:/TSE/Projects-CloneDR/sql12/plugins/derby/src/net/sourceforge/squirrel_sql/plugins/derby/types/DerbyClobDataTypeComponent.java
Next
Last
Clone Instance
1
Line Count
16
Source Line
624
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeClob.java

/**
 * When updating the database, insert the appropriate datatype into the
 * prepared statment at the given variable position.
 */
public void setPreparedStatementValue(PreparedStatement pstmt, Object value, int position) throws java.sql.SQLException {
  if (value == null || ((ClobDescriptor) value).getData() == null) {
    pstmt.setNull(position, _colDef.getSqlType());
  }
  else {
    // for convenience cast the object to ClobDescriptor
    ClobDescriptor cdesc = (ClobDescriptor) value;
    // There are a couple of possible ways to update the data in the DB.
    // The first is to use setString like this:
    //              cdesc.getClob().setString(0, cdesc.getData());
    // However, the DB2 driver throws an exception saying that that function
    // is not implemented, so we have to use the other method, which is to use a stream.
    pstmt.setCharacterStream(position, new StringReader(cdesc.getData()), cdesc.getData().length());
  }
}


First
Previous
Clone Instance
2
Line Count
11
Source Line
468
Source File
E:/TSE/Projects-CloneDR/sql12/plugins/derby/src/net/sourceforge/squirrel_sql/plugins/derby/types/DerbyClobDataTypeComponent.java

/**
 * When updating the database, insert the appropriate datatype into the
 * prepared statment at the given variable position.
 */
public void setPreparedStatementValue(PreparedStatement pstmt, Object value, int position) throws java.sql.SQLException {
  if (value == null || ((DerbyClobDescriptor) value).getData() == null) {
    pstmt.setNull(position, _colDef.getSqlType());
  }
  else {
    // for convenience cast the object to ClobDescriptor
    DerbyClobDescriptor cdesc = (DerbyClobDescriptor) value;
    pstmt.setCharacterStream(position, new StringReader(cdesc.getData()), cdesc.getData().length());
  }
}


Clone AbstractionParameter Count: 1Parameter Bindings

/**
    * When updating the database, insert the appropriate datatype into the
    * prepared statment at the given variable position.
    */
/**
         * When updating the database, insert the appropriate datatype into the
         * prepared statment at the given variable position.
         */
public void setPreparedStatementValue(PreparedStatement pstmt, Object value, int position) throws java.sql.SQLException {
  if (value == null || (( [[#variable1ce83f20]]) value).getData() == null) {
    pstmt.setNull(position, _colDef.getSqlType());
  }
  else {
     [[#variable1ce83f20]] cdesc = ( [[#variable1ce83f20]]) value;
    // There are a couple of possible ways to update the data in the DB.
    // The first is to use setString like this:
    //              cdesc.getClob().setString(0, cdesc.getData());
    // However, the DB2 driver throws an exception saying that that function
    // is not implemented, so we have to use the other method, which is to use a stream.
    pstmt.setCharacterStream(position, new StringReader(cdesc.getData()), cdesc.getData().length());
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#1ce83f20]]
ClobDescriptor 
12[[#1ce83f20]]
DerbyClobDescriptor