Program: 89783
Project: 89783
Buggy source:
/** 
 * Given the output of a checksum job, add the results to the database. The following fields in the table are updated for each corresponding  entry in the replicafileinfo table: <br/> - checksum = the given checksum.  <br/> - filelist_status = ok. <br/> - filelist_checkdatetime = now. <br/> - checksum_checkdatetime = now.
 * @param checksumOutput The output of a checksum job.
 * @param replica The replica this checksum job is for.
 */
@Override public void addChecksumInformation(List<ChecksumEntry> checksumOutput,Replica replica){
  ArgumentNotValid.checkNotNull(checksumOutput,"String_Node_Str");
  ArgumentNotValid.checkNotNull(replica,"String_Node_Str");
  if (!existsReplicaInDB(replica)) {
    String msg="String_Node_Str" + replica.toString() + "String_Node_Str";
    log.warn(msg);
    throw new IOFailure(msg);
  }
  for (  ChecksumEntry entry : checksumOutput) {
    String filename=entry.getFilename();
    String checksum=entry.getChecksum();
    if (!existsFileInDB(filename)) {
      log.info("String_Node_Str" + filename + "String_Node_Str"+ "String_Node_Str");
      insertFileIntoDB(filename);
    }
    long fileid=retrieveIdForFile(filename);
    if (fileid < 0) {
      insertFileIntoDB(filename);
      fileid=retrieveIdForFile(filename);
    }
    long rfiId=retrieveReplicaFileInfoGuid(fileid,replica.getId());
    if (rfiId < 0) {
      createReplicaFileInfoEntriesInDB(fileid);
      log.info("String_Node_Str" + filename + "String_Node_Str"+ replica.toString()+ "String_Node_Str");
    }
    updateReplicaFileInfoChecksum(rfiId,checksum);
    log.trace("String_Node_Str" + filename + "String_Node_Str"+ replica.toString()+ "String_Node_Str");
  }
  updateChecksumDateForReplica(replica);
  updateFilelistDateForReplica(replica);
}

Fixed version (ground truth):
/** 
 * Given the output of a checksum job, add the results to the database. The following fields in the table are updated for each corresponding  entry in the replicafileinfo table: <br/> - checksum = the given checksum.  <br/> - filelist_status = ok. <br/> - filelist_checkdatetime = now. <br/> - checksum_checkdatetime = now.
 * @param checksumOutput The output of a checksum job.
 * @param replica The replica this checksum job is for.
 */
@Override public void addChecksumInformation(List<ChecksumEntry> checksumOutput,Replica replica){
  ArgumentNotValid.checkNotNull(checksumOutput,"String_Node_Str");
  ArgumentNotValid.checkNotNull(replica,"String_Node_Str");
  if (!existsReplicaInDB(replica)) {
    String msg="String_Node_Str" + replica.toString() + "String_Node_Str";
    log.warn(msg);
    throw new IOFailure(msg);
  }
  for (  ChecksumEntry entry : checksumOutput) {
    String filename=entry.getFilename();
    String checksum=entry.getChecksum();
    if (!existsFileInDB(filename)) {
      log.info("String_Node_Str" + filename + "String_Node_Str"+ "String_Node_Str");
      insertFileIntoDB(filename);
    }
    long fileid=retrieveIdForFile(filename);
    if (fileid < 0) {
      log.warn("String_Node_Str" + filename + "String_Node_Str"+ "String_Node_Str");
      insertFileIntoDB(filename);
      fileid=retrieveIdForFile(filename);
    }
    long rfiId=retrieveReplicaFileInfoGuid(fileid,replica.getId());
    if (rfiId < 0) {
      createReplicaFileInfoEntriesInDB(fileid);
      log.info("String_Node_Str" + filename + "String_Node_Str"+ replica.toString()+ "String_Node_Str");
    }
    updateReplicaFileInfoChecksum(rfiId,checksum);
    log.trace("String_Node_Str" + filename + "String_Node_Str"+ replica.toString()+ "String_Node_Str");
  }
  updateChecksumDateForReplica(replica);
  updateFilelistDateForReplica(replica);
}