Program: 89718
Project: 89718
Buggy source:
/** 
 * Update a Job in persistent storage.
 * @param job The Job to update
 * @throws ArgumentNotValid If the Job is null
 * @throws UnknownID If the Job doesn't exist in the DAO
 * @throws IOFailure If writing the job to persistent storage fails
 * @throws PermissionDenied If the job has been updated behind our backs
 */
public synchronized void update(Job job){
  ArgumentNotValid.checkNotNull(job,"String_Node_Str");
  final Long jobID=job.getJobID();
  if (!exists(jobID)) {
    throw new UnknownID("String_Node_Str" + jobID + "String_Node_Str");
  }
  Connection dbconnection=DBConnect.getDBConnection();
  PreparedStatement statement=null;
  try {
    dbconnection.setAutoCommit(false);
    statement=dbconnection.prepareStatement("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    statement.setLong(1,job.getOrigHarvestDefinitionID());
    statement.setInt(2,job.getStatus().ordinal());
    statement.setInt(3,job.getPriority().ordinal());
    statement.setLong(4,job.getForceMaxObjectsPerDomain());
    statement.setLong(5,job.getMaxBytesPerDomain());
    DBUtils.setStringMaxLength(statement,6,job.getOrderXMLName(),Constants.MAX_NAME_SIZE,job,"String_Node_Str");
    final String orderreader=job.getOrderXMLdoc().asXML();
    DBUtils.setClobMaxLength(statement,7,orderreader,Constants.MAX_ORDERXML_SIZE,job,"String_Node_Str");
    DBUtils.setClobMaxLength(statement,8,job.getSeedListAsString(),Constants.MAX_COMBINED_SEED_LIST_SIZE,job,"String_Node_Str");
    statement.setInt(9,job.getHarvestNum());
    DBUtils.setStringMaxLength(statement,10,job.getHarvestErrors(),Constants.MAX_ERROR_SIZE,job,"String_Node_Str");
    DBUtils.setStringMaxLength(statement,11,job.getHarvestErrorDetails(),Constants.MAX_ERROR_DETAIL_SIZE,job,"String_Node_Str");
    DBUtils.setStringMaxLength(statement,12,job.getUploadErrors(),Constants.MAX_ERROR_SIZE,job,"String_Node_Str");
    DBUtils.setStringMaxLength(statement,13,job.getUploadErrorDetails(),Constants.MAX_ERROR_DETAIL_SIZE,job,"String_Node_Str");
    long edition=job.getEdition() + 1;
    DBUtils.setDateMaybeNull(statement,14,job.getActualStart());
    DBUtils.setDateMaybeNull(statement,15,job.getActualStop());
    statement.setInt(16,job.getDomainConfigurationMap().size());
    statement.setLong(17,edition);
    DBUtils.setDateMaybeNull(statement,18,job.getSubmittedDate());
    DBUtils.setLongMaybeNull(statement,19,job.getResubmittedAsJob());
    statement.setLong(20,job.getJobID());
    statement.setLong(21,job.getEdition());
    final int rows=statement.executeUpdate();
    if (rows == 0) {
      String message="String_Node_Str" + job.getEdition() + "String_Node_Str";
      log.debug(message);
      throw new PermissionDenied(message);
    }
    createJobConfigsEntries(dbconnection,job);
    dbconnection.commit();
    job.setEdition(edition);
  }
 catch (  SQLException e) {
    String message="String_Node_Str" + job + "String_Node_Str"+ "String_Node_Str"+ ExceptionUtils.getSQLExceptionCause(e);
    log.warn(message,e);
    throw new IOFailure(message,e);
  }
 finally {
    DBUtils.rollbackIfNeeded(dbconnection,"String_Node_Str",job);
    DBUtils.closeStatementIfOpen(statement);
  }
}

Fixed version (ground truth):
/** 
 * Update a Job in persistent storage.
 * @param job The Job to update
 * @throws ArgumentNotValid If the Job is null
 * @throws UnknownID If the Job doesn't exist in the DAO
 * @throws IOFailure If writing the job to persistent storage fails
 * @throws PermissionDenied If the job has been updated behind our backs
 */
@Override public synchronized void update(Job job){
  ArgumentNotValid.checkNotNull(job,"String_Node_Str");
  final Long jobID=job.getJobID();
  if (!exists(jobID)) {
    throw new UnknownID("String_Node_Str" + jobID + "String_Node_Str");
  }
  Connection dbconnection=DBConnect.getDBConnection();
  PreparedStatement statement=null;
  try {
    dbconnection.setAutoCommit(false);
    statement=dbconnection.prepareStatement("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    statement.setLong(1,job.getOrigHarvestDefinitionID());
    statement.setInt(2,job.getStatus().ordinal());
    statement.setInt(3,job.getPriority().ordinal());
    statement.setLong(4,job.getForceMaxObjectsPerDomain());
    statement.setLong(5,job.getMaxBytesPerDomain());
    DBUtils.setStringMaxLength(statement,6,job.getOrderXMLName(),Constants.MAX_NAME_SIZE,job,"String_Node_Str");
    final String orderreader=job.getOrderXMLdoc().asXML();
    DBUtils.setClobMaxLength(statement,7,orderreader,Constants.MAX_ORDERXML_SIZE,job,"String_Node_Str");
    DBUtils.setClobMaxLength(statement,8,job.getSeedListAsString(),Constants.MAX_COMBINED_SEED_LIST_SIZE,job,"String_Node_Str");
    statement.setInt(9,job.getHarvestNum());
    DBUtils.setStringMaxLength(statement,10,job.getHarvestErrors(),Constants.MAX_ERROR_SIZE,job,"String_Node_Str");
    DBUtils.setStringMaxLength(statement,11,job.getHarvestErrorDetails(),Constants.MAX_ERROR_DETAIL_SIZE,job,"String_Node_Str");
    DBUtils.setStringMaxLength(statement,12,job.getUploadErrors(),Constants.MAX_ERROR_SIZE,job,"String_Node_Str");
    DBUtils.setStringMaxLength(statement,13,job.getUploadErrorDetails(),Constants.MAX_ERROR_DETAIL_SIZE,job,"String_Node_Str");
    long edition=job.getEdition() + 1;
    DBUtils.setDateMaybeNull(statement,14,job.getActualStart());
    DBUtils.setDateMaybeNull(statement,15,job.getActualStop());
    statement.setInt(16,job.getDomainConfigurationMap().size());
    statement.setLong(17,edition);
    DBUtils.setDateMaybeNull(statement,18,job.getSubmittedDate());
    DBUtils.setLongMaybeNull(statement,19,job.getResubmittedAsJob());
    statement.setLong(20,job.getJobID());
    statement.setLong(21,job.getEdition());
    final int rows=statement.executeUpdate();
    if (rows == 0) {
      String message="String_Node_Str" + job.getEdition() + "String_Node_Str";
      log.debug(message);
      throw new PermissionDenied(message);
    }
    createJobConfigsEntries(dbconnection,job);
    dbconnection.commit();
    job.setEdition(edition);
  }
 catch (  SQLException e) {
    String message="String_Node_Str" + job + "String_Node_Str"+ "String_Node_Str"+ ExceptionUtils.getSQLExceptionCause(e);
    log.warn(message,e);
    throw new IOFailure(message,e);
  }
 finally {
    DBUtils.rollbackIfNeeded(dbconnection,"String_Node_Str",job);
    DBUtils.closeStatementIfOpen(statement);
  }
}