nus-yam/ex-repair huggingface dataset:
Program: 80019
Project: 80019
Buggy source:
/** 
 * Build parameters for error message and throw the exception when there is no matching signature found.
 * @param receiverTypeName	Type name for receiver
 * @param parmTypeNames		Type names for parameters as object types
 * @param primParmTypeNames	Type names for parameters as primitive types
 * @exception StandardException		Thrown on error
 */
void throwNoMethodFound(String receiverTypeName,String[] parmTypeNames,String[] primParmTypeNames) throws StandardException {
  StringBuffer parmTypes=new StringBuffer();
  for (int i=0; i < parmTypeNames.length; i++) {
    if (i != 0)     parmTypes.append("String_Node_Str");
    parmTypes.append((parmTypeNames[i].length() != 0 ? parmTypeNames[i] : "String_Node_Str"));
    if ((primParmTypeNames != null) && !primParmTypeNames[i].equals(parmTypeNames[i]))     parmTypes.append("String_Node_Str" + primParmTypeNames[i] + "String_Node_Str");
  }
  throw StandardException.newException(SQLState.LANG_NO_METHOD_FOUND,receiverTypeName,methodName,parmTypes);
}

Fixed version (ground truth):
/** 
 * Build parameters for error message and throw the exception when there is no matching signature found.
 * @param receiverTypeName	Type name for receiver
 * @param parmTypeNames		Type names for parameters as object types
 * @param primParmTypeNames	Type names for parameters as primitive types
 * @exception StandardException		Thrown on error
 */
void throwNoMethodFound(String receiverTypeName,String[] parmTypeNames,String[] primParmTypeNames) throws StandardException {
  StringBuffer parmTypes=new StringBuffer();
  boolean hasVarargs=hasVarargs();
  int firstVarargIdx=getFirstVarargIdx();
  int paramCount=signature.length;
  for (int i=0; i < paramCount; i++) {
    if (i != 0) {
      parmTypes.append("String_Node_Str");
    }
    boolean isVararg=isVararg(i);
    String parmType=parmTypeNames[i];
    if (parmTypeNames[i].length() == 0) {
      parmType="String_Node_Str";
    }
 else     if (isVararg) {
      parmType=getVarargTypeName(parmType);
    }
    parmTypes.append(parmType);
    if ((primParmTypeNames != null) && !primParmTypeNames[i].equals(parmTypeNames[i])) {
      String primTypeName=primParmTypeNames[i];
      if (isVararg) {
        primTypeName=getVarargTypeName(primTypeName);
      }
      parmTypes.append("String_Node_Str" + primTypeName + "String_Node_Str");
    }
  }
  throw StandardException.newException(SQLState.LANG_NO_METHOD_FOUND,receiverTypeName,methodName,parmTypes);
}
Program: 80020
Project: 80020
Buggy source:
/** 
 * <p> Get the offset into the routine arguments corresponding to the index of the invocation parameter. The two indexes may be different in the case of varargs methods. There may be more invocation args than declared routine args. For a varargs routine, all of the trailing invocation parameters correspond to the last argument declared by the CREATE FUNCTION/PROCEDURE statement. </p>
 */
protected int getRoutineArgIdx(int invocationArgIdx){
  if (routineInfo == null) {
    return invocationArgIdx;
  }
  if (!routineInfo.hasVarargs()) {
    return invocationArgIdx;
  }
  int firstVarargIdx=routineInfo.getParameterCount() - 1;
  return (firstVarargIdx < invocationArgIdx) ? firstVarargIdx : invocationArgIdx;
}

Fixed version (ground truth):
protected int getRoutineArgIdx(RoutineAliasInfo rai,int invocationArgIdx){
  if (!rai.hasVarargs()) {
    return invocationArgIdx;
  }
  int firstVarargIdx=rai.getParameterCount() - 1;
  return (firstVarargIdx < invocationArgIdx) ? firstVarargIdx : invocationArgIdx;
}
Program: 80025
Project: 80025
Buggy source:
/** 
 * Prepare to mark the dependent as invalid (due to at least one of its dependencies being invalid).
 * @param action	The action causing the invalidation
 * @param p		the provider
 * @exception StandardException thrown if unable to make it invalid
 */
public void prepareToInvalidate(Provider p,int action,LanguageConnectionContext lcc) throws StandardException {
  DependencyManager dm=getDataDictionary().getDependencyManager();
switch (action) {
default :
    DataDictionary dd=getDataDictionary();
  ColumnDescriptor cd=dd.getColumnDescriptorByDefaultId(defaultUUID);
TableDescriptor td=dd.getTableDescriptor(cd.getReferencingUUID());
throw StandardException.newException(SQLState.LANG_PROVIDER_HAS_DEPENDENT_OBJECT,dm.getActionString(action),p.getObjectName(),MessageService.getTextMessage(SQLState.LANG_COLUMN_DEFAULT),td.getQualifiedName() + "String_Node_Str" + cd.getColumnName());
}
}

Fixed version (ground truth):
/** 
 * Prepare to mark the dependent as invalid (due to at least one of its dependencies being invalid).
 * @param action	The action causing the invalidation
 * @param p		the provider
 * @exception StandardException thrown if unable to make it invalid
 */
public void prepareToInvalidate(Provider p,int action,LanguageConnectionContext lcc) throws StandardException {
  DependencyManager dm=getDataDictionary().getDependencyManager();
switch (action) {
default :
    DataDictionary dd=getDataDictionary();
  ColumnDescriptor cd=dd.getColumnDescriptorByDefaultId(defaultUUID);
TableDescriptor td=dd.getTableDescriptor(cd.getReferencingUUID());
throw StandardException.newException(SQLState.LANG_PROVIDER_HAS_DEPENDENT_OBJECT,dm.getActionString(action),p.getObjectName(),"String_Node_Str",td.getQualifiedName() + "String_Node_Str" + cd.getColumnName());
}
}
Program: 80027
Project: 80027
Buggy source:
/** 
 * Print trace change message to console
 * @param on			true to print tracing on, false to print tracing off
 * @exception Exception	throws an exception if an error occurs
 */
private void consoleTraceMessage(int connNum,boolean on) throws Exception {
  if (connNum == 0)   consolePropertyMessage("String_Node_Str",on ? "String_Node_Str" : "String_Node_Str");
 else {
    String[] args={on ? "String_Node_Str" : "String_Node_Str",Integer.toString(connNum)};
    consolePropertyMessage("String_Node_Str",args);
  }
}

Fixed version (ground truth):
/** 
 * Print trace change message to console
 * @param on			true to print tracing on, false to print tracing off
 * @exception Exception	throws an exception if an error occurs
 */
private void consoleTraceMessage(int connNum,boolean on) throws Exception {
  String messageID;
  String[] args=null;
  if (connNum == 0) {
    if (on) {
      messageID="String_Node_Str";
    }
 else {
      messageID="String_Node_Str";
    }
  }
 else {
    if (on) {
      messageID="String_Node_Str";
    }
 else {
      messageID="String_Node_Str";
    }
    args=new String[]{Integer.toString(connNum)};
  }
  consolePropertyMessage(messageID,args);
}
Program: 80031
Project: 80031
Buggy source:
/** 
 * Drops a sequence descriptor
 * @param descriptor The descriptor to drop
 * @param tc         The TransactionController.
 * @throws StandardException Thrown on failure
 */
public void dropSequenceDescriptor(SequenceDescriptor descriptor,TransactionController tc) throws StandardException {
  DataValueDescriptor sequenceIdOrderable;
  TabInfoImpl ti=getNonCoreTI(SYSSEQUENCES_CATALOG_NUM);
  sequenceIdOrderable=getIDValueAsCHAR(descriptor.getUUID());
  ExecIndexRow keyRow=(ExecIndexRow)exFactory.getIndexableRow(1);
  keyRow.setColumn(1,sequenceIdOrderable);
  ti.deleteRow(tc,keyRow,SYSSEQUENCESRowFactory.SYSSEQUENCES_INDEX1_ID);
}

Fixed version (ground truth):
/** 
 * Drops a sequence descriptor
 * @param descriptor The descriptor to drop
 * @param tc         The TransactionController.
 * @throws StandardException Thrown on failure
 */
public void dropSequenceDescriptor(SequenceDescriptor descriptor,TransactionController tc) throws StandardException {
  DataValueDescriptor sequenceIdOrderable;
  TabInfoImpl ti=getNonCoreTI(SYSSEQUENCES_CATALOG_NUM);
  sequenceIdOrderable=getIDValueAsCHAR(descriptor.getUUID());
  ExecIndexRow keyRow=(ExecIndexRow)exFactory.getIndexableRow(1);
  keyRow.setColumn(1,sequenceIdOrderable);
  ti.deleteRow(tc,keyRow,SYSSEQUENCESRowFactory.SYSSEQUENCES_INDEX1_ID);
  dropSequenceID(descriptor);
}
Program: 80033
Project: 80033
Buggy source:
/** 
 * Get the sequence descriptor given a sequence name and a schema Id.
 * @param sequenceName The sequence name, guaranteed to be unique only within its schema.
 * @param sd           The schema descriptor.
 * @return The SequenceDescriptor for the constraints.
 * @throws StandardException Thrown on failure
 */
public SequenceDescriptor getSequenceDescriptor(SchemaDescriptor sd,String sequenceName) throws StandardException {
  DataValueDescriptor schemaIDOrderable;
  DataValueDescriptor sequenceNameOrderable;
  TabInfoImpl ti=getNonCoreTI(SYSSEQUENCES_CATALOG_NUM);
  sequenceNameOrderable=new SQLVarchar(sequenceName);
  schemaIDOrderable=getIDValueAsCHAR(sd.getUUID());
  ExecIndexRow keyRow=exFactory.getIndexableRow(2);
  keyRow.setColumn(1,schemaIDOrderable);
  keyRow.setColumn(2,sequenceNameOrderable);
  return (SequenceDescriptor)getDescriptorViaIndex(SYSSEQUENCESRowFactory.SYSSEQUENCES_INDEX2_ID,keyRow,(ScanQualifier[][])null,ti,(TupleDescriptor)null,(List)null,false);
}

Fixed version (ground truth):
/** 
 * Get the sequence descriptor given a sequence name and a schema Id.
 * @param sequenceName The sequence name, guaranteed to be unique only within its schema.
 * @param sd           The schema descriptor.
 * @return The SequenceDescriptor for the constraints.
 * @throws StandardException Thrown on failure
 */
public SequenceDescriptor getSequenceDescriptor(SchemaDescriptor sd,String sequenceName) throws StandardException {
  DataValueDescriptor schemaIDOrderable;
  DataValueDescriptor sequenceNameOrderable;
  TabInfoImpl ti=getNonCoreTI(SYSSEQUENCES_CATALOG_NUM);
  sequenceNameOrderable=new SQLVarchar(sequenceName);
  schemaIDOrderable=getIDValueAsCHAR(sd.getUUID());
  ExecIndexRow keyRow=exFactory.getIndexableRow(2);
  keyRow.setColumn(1,schemaIDOrderable);
  keyRow.setColumn(2,sequenceNameOrderable);
  SequenceDescriptor sequenceDescriptor=(SequenceDescriptor)getDescriptorViaIndex(SYSSEQUENCESRowFactory.SYSSEQUENCES_INDEX2_ID,keyRow,(ScanQualifier[][])null,ti,(TupleDescriptor)null,(List)null,false);
  putSequenceID(sequenceDescriptor);
  return sequenceDescriptor;
}
Program: 80034
Project: 80034
Buggy source:
/** 
 * Open connection to the specified database using the supplied username and password. Treat the database name as a physical database name rather than as a logical name which needs to be mapped. If the database does not exist, it will be created. Requires that the test has been decorated with additionalDatabaseDecorator with the matching name.
 * @param physicalDatabaseName The real database name to use.
 * @user name of user
 * @password password of user
 * @return connection to specified database.
 */
public Connection openPhysicalConnection(String physicalDatabaseName,String user,String password) throws SQLException {
  return connector.openConnection(physicalDatabaseName,user,password);
}

Fixed version (ground truth):
/** 
 * Open connection to the specified database using the supplied username and password. Treat the database name as a physical database name rather than as a logical name which needs to be mapped. If the database does not exist, it will be created. Requires that the test has been decorated with additionalDatabaseDecorator with the matching name.
 * @param physicalDatabaseName The real database name to use.
 * @param user name of user
 * @param password password of user
 * @return connection to specified database.
 */
public Connection openPhysicalConnection(String physicalDatabaseName,String user,String password) throws SQLException {
  return connector.openConnection(physicalDatabaseName,user,password);
}
Program: 80035
Project: 80035
Buggy source:
/** 
 * Drop a User from the DataDictionary
 * @param ad	The AliasDescriptor to drop
 * @param tc	The TransactionController
 * @exception StandardException		Thrown on failure
 */
public void dropUser(String userName,TransactionController tc) throws StandardException {
  TabInfoImpl ti=getNonCoreTI(SYSUSERS_CATALOG_NUM);
  ExecIndexRow keyRow1=(ExecIndexRow)exFactory.getIndexableRow(1);
  keyRow1.setColumn(1,new SQLVarchar(userName));
  ti.deleteRow(tc,keyRow1,SYSUSERSRowFactory.SYSUSERS_INDEX1_ID);
}

Fixed version (ground truth):
/** 
 * Drop a User from the DataDictionary
 * @param userName The user to drop.
 * @param tc	The TransactionController
 * @exception StandardException		Thrown on failure
 */
public void dropUser(String userName,TransactionController tc) throws StandardException {
  TabInfoImpl ti=getNonCoreTI(SYSUSERS_CATALOG_NUM);
  ExecIndexRow keyRow1=(ExecIndexRow)exFactory.getIndexableRow(1);
  keyRow1.setColumn(1,new SQLVarchar(userName));
  ti.deleteRow(tc,keyRow1,SYSUSERSRowFactory.SYSUSERS_INDEX1_ID);
}
Program: 80036
Project: 80036
Buggy source:
/** 
 * @see java.sql.ResultSet#next
 * @exception SQLException If database-access error occurs.
 */
public boolean next() throws SQLException {
  if (!gotFile) {
    gotFile=true;
    try {
      inputFileStreamReader=new InputStreamReader(new FileInputStream(inputFileName));
      bufferedReader=new BufferedReader(inputFileStreamReader,32 * 1024);
    }
 catch (    FileNotFoundException ex) {
      throw new SQLException(ex.getMessage());
    }
  }
  while (true) {
    try {
      line=bufferedReader.readLine();
    }
 catch (    java.io.IOException ioe) {
      throw new SQLException(ioe.getMessage());
    }
    if (line == null) {
      return false;
    }
    gmtIndex=line.indexOf(GMT_STRING);
    threadIndex=line.indexOf(BEGIN_THREAD_STRING);
    xidIndex=line.indexOf(BEGIN_XID_STRING);
    lccidIndex=line.indexOf(BEGIN_XID_STRING,xidIndex + 1);
    databaseIndex=line.indexOf(BEGIN_DATABASE_STRING,lccidIndex + 1);
    drdaidIndex=line.indexOf(BEGIN_DRDAID_STRING,databaseIndex + 1);
    if (line.indexOf(PARAMETERS_STRING) != -1) {
      continue;
    }
    if (gmtIndex != -1 && threadIndex != -1 && xidIndex != -1 && databaseIndex != -1) {
      return true;
    }
  }
}

Fixed version (ground truth):
/** 
 * @see java.sql.ResultSet#next
 * @exception SQLException If database-access error occurs.
 */
public boolean next() throws SQLException {
  if (!gotFile) {
    gotFile=true;
    try {
      inputFileStreamReader=new InputStreamReader(new FileInputStream(inputFileName));
      bufferedReader=new BufferedReader(inputFileStreamReader,32 * 1024);
    }
 catch (    FileNotFoundException ex) {
      throw new SQLException(ex.getMessage());
    }
  }
  while (true) {
    try {
      line=bufferedReader.readLine();
    }
 catch (    java.io.IOException ioe) {
      throw new SQLException(ioe.getMessage());
    }
    if (line == null) {
      return false;
    }
    endTimestampIndex=line.indexOf(END_TIMESTAMP);
    threadIndex=line.indexOf(BEGIN_THREAD_STRING);
    xidIndex=line.indexOf(BEGIN_XID_STRING);
    lccidIndex=line.indexOf(BEGIN_XID_STRING,xidIndex + 1);
    databaseIndex=line.indexOf(BEGIN_DATABASE_STRING,lccidIndex + 1);
    drdaidIndex=line.indexOf(BEGIN_DRDAID_STRING,databaseIndex + 1);
    if (line.indexOf(PARAMETERS_STRING) != -1) {
      continue;
    }
    if (endTimestampIndex != -1 && threadIndex != -1 && xidIndex != -1 && databaseIndex != -1) {
      return true;
    }
  }
}
Program: 80039
Project: 80039
Buggy source:
private String setupColumn(int columnNumber) throws SQLException {
switch (columnNumber) {
case 1:
    return line.substring(0,gmtIndex);
case 2:
  return line.substring(threadIndex + 1,line.indexOf(END_THREAD_STRING));
case 3:
return line.substring(xidIndex + 2,line.indexOf(END_XID_STRING,xidIndex));
case 4:
return line.substring(lccidIndex + 2,line.indexOf(END_XID_STRING,lccidIndex));
case 5:
StringBuffer output=new StringBuffer(64);
if (line.indexOf(BEGIN_EXECUTING_STRING) == -1) {
output.append(line.substring(line.indexOf(END_XID_STRING,lccidIndex) + 3));
}
 else {
int endIndex=line.indexOf(END_EXECUTING_STRING,lccidIndex);
if (endIndex == -1) {
output.append(line.substring(line.indexOf(END_XID_STRING,lccidIndex) + 3));
}
 else {
output.append(line.substring(line.indexOf(END_XID_STRING,lccidIndex) + 3,endIndex));
}
while (endIndex == -1) {
try {
line=bufferedReader.readLine();
}
 catch (java.io.IOException ioe) {
throw new SQLException("String_Node_Str" + ioe);
}
endIndex=line.indexOf(END_EXECUTING_STRING);
if (endIndex == -1) {
output.append(line);
}
 else {
output.append(line.substring(0,endIndex));
}
}
}
return StringUtil.truncate(output.toString(),Limits.DB2_VARCHAR_MAXWIDTH);
default :
return null;
}
}

Fixed version (ground truth):
private String setupColumn(int columnNumber) throws SQLException {
switch (columnNumber) {
case 1:
    return line.substring(0,endTimestampIndex);
case 2:
  return line.substring(threadIndex + 1,line.indexOf(END_THREAD_STRING));
case 3:
return line.substring(xidIndex + 2,line.indexOf(END_XID_STRING,xidIndex));
case 4:
return line.substring(lccidIndex + 2,line.indexOf(END_XID_STRING,lccidIndex));
case 5:
StringBuffer output=new StringBuffer(64);
if (line.indexOf(BEGIN_EXECUTING_STRING) == -1) {
output.append(line.substring(line.indexOf(END_XID_STRING,lccidIndex) + 3));
}
 else {
int endIndex=line.indexOf(END_EXECUTING_STRING,lccidIndex);
if (endIndex == -1) {
output.append(line.substring(line.indexOf(END_XID_STRING,lccidIndex) + 3));
}
 else {
output.append(line.substring(line.indexOf(END_XID_STRING,lccidIndex) + 3,endIndex));
}
while (endIndex == -1) {
try {
line=bufferedReader.readLine();
}
 catch (java.io.IOException ioe) {
throw new SQLException("String_Node_Str" + ioe);
}
endIndex=line.indexOf(END_EXECUTING_STRING);
if (endIndex == -1) {
output.append(line);
}
 else {
output.append(line.substring(0,endIndex));
}
}
}
return StringUtil.truncate(output.toString(),Limits.DB2_VARCHAR_MAXWIDTH);
default :
return null;
}
}
Program: 80040
Project: 80040
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTest(TestConfiguration.defaultSuite(SysDiagVTIMappingTest.class));
  return SecurityManagerSetup.noSecurityManager(new SupportFilesSetup(suite,new String[]{"String_Node_Str" + testLogFile}));
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  Test defaultSetup=TestConfiguration.defaultSuite(SysDiagVTIMappingTest.class);
  Properties sysprops=new Properties();
  sysprops.put("String_Node_Str","String_Node_Str");
  Test verboseTest=new SystemPropertyTestSetup(defaultSetup,sysprops);
  suite.addTest(verboseTest);
  return SecurityManagerSetup.noSecurityManager(new SupportFilesSetup(suite,new String[]{"String_Node_Str" + testLogFile}));
}
Program: 80042
Project: 80042
Buggy source:
/** 
 * Adjust input text to remove junk which confuses the xml parser and/or Forrest. Temporarily writes the adjusted text to the output file.
 */
private void normalizeText(File inputFile,File outputFile) throws Exception {
  String rawString=readFileIntoString(inputFile);
  rawString=fullReplaceToken(rawString,"String_Node_Str","String_Node_Str");
  rawString=fullReplaceToken(rawString,"String_Node_Str","String_Node_Str");
  rawString.replace('[','(');
  rawString.replace(']',')');
  FileWriter fileWriter=new FileWriter(outputFile);
  fileWriter.append(rawString);
  fileWriter.flush();
  fileWriter.close();
}

Fixed version (ground truth):
/** 
 * Adjust input text to remove junk which confuses the xml parser and/or Forrest. Temporarily writes the adjusted text to the output file.
 */
private void normalizeText(File inputFile,File outputFile) throws Exception {
  String rawString=readFileIntoString(inputFile);
  rawString=fullReplaceToken(rawString,"String_Node_Str","String_Node_Str");
  rawString=fullReplaceToken(rawString,"String_Node_Str","String_Node_Str");
  rawString=rawString.replace('[','(');
  rawString=rawString.replace(']',')');
  FileWriter fileWriter=new FileWriter(outputFile);
  fileWriter.append(rawString);
  fileWriter.flush();
  fileWriter.close();
}
Program: 80043
Project: 80043
Buggy source:
public Driver getWrappedObject() throws SQLException {
  if (_embedded != null) {
    return _embedded;
  }
 else   if (_netclient != null) {
    return _netclient;
  }
 else {
    throw nothingWrapped();
  }
}

Fixed version (ground truth):
public Driver getWrappedObject() throws SQLException {
  if (_embedded != null) {
    return _embedded;
  }
 else   if (_driver40 != null) {
    return _driver40;
  }
 else   if (_netclient != null) {
    return _netclient;
  }
 else {
    throw nothingWrapped(null);
  }
}
Program: 80044
Project: 80044
Buggy source:
public Logger getParentLogger() throws SQLException {
  if (_embedded != null) {
    return _embedded.getParentLogger();
  }
 else   if (_netclient != null) {
    return _netclient.getParentLogger();
  }
 else {
    throw nothingWrapped();
  }
}

Fixed version (ground truth):
public Logger getParentLogger() throws SQLException {
  if (_embedded != null) {
    return _embedded.getParentLogger();
  }
 else   if (_driver40 != null) {
    return _driver40.getParentLogger();
  }
 else   if (_netclient != null) {
    return _netclient.getParentLogger();
  }
 else {
    throw nothingWrapped(null);
  }
}
Program: 80045
Project: 80045
Buggy source:
public Wrapper41Driver(Object wrapped) throws Exception {
  if (wrapped instanceof AutoloadedDriver40) {
    _embedded=(AutoloadedDriver40)wrapped;
  }
 else   if (wrapped instanceof ClientDriver40) {
    _netclient=(ClientDriver40)wrapped;
  }
 else {
    throw nothingWrapped();
  }
}

Fixed version (ground truth):
public Wrapper41Driver(Object wrapped) throws Exception {
  if (wrapped instanceof AutoloadedDriver40) {
    _embedded=(AutoloadedDriver40)wrapped;
  }
 else   if (wrapped instanceof Driver40) {
    _driver40=(Driver40)wrapped;
  }
 else   if (wrapped instanceof ClientDriver40) {
    _netclient=(ClientDriver40)wrapped;
  }
 else {
    throw nothingWrapped(wrapped);
  }
}
Program: 80046
Project: 80046
Buggy source:
private SQLException nothingWrapped(){
  return new SQLException("String_Node_Str");
}

Fixed version (ground truth):
private SQLException nothingWrapped(Object wrapped){
  String wrappedString=(wrapped == null ? "String_Node_Str" : wrapped.getClass().getName());
  return new SQLException("String_Node_Str" + wrappedString);
}
Program: 80047
Project: 80047
Buggy source:
/** 
 * Return the length of a timestamp depending on whether timestamps should have full nanosecond precision or be truncated to just microseconds. java.sql.Timestamp is converted to a character representation which is a DERBY string  representation of a timestamp converted to bytes using UTF8 encoding. For Derby 10.6 and above, this is <code>yyyy-mm-dd-hh.mm.ss.fffffffff</code>. For Derby 10.5 and below, this is <code>yyyy-mm-dd-hh.mm.ss.ffffff</code>. See DERBY-2602. and then converted to bytes using UTF8 encoding
 * @param supportsTimestampNanoseconds true if the connection supports nanoseconds in timestamps
 */
public static int getTimestampLength(boolean supportsTimestampNanoseconds){
  return supportsTimestampNanoseconds ? DRDAConstants.JDBC_TIMESTAMP_LENGTH : DRDAConstants.DRDA_TIMESTAMP_LENGTH;
}

Fixed version (ground truth):
/** 
 * Return the length of a timestamp depending on whether timestamps should have full nanosecond precision or be truncated to just microseconds. java.sql.Timestamp is converted to a character representation which is a DERBY string  representation of a timestamp converted to bytes using UTF8 encoding. For Derby 10.6 and above, this is <code>yyyy-mm-dd-hh.mm.ss.fffffffff</code>. For Derby 10.5 and below, this is <code>yyyy-mm-dd-hh.mm.ss.ffffff</code>. See DERBY-2602. and then converted to bytes using UTF8 encoding
 * @param supportsTimestampNanoseconds true if the connection supports nanoseconds in timestamps
 */
public static int getTimestampLength(boolean supportsTimestampNanoseconds){
  return supportsTimestampNanoseconds ? DRDAConstants.JDBC_TIMESTAMP_LENGTH : DRDAConstants.DRDA_OLD_TIMESTAMP_LENGTH;
}
Program: 80048
Project: 80048
Buggy source:
/** 
 * The timestamp length may be truncated for old versions of Derby. See DERBY-2602.
 */
protected int getTimestampLength(){
  return supportsTimestampNanoseconds() ? DRDAConstants.JDBC_TIMESTAMP_LENGTH : DRDAConstants.DRDA_TIMESTAMP_LENGTH;
}

Fixed version (ground truth):
/** 
 * The timestamp length may be truncated for old versions of Derby. See DERBY-2602.
 */
protected int getTimestampLength(){
  return supportsTimestampNanoseconds() ? DRDAConstants.JDBC_TIMESTAMP_LENGTH : DRDAConstants.DRDA_OLD_TIMESTAMP_LENGTH;
}
Program: 80049
Project: 80049
Buggy source:
final byte getByte(int column) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.BOOLEAN:
    return agent_.crossConverters_.getByteFromBoolean(get_BOOLEAN(column));
case java.sql.Types.SMALLINT:
  return agent_.crossConverters_.getByteFromShort(get_SMALLINT(column));
case java.sql.Types.INTEGER:
return agent_.crossConverters_.getByteFromInt(get_INTEGER(column));
case java.sql.Types.BIGINT:
return agent_.crossConverters_.getByteFromLong(get_BIGINT(column));
case java.sql.Types.REAL:
return agent_.crossConverters_.getByteFromFloat(get_FLOAT(column));
case java.sql.Types.DOUBLE:
return agent_.crossConverters_.getByteFromDouble(get_DOUBLE(column));
case java.sql.Types.DECIMAL:
return agent_.crossConverters_.getByteFromLong(getLongFromDECIMAL(column));
case java.sql.Types.CHAR:
return agent_.crossConverters_.getByteFromString(getCHAR(column));
case java.sql.Types.VARCHAR:
case java.sql.Types.LONGVARCHAR:
return agent_.crossConverters_.getByteFromString(getVARCHAR(column));
default :
throw new ColumnTypeConversionException(agent_.logWriter_,"String_Node_Str" + jdbcTypes_[column - 1],"String_Node_Str");
}
}

Fixed version (ground truth):
final byte getByte(int column) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.BOOLEAN:
    return agent_.crossConverters_.getByteFromBoolean(get_BOOLEAN(column));
case java.sql.Types.SMALLINT:
  return agent_.crossConverters_.getByteFromShort(get_SMALLINT(column));
case java.sql.Types.INTEGER:
return agent_.crossConverters_.getByteFromInt(get_INTEGER(column));
case java.sql.Types.BIGINT:
return agent_.crossConverters_.getByteFromLong(get_BIGINT(column));
case java.sql.Types.REAL:
return agent_.crossConverters_.getByteFromFloat(get_FLOAT(column));
case java.sql.Types.DOUBLE:
return agent_.crossConverters_.getByteFromDouble(get_DOUBLE(column));
case java.sql.Types.DECIMAL:
return agent_.crossConverters_.getByteFromLong(getLongFromDECIMAL(column));
case java.sql.Types.CHAR:
return agent_.crossConverters_.getByteFromString(getCHAR(column));
case java.sql.Types.VARCHAR:
case java.sql.Types.LONGVARCHAR:
return agent_.crossConverters_.getByteFromString(getVARCHAR(column));
default :
throw coercionError("String_Node_Str",column);
}
}
Program: 80050
Project: 80050
Buggy source:
final java.math.BigDecimal getBigDecimal(int column) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.BOOLEAN:
    return java.math.BigDecimal.valueOf(getLong(column));
case java.sql.Types.DECIMAL:
  return get_DECIMAL(column);
case java.sql.Types.REAL:
float f=get_FLOAT(column);
return new java.math.BigDecimal(String.valueOf(f));
case java.sql.Types.DOUBLE:
return new java.math.BigDecimal(String.valueOf(get_DOUBLE(column)));
case java.sql.Types.SMALLINT:
return java.math.BigDecimal.valueOf(get_SMALLINT(column));
case java.sql.Types.INTEGER:
return java.math.BigDecimal.valueOf(get_INTEGER(column));
case java.sql.Types.BIGINT:
return java.math.BigDecimal.valueOf(get_BIGINT(column));
case java.sql.Types.CHAR:
return agent_.crossConverters_.getBigDecimalFromString(getCHAR(column));
case java.sql.Types.VARCHAR:
case java.sql.Types.LONGVARCHAR:
return agent_.crossConverters_.getBigDecimalFromString(getVARCHAR(column));
default :
throw new ColumnTypeConversionException(agent_.logWriter_,"String_Node_Str" + jdbcTypes_[column - 1],"String_Node_Str");
}
}

Fixed version (ground truth):
final java.math.BigDecimal getBigDecimal(int column) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.BOOLEAN:
    return java.math.BigDecimal.valueOf(getLong(column));
case java.sql.Types.DECIMAL:
  return get_DECIMAL(column);
case java.sql.Types.REAL:
float f=get_FLOAT(column);
return new java.math.BigDecimal(String.valueOf(f));
case java.sql.Types.DOUBLE:
return new java.math.BigDecimal(String.valueOf(get_DOUBLE(column)));
case java.sql.Types.SMALLINT:
return java.math.BigDecimal.valueOf(get_SMALLINT(column));
case java.sql.Types.INTEGER:
return java.math.BigDecimal.valueOf(get_INTEGER(column));
case java.sql.Types.BIGINT:
return java.math.BigDecimal.valueOf(get_BIGINT(column));
case java.sql.Types.CHAR:
return agent_.crossConverters_.getBigDecimalFromString(getCHAR(column));
case java.sql.Types.VARCHAR:
case java.sql.Types.LONGVARCHAR:
return agent_.crossConverters_.getBigDecimalFromString(getVARCHAR(column));
default :
throw coercionError("String_Node_Str",column);
}
}
Program: 80051
Project: 80051
Buggy source:
public final java.sql.Clob getClob(int column) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case Types.CLOB:
    return getClobColumn_(column,agent_,true);
default :
  throw new ColumnTypeConversionException(agent_.logWriter_,"String_Node_Str" + jdbcTypes_[column - 1],"String_Node_Str");
}
}

Fixed version (ground truth):
public final java.sql.Clob getClob(int column) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case Types.CLOB:
    return getClobColumn_(column,agent_,true);
default :
  throw coercionError("String_Node_Str",column);
}
}
Program: 80052
Project: 80052
Buggy source:
public final java.io.InputStream getAsciiStream(int column) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.CLOB:
    Clob c=getClobColumn_(column,agent_,false);
  if (c.isLocator()) {
    ClobLocatorInputStream is=new ClobLocatorInputStream(agent_.connection_,c);
    return new BufferedInputStream(is);
  }
 else {
    return c.getAsciiStreamX();
  }
case java.sql.Types.CHAR:
try {
  return new java.io.ByteArrayInputStream(getCHAR(column).getBytes("String_Node_Str"));
}
 catch (java.io.UnsupportedEncodingException e) {
  throw new SqlException(agent_.logWriter_,new ClientMessageId(SQLState.UNSUPPORTED_ENCODING),"String_Node_Str","String_Node_Str",e);
}
case java.sql.Types.VARCHAR:
case java.sql.Types.LONGVARCHAR:
try {
return new java.io.ByteArrayInputStream(getVARCHAR(column).getBytes("String_Node_Str"));
}
 catch (java.io.UnsupportedEncodingException e) {
throw new SqlException(agent_.logWriter_,new ClientMessageId(SQLState.UNSUPPORTED_ENCODING),"String_Node_Str","String_Node_Str",e);
}
case java.sql.Types.BINARY:
return new java.io.ByteArrayInputStream(get_CHAR_FOR_BIT_DATA(column));
case java.sql.Types.VARBINARY:
case java.sql.Types.LONGVARBINARY:
return new java.io.ByteArrayInputStream(get_VARCHAR_FOR_BIT_DATA(column));
case java.sql.Types.BLOB:
return getBinaryStream(column);
default :
throw new ColumnTypeConversionException(agent_.logWriter_,"String_Node_Str" + jdbcTypes_[column - 1],"String_Node_Str");
}
}

Fixed version (ground truth):
public final java.io.InputStream getAsciiStream(int column) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.CLOB:
    Clob c=getClobColumn_(column,agent_,false);
  if (c.isLocator()) {
    ClobLocatorInputStream is=new ClobLocatorInputStream(agent_.connection_,c);
    return new BufferedInputStream(is);
  }
 else {
    return c.getAsciiStreamX();
  }
case java.sql.Types.CHAR:
try {
  return new java.io.ByteArrayInputStream(getCHAR(column).getBytes("String_Node_Str"));
}
 catch (java.io.UnsupportedEncodingException e) {
  throw new SqlException(agent_.logWriter_,new ClientMessageId(SQLState.UNSUPPORTED_ENCODING),"String_Node_Str","String_Node_Str",e);
}
case java.sql.Types.VARCHAR:
case java.sql.Types.LONGVARCHAR:
try {
return new java.io.ByteArrayInputStream(getVARCHAR(column).getBytes("String_Node_Str"));
}
 catch (java.io.UnsupportedEncodingException e) {
throw new SqlException(agent_.logWriter_,new ClientMessageId(SQLState.UNSUPPORTED_ENCODING),"String_Node_Str","String_Node_Str",e);
}
case java.sql.Types.BINARY:
return new java.io.ByteArrayInputStream(get_CHAR_FOR_BIT_DATA(column));
case java.sql.Types.VARBINARY:
case java.sql.Types.LONGVARBINARY:
return new java.io.ByteArrayInputStream(get_VARCHAR_FOR_BIT_DATA(column));
case java.sql.Types.BLOB:
return getBinaryStream(column);
default :
throw coercionError("String_Node_Str",column);
}
}
Program: 80053
Project: 80053
Buggy source:
final byte[] getBytes(int column) throws SqlException {
  try {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.BINARY:
      return get_CHAR_FOR_BIT_DATA(column);
case java.sql.Types.VARBINARY:
case java.sql.Types.LONGVARBINARY:
    return get_VARCHAR_FOR_BIT_DATA(column);
case java.sql.Types.BLOB:
  Blob b=getBlobColumn_(column,agent_,false);
byte[] bytes=b.getBytes(1,(int)b.length());
return bytes;
default :
throw new ColumnTypeConversionException(agent_.logWriter_,"String_Node_Str" + jdbcTypes_[column - 1],"String_Node_Str");
}
}
 catch (SQLException se) {
throw new SqlException(se);
}
}

Fixed version (ground truth):
final byte[] getBytes(int column) throws SqlException {
  try {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.BINARY:
      return get_CHAR_FOR_BIT_DATA(column);
case java.sql.Types.VARBINARY:
case java.sql.Types.LONGVARBINARY:
    return get_VARCHAR_FOR_BIT_DATA(column);
case java.sql.Types.BLOB:
  Blob b=getBlobColumn_(column,agent_,false);
byte[] bytes=b.getBytes(1,(int)b.length());
return bytes;
default :
throw coercionError("String_Node_Str",column);
}
}
 catch (SQLException se) {
throw new SqlException(se);
}
}
Program: 80054
Project: 80054
Buggy source:
public final Object getObject(int column) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.BOOLEAN:
    return new Boolean(get_BOOLEAN(column));
case java.sql.Types.SMALLINT:
  return new Integer(get_SMALLINT(column));
case java.sql.Types.INTEGER:
return new Integer(get_INTEGER(column));
case java.sql.Types.BIGINT:
return new Long(get_BIGINT(column));
case java.sql.Types.REAL:
return new Float(get_FLOAT(column));
case java.sql.Types.DOUBLE:
return new Double(get_DOUBLE(column));
case java.sql.Types.DECIMAL:
return get_DECIMAL(column);
case java.sql.Types.DATE:
return getDATE(column,getRecyclableCalendar());
case java.sql.Types.TIME:
return getTIME(column,getRecyclableCalendar());
case java.sql.Types.TIMESTAMP:
return getTIMESTAMP(column,getRecyclableCalendar());
case java.sql.Types.CHAR:
return getCHAR(column);
case java.sql.Types.VARCHAR:
case java.sql.Types.LONGVARCHAR:
return getVARCHAR(column);
case Types.BINARY:
return get_CHAR_FOR_BIT_DATA(column);
case java.sql.Types.VARBINARY:
case java.sql.Types.LONGVARBINARY:
return get_VARCHAR_FOR_BIT_DATA(column);
case java.sql.Types.JAVA_OBJECT:
return get_UDT(column);
case java.sql.Types.BLOB:
return getBlobColumn_(column,agent_,true);
case java.sql.Types.CLOB:
return getClobColumn_(column,agent_,true);
default :
throw new ColumnTypeConversionException(agent_.logWriter_,"String_Node_Str" + jdbcTypes_[column - 1],"String_Node_Str");
}
}

Fixed version (ground truth):
public final Object getObject(int column) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.BOOLEAN:
    return new Boolean(get_BOOLEAN(column));
case java.sql.Types.SMALLINT:
  return new Integer(get_SMALLINT(column));
case java.sql.Types.INTEGER:
return new Integer(get_INTEGER(column));
case java.sql.Types.BIGINT:
return new Long(get_BIGINT(column));
case java.sql.Types.REAL:
return new Float(get_FLOAT(column));
case java.sql.Types.DOUBLE:
return new Double(get_DOUBLE(column));
case java.sql.Types.DECIMAL:
return get_DECIMAL(column);
case java.sql.Types.DATE:
return getDATE(column,getRecyclableCalendar());
case java.sql.Types.TIME:
return getTIME(column,getRecyclableCalendar());
case java.sql.Types.TIMESTAMP:
return getTIMESTAMP(column,getRecyclableCalendar());
case java.sql.Types.CHAR:
return getCHAR(column);
case java.sql.Types.VARCHAR:
case java.sql.Types.LONGVARCHAR:
return getVARCHAR(column);
case Types.BINARY:
return get_CHAR_FOR_BIT_DATA(column);
case java.sql.Types.VARBINARY:
case java.sql.Types.LONGVARBINARY:
return get_VARCHAR_FOR_BIT_DATA(column);
case java.sql.Types.JAVA_OBJECT:
return get_UDT(column);
case java.sql.Types.BLOB:
return getBlobColumn_(column,agent_,true);
case java.sql.Types.CLOB:
return getClobColumn_(column,agent_,true);
default :
throw coercionError("String_Node_Str",column);
}
}
Program: 80055
Project: 80055
Buggy source:
final int getInt(int column) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.BOOLEAN:
    return agent_.crossConverters_.getIntFromBoolean(get_BOOLEAN(column));
case java.sql.Types.SMALLINT:
  return (int)get_SMALLINT(column);
case java.sql.Types.INTEGER:
return get_INTEGER(column);
case java.sql.Types.BIGINT:
return agent_.crossConverters_.getIntFromLong(get_BIGINT(column));
case java.sql.Types.REAL:
return agent_.crossConverters_.getIntFromFloat(get_FLOAT(column));
case java.sql.Types.DOUBLE:
return agent_.crossConverters_.getIntFromDouble(get_DOUBLE(column));
case java.sql.Types.DECIMAL:
return agent_.crossConverters_.getIntFromLong(getLongFromDECIMAL(column));
case java.sql.Types.CHAR:
return agent_.crossConverters_.getIntFromString(getCHAR(column));
case java.sql.Types.VARCHAR:
case java.sql.Types.LONGVARCHAR:
return agent_.crossConverters_.getIntFromString(getVARCHAR(column));
default :
throw new ColumnTypeConversionException(agent_.logWriter_,"String_Node_Str" + jdbcTypes_[column - 1],"String_Node_Str");
}
}

Fixed version (ground truth):
final int getInt(int column) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.BOOLEAN:
    return agent_.crossConverters_.getIntFromBoolean(get_BOOLEAN(column));
case java.sql.Types.SMALLINT:
  return (int)get_SMALLINT(column);
case java.sql.Types.INTEGER:
return get_INTEGER(column);
case java.sql.Types.BIGINT:
return agent_.crossConverters_.getIntFromLong(get_BIGINT(column));
case java.sql.Types.REAL:
return agent_.crossConverters_.getIntFromFloat(get_FLOAT(column));
case java.sql.Types.DOUBLE:
return agent_.crossConverters_.getIntFromDouble(get_DOUBLE(column));
case java.sql.Types.DECIMAL:
return agent_.crossConverters_.getIntFromLong(getLongFromDECIMAL(column));
case java.sql.Types.CHAR:
return agent_.crossConverters_.getIntFromString(getCHAR(column));
case java.sql.Types.VARCHAR:
case java.sql.Types.LONGVARCHAR:
return agent_.crossConverters_.getIntFromString(getVARCHAR(column));
default :
throw coercionError("String_Node_Str",column);
}
}
Program: 80056
Project: 80056
Buggy source:
final java.sql.Time getTime(int column,Calendar cal) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.TIME:
    return getTIME(column,cal);
case java.sql.Types.TIMESTAMP:
  return getTimeFromTIMESTAMP(column,cal);
case java.sql.Types.CHAR:
return agent_.crossConverters_.getTimeFromString(getCHAR(column),cal);
case java.sql.Types.VARCHAR:
case java.sql.Types.LONGVARCHAR:
return agent_.crossConverters_.getTimeFromString(getVARCHAR(column),cal);
default :
throw new ColumnTypeConversionException(agent_.logWriter_,"String_Node_Str" + jdbcTypes_[column - 1],"String_Node_Str");
}
}

Fixed version (ground truth):
final java.sql.Time getTime(int column,Calendar cal) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.TIME:
    return getTIME(column,cal);
case java.sql.Types.TIMESTAMP:
  return getTimeFromTIMESTAMP(column,cal);
case java.sql.Types.CHAR:
return agent_.crossConverters_.getTimeFromString(getCHAR(column),cal);
case java.sql.Types.VARCHAR:
case java.sql.Types.LONGVARCHAR:
return agent_.crossConverters_.getTimeFromString(getVARCHAR(column),cal);
default :
throw coercionError("String_Node_Str",column);
}
}
Program: 80057
Project: 80057
Buggy source:
public final java.io.InputStream getBinaryStream(int column) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.BINARY:
    return new java.io.ByteArrayInputStream(get_CHAR_FOR_BIT_DATA(column));
case java.sql.Types.VARBINARY:
case java.sql.Types.LONGVARBINARY:
  return new java.io.ByteArrayInputStream(get_VARCHAR_FOR_BIT_DATA(column));
case java.sql.Types.BLOB:
Blob b=getBlobColumn_(column,agent_,false);
if (b.isLocator()) {
BlobLocatorInputStream is=new BlobLocatorInputStream(agent_.connection_,b);
return new BufferedInputStream(is);
}
 else {
return b.getBinaryStreamX();
}
default :
throw new ColumnTypeConversionException(agent_.logWriter_,"String_Node_Str" + jdbcTypes_[column - 1],"String_Node_Str");
}
}

Fixed version (ground truth):
public final java.io.InputStream getBinaryStream(int column) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.BINARY:
    return new java.io.ByteArrayInputStream(get_CHAR_FOR_BIT_DATA(column));
case java.sql.Types.VARBINARY:
case java.sql.Types.LONGVARBINARY:
  return new java.io.ByteArrayInputStream(get_VARCHAR_FOR_BIT_DATA(column));
case java.sql.Types.BLOB:
Blob b=getBlobColumn_(column,agent_,false);
if (b.isLocator()) {
BlobLocatorInputStream is=new BlobLocatorInputStream(agent_.connection_,b);
return new BufferedInputStream(is);
}
 else {
return b.getBinaryStreamX();
}
default :
throw coercionError("String_Node_Str",column);
}
}
Program: 80058
Project: 80058
Buggy source:
final double getDouble(int column) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.BOOLEAN:
    return agent_.crossConverters_.getDoubleFromBoolean(get_BOOLEAN(column));
case java.sql.Types.REAL:
  double d=(double)get_FLOAT(column);
return d;
case java.sql.Types.DOUBLE:
return get_DOUBLE(column);
case java.sql.Types.DECIMAL:
return getDoubleFromDECIMAL(column);
case java.sql.Types.SMALLINT:
return (double)get_SMALLINT(column);
case java.sql.Types.INTEGER:
return (double)get_INTEGER(column);
case java.sql.Types.BIGINT:
return (double)get_BIGINT(column);
case java.sql.Types.CHAR:
return agent_.crossConverters_.getDoubleFromString(getCHAR(column));
case java.sql.Types.VARCHAR:
case java.sql.Types.LONGVARCHAR:
return agent_.crossConverters_.getDoubleFromString(getVARCHAR(column));
default :
throw new ColumnTypeConversionException(agent_.logWriter_,"String_Node_Str" + jdbcTypes_[column - 1],"String_Node_Str");
}
}

Fixed version (ground truth):
final double getDouble(int column) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.BOOLEAN:
    return agent_.crossConverters_.getDoubleFromBoolean(get_BOOLEAN(column));
case java.sql.Types.REAL:
  double d=(double)get_FLOAT(column);
return d;
case java.sql.Types.DOUBLE:
return get_DOUBLE(column);
case java.sql.Types.DECIMAL:
return getDoubleFromDECIMAL(column);
case java.sql.Types.SMALLINT:
return (double)get_SMALLINT(column);
case java.sql.Types.INTEGER:
return (double)get_INTEGER(column);
case java.sql.Types.BIGINT:
return (double)get_BIGINT(column);
case java.sql.Types.CHAR:
return agent_.crossConverters_.getDoubleFromString(getCHAR(column));
case java.sql.Types.VARCHAR:
case java.sql.Types.LONGVARCHAR:
return agent_.crossConverters_.getDoubleFromString(getVARCHAR(column));
default :
throw coercionError("String_Node_Str",column);
}
}
Program: 80059
Project: 80059
Buggy source:
final float getFloat(int column) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.BOOLEAN:
    return agent_.crossConverters_.getFloatFromBoolean(get_BOOLEAN(column));
case java.sql.Types.REAL:
  return get_FLOAT(column);
case java.sql.Types.DOUBLE:
return agent_.crossConverters_.getFloatFromDouble(get_DOUBLE(column));
case java.sql.Types.DECIMAL:
return agent_.crossConverters_.getFloatFromDouble(getDoubleFromDECIMAL(column));
case java.sql.Types.SMALLINT:
return (float)get_SMALLINT(column);
case java.sql.Types.INTEGER:
return (float)get_INTEGER(column);
case java.sql.Types.BIGINT:
return (float)get_BIGINT(column);
case java.sql.Types.CHAR:
return agent_.crossConverters_.getFloatFromString(getCHAR(column));
case java.sql.Types.VARCHAR:
case java.sql.Types.LONGVARCHAR:
return agent_.crossConverters_.getFloatFromString(getVARCHAR(column));
default :
throw new ColumnTypeConversionException(agent_.logWriter_,"String_Node_Str" + jdbcTypes_[column - 1],"String_Node_Str");
}
}

Fixed version (ground truth):
final float getFloat(int column) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.BOOLEAN:
    return agent_.crossConverters_.getFloatFromBoolean(get_BOOLEAN(column));
case java.sql.Types.REAL:
  return get_FLOAT(column);
case java.sql.Types.DOUBLE:
return agent_.crossConverters_.getFloatFromDouble(get_DOUBLE(column));
case java.sql.Types.DECIMAL:
return agent_.crossConverters_.getFloatFromDouble(getDoubleFromDECIMAL(column));
case java.sql.Types.SMALLINT:
return (float)get_SMALLINT(column);
case java.sql.Types.INTEGER:
return (float)get_INTEGER(column);
case java.sql.Types.BIGINT:
return (float)get_BIGINT(column);
case java.sql.Types.CHAR:
return agent_.crossConverters_.getFloatFromString(getCHAR(column));
case java.sql.Types.VARCHAR:
case java.sql.Types.LONGVARCHAR:
return agent_.crossConverters_.getFloatFromString(getVARCHAR(column));
default :
throw coercionError("String_Node_Str",column);
}
}
Program: 80060
Project: 80060
Buggy source:
final java.sql.Timestamp getTimestamp(int column,Calendar cal) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.TIMESTAMP:
    return getTIMESTAMP(column,cal);
case java.sql.Types.DATE:
  return getTimestampFromDATE(column,cal);
case java.sql.Types.TIME:
return getTimestampFromTIME(column,cal);
case java.sql.Types.CHAR:
return agent_.crossConverters_.getTimestampFromString(getCHAR(column),cal);
case java.sql.Types.VARCHAR:
case java.sql.Types.LONGVARCHAR:
return agent_.crossConverters_.getTimestampFromString(getVARCHAR(column),cal);
default :
throw new ColumnTypeConversionException(agent_.logWriter_,"String_Node_Str" + jdbcTypes_[column - 1],"String_Node_Str");
}
}

Fixed version (ground truth):
final java.sql.Timestamp getTimestamp(int column,Calendar cal) throws SqlException {
switch (jdbcTypes_[column - 1]) {
case java.sql.Types.TIMESTAMP:
    return getTIMESTAMP(column,cal);
case java.sql.Types.DATE:
  return getTimestampFromDATE(column,cal);
case java.sql.Types.TIME:
return getTimestampFromTIME(column,cal);
case java.sql.Types.CHAR:
return agent_.crossConverters_.getTimestampFromString(getCHAR(column),cal);
case java.sql.Types.VARCHAR:
case java.sql.Types.LONGVARCHAR:
return agent_.crossConverters_.getTimestampFromString(getVARCHAR(column),cal);
default :
throw coercionError("String_Node_Str",column);
}
}