Program: 89528
Project: 89528
Buggy source:
/** 
 * Generates a name for an archive(ARC/WARC) file containing metadata regarding a given job.
 * @param jobID The number of the job that generated the archive file.
 * @return A "flat" file name (i.e. no path) containing the jobID parameter and ending on "-metadata-N.(w)arc",where N is the serial number of the metadata files for this job, e.g. "42-metadata-1.(w)arc". Currently, only one file is ever made.
 * @throws ArgumentNotValid if any parameter was null.
 */
public static String getMetadataArchiveFileName(String jobID) throws ArgumentNotValid {
  ArgumentNotValid.checkNotNull(jobID,"String_Node_Str");
  if (metadataFormat == 0) {
    initializeMetadataFormat();
  }
  boolean compressionOn=compressRecords();
  String possibleGzSuffix="String_Node_Str";
  if (compressionOn) {
    possibleGzSuffix="String_Node_Str";
  }
switch (metadataFormat) {
case MDF_ARC:
    return jobID + "String_Node_Str" + 1+ "String_Node_Str"+ possibleGzSuffix;
case MDF_WARC:
  return jobID + "String_Node_Str" + 1+ "String_Node_Str"+ possibleGzSuffix;
default :
throw new ArgumentNotValid("String_Node_Str" + HarvesterSettings.METADATA_FORMAT + "String_Node_Str");
}
}

Fixed version (ground truth):
/** 
 * Generates a name for an archive(ARC/WARC) file containing metadata regarding a given job.
 * @param jobID The number of the job that generated the archive file.
 * @return A "flat" file name (i.e. no path) containing the jobID parameter and ending on "-metadata-N.(w)arc",where N is the serial number of the metadata files for this job, e.g. "42-metadata-1.(w)arc". Currently, only one file is ever made.
 * @throws ArgumentNotValid if any parameter was null.
 */
public static String getMetadataArchiveFileName(String jobID,Long harvestID) throws ArgumentNotValid {
  ArgumentNotValid.checkNotNull(jobID,"String_Node_Str");
  String collectionName="String_Node_Str";
  boolean isPrefix=false;
  if ("String_Node_Str".equals(Settings.get(HarvesterSettings.METADATA_FILENAME_FORMAT))) {
    try {
      collectionName=Settings.get(HarvesterSettings.HERITRIX_METADATA_PREFIX_COLLECTION_NAME);
      if (collectionName == null || collectionName.length() == 0) {
        collectionName=Settings.get(HarvesterSettings.HERITRIX3_METADATA_PREFIX_COLLECTION_NAME);
      }
      isPrefix=true;
    }
 catch (    UnknownID e) {
    }
  }
  if (metadataFormat == 0) {
    initializeMetadataFormat();
  }
  boolean compressionOn=compressRecords();
  String possibleGzSuffix="String_Node_Str";
  if (compressionOn) {
    possibleGzSuffix="String_Node_Str";
  }
switch (metadataFormat) {
case MDF_ARC:
    if (isPrefix) {
      return collectionName + "String_Node_Str" + jobID+ "String_Node_Str"+ harvestID+ "String_Node_Str"+ 1+ possibleGzSuffix;
    }
 else {
      return jobID + "String_Node_Str" + 1+ "String_Node_Str"+ possibleGzSuffix;
    }
case MDF_WARC:
  if (isPrefix) {
    return collectionName + "String_Node_Str" + jobID+ "String_Node_Str"+ harvestID+ "String_Node_Str"+ 1+ possibleGzSuffix;
  }
 else {
    return jobID + "String_Node_Str" + 1+ "String_Node_Str"+ possibleGzSuffix;
  }
default :
throw new ArgumentNotValid("String_Node_Str" + HarvesterSettings.METADATA_FORMAT + "String_Node_Str");
}
}