Program: 90035
Project: 90035
Buggy source:
/** 
 * Handle a reply received from a bitarchive. This method registers the information from the bitarchive in the batch status for this job, if any (otherwise logs and quits). If this is the last bitarchive we were missing replies from, notify observers with the batch status for this job.
 * @param bitarchiveBatchID  The ID of the batch job sent on to the bitarchives.
 * @param bitarchiveID       The ID of the replying bitarchive.
 * @param noOfFilesProcessed The number of files the bitarchive hasprocessed.
 * @param filesFailed        A collection of filenames of failed files inthat bitarchive. Might be null if no files failed.
 * @param remoteFile         A remote pointer to a file with results fromthat bitarchive. Might be null if job was not OK.
 * @param errMsg             An error message, if the job was not successfulon the bitarchive, or null for none.
 * @param exceptions         A list of exceptions caught duringbatch processing.
 * @throws ArgumentNotValid  If either ID is null.
 */
public void bitarchiveReply(String bitarchiveBatchID,String bitarchiveID,int noOfFilesProcessed,Collection<File> filesFailed,RemoteFile remoteFile,String errMsg,List<FileBatchJob.ExceptionOccurrence> exceptions){
  ArgumentNotValid.checkNotNullOrEmpty(bitarchiveBatchID,"String_Node_Str");
  ArgumentNotValid.checkNotNullOrEmpty(bitarchiveID,"String_Node_Str");
  ArgumentNotValid.checkNotNull(exceptions,"String_Node_Str");
  ArgumentNotValid.checkNotNegative(noOfFilesProcessed,"String_Node_Str");
  BatchJobStatus bjs=runningBatchJobs.get(bitarchiveBatchID);
  if (bjs == null) {
    log.debug("String_Node_Str" + bitarchiveBatchID + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ remoteFile+ "String_Node_Str"+ "String_Node_Str"+ runningBatchJobs.keySet());
    if (remoteFile != null) {
      remoteFile.cleanup();
    }
  }
 else {
    bjs.updateWithBitarchiveReply(bitarchiveID,noOfFilesProcessed,filesFailed,remoteFile,errMsg,exceptions);
  }
}

Fixed version (ground truth):
/** 
 * Handle a reply received from a bitarchive. This method registers the information from the bitarchive in the batch status for this job, if any (otherwise logs and quits). If this is the last bitarchive we were missing replies from, notify observers with the batch status for this job.
 * @param bitarchiveBatchID  The ID of the batch job sent on to the bitarchives.
 * @param bitarchiveID       The ID of the replying bitarchive.
 * @param noOfFilesProcessed The number of files the bitarchive hasprocessed.
 * @param filesFailed        A collection of filenames of failed files inthat bitarchive. Might be null if no files failed.
 * @param remoteFile         A remote pointer to a file with results fromthat bitarchive. Might be null if job was not OK.
 * @param errMsg             An error message, if the job was not successfulon the bitarchive, or null for none.
 * @param exceptions         A list of exceptions caught duringbatch processing.
 * @throws ArgumentNotValid  If either ID is null.
 */
public void bitarchiveReply(String bitarchiveBatchID,String bitarchiveID,int noOfFilesProcessed,Collection<File> filesFailed,RemoteFile remoteFile,String errMsg,List<FileBatchJob.ExceptionOccurrence> exceptions){
  ArgumentNotValid.checkNotNullOrEmpty(bitarchiveBatchID,"String_Node_Str");
  ArgumentNotValid.checkNotNullOrEmpty(bitarchiveID,"String_Node_Str");
  ArgumentNotValid.checkNotNegative(noOfFilesProcessed,"String_Node_Str");
  BatchJobStatus bjs=runningBatchJobs.get(bitarchiveBatchID);
  if (bjs == null) {
    log.debug("String_Node_Str" + bitarchiveBatchID + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ remoteFile+ "String_Node_Str"+ "String_Node_Str"+ runningBatchJobs.keySet());
    if (remoteFile != null) {
      remoteFile.cleanup();
    }
  }
 else {
    bjs.updateWithBitarchiveReply(bitarchiveID,noOfFilesProcessed,filesFailed,remoteFile,errMsg,exceptions);
  }
}