Program: 90174
Project: 90174
Buggy source:
/** 
 * Get the checksum of a single file in a bitarchive. Note that this method runs a batch job on the bitarchives, and therefore takes a long time.
 * @param ba The bitarchive to ask for checksum
 * @param filename
 * @return The MD5 checksums of the file, or the empty string if the file wasnot in the bitarchive.
 * @see ChecksumJob#parseLine(String)
 */
private List<String> getChecksums(Location ba,String filename){
  ChecksumJob checksumJob=new ChecksumJob();
  checksumJob.processOnlyFileNamed(filename);
  String res;
  try {
    PreservationArcRepositoryClient arcrep=ArcRepositoryClientFactory.getPreservationInstance();
    BatchStatus batchStatus=arcrep.batch(checksumJob,ba.getName());
    if (batchStatus.hasResultFile()) {
      ByteArrayOutputStream buf=new ByteArrayOutputStream();
      batchStatus.appendResults(buf);
      res=buf.toString();
    }
 else {
      res="String_Node_Str";
    }
  }
 catch (  NetarkivetException e) {
    log.warn("String_Node_Str" + ba + "String_Node_Str",e);
    return Collections.emptyList();
  }
  List<String> checksums=new ArrayList<String>();
  if (res.length() > 0) {
    String[] lines=res.split("String_Node_Str");
    for (    String s : lines) {
      try {
        KeyValuePair<String,String> fileChecksum=ChecksumJob.parseLine(s);
        if (!fileChecksum.getKey().equals(filename)) {
          log.debug("String_Node_Str" + fileChecksum.getKey() + "String_Node_Str"+ ba+ "String_Node_Str"+ filename+ "String_Node_Str");
        }
 else {
          checksums.add(fileChecksum.getValue());
        }
      }
 catch (      ArgumentNotValid e) {
        log.warn("String_Node_Str" + res + "String_Node_Str"+ ba+ "String_Node_Str"+ filename+ "String_Node_Str");
      }
    }
  }
  return checksums;
}

Fixed version (ground truth):
/** 
 * Get the checksum of a single file in a bitarchive. Note that this method runs a batch job on the bitarchives, and therefore takes a long time.
 * @param ba The bitarchive to ask for checksum
 * @param filename
 * @return The MD5 checksums of the file, or the empty string if the file wasnot in the bitarchive.
 * @see ChecksumJob#parseLine(String)
 */
static List<String> getChecksums(Location ba,String filename){
  ChecksumJob checksumJob=new ChecksumJob();
  checksumJob.processOnlyFileNamed(filename);
  String res;
  try {
    PreservationArcRepositoryClient arcrep=ArcRepositoryClientFactory.getPreservationInstance();
    BatchStatus batchStatus=arcrep.batch(checksumJob,ba.getName());
    if (batchStatus.hasResultFile()) {
      ByteArrayOutputStream buf=new ByteArrayOutputStream();
      batchStatus.appendResults(buf);
      res=buf.toString();
    }
 else {
      res="String_Node_Str";
    }
  }
 catch (  NetarkivetException e) {
    log.warn("String_Node_Str" + ba + "String_Node_Str",e);
    return Collections.emptyList();
  }
  List<String> checksums=new ArrayList<String>();
  if (res.length() > 0) {
    String[] lines=res.split("String_Node_Str");
    for (    String s : lines) {
      try {
        KeyValuePair<String,String> fileChecksum=ChecksumJob.parseLine(s);
        if (!fileChecksum.getKey().equals(filename)) {
          log.debug("String_Node_Str" + fileChecksum.getKey() + "String_Node_Str"+ ba+ "String_Node_Str"+ filename+ "String_Node_Str");
        }
 else {
          checksums.add(fileChecksum.getValue());
        }
      }
 catch (      ArgumentNotValid e) {
        log.warn("String_Node_Str" + res + "String_Node_Str"+ ba+ "String_Node_Str"+ filename+ "String_Node_Str");
      }
    }
  }
  return checksums;
}