Program: 89891
Project: 89891
Buggy source:
/** 
 * Retrieves the names of all the files in the replica through a  GetAllFilenamesMessage. This is the checksum archive alternative to running a FilelistBatchJob. 
 * @param replicaId The id of the replica from which the list of filenamesshould be retrieved.
 * @return A list of all the filenames within the archive of the given replica.
 * @see dk.netarkivet.archive.checksum.distribute.GetAllFilenamesMessage
 */
public File getAllFilenames(String replicaId){
  ArgumentNotValid.checkNotNullOrEmpty(replicaId,"String_Node_Str");
  log.debug("String_Node_Str" + replicaId + "String_Node_Str");
  long start=System.currentTimeMillis();
  GetAllFilenamesMessage gafMsg=new GetAllFilenamesMessage(Channels.getTheRepos(),replyQ,replicaId);
  NetarkivetMessage replyNetMsg=sendAndWaitForOneReply(gafMsg,getTimeout);
  long timePassed=System.currentTimeMillis() - start;
  log.debug("String_Node_Str" + (timePassed / 1000) + "String_Node_Str");
  if (replyNetMsg == null) {
    log.info("String_Node_Str" + (getTimeout / 1000) + "String_Node_Str");
    return null;
  }
  GetAllFilenamesMessage replyCSMsg;
  try {
    replyCSMsg=(GetAllFilenamesMessage)replyNetMsg;
  }
 catch (  ClassCastException e) {
    String errorMsg="String_Node_Str" + replyNetMsg;
    log.warn(errorMsg,e);
    throw new IOFailure(errorMsg,e);
  }
  try {
    File result=File.createTempFile("String_Node_Str","String_Node_Str");
    replyCSMsg.getData(result);
    return result;
  }
 catch (  IOException e) {
    String errMsg="String_Node_Str" + "String_Node_Str" + replyCSMsg;
    log.warn(errMsg);
    throw new IOFailure(errMsg,e);
  }
}

Fixed version (ground truth):
/** 
 * Retrieves the names of all the files in the replica through a GetAllFilenamesMessage. This is the checksum archive alternative to running a FilelistBatchJob.
 * @param replicaId The id of the replica from which the list of filenamesshould be retrieved.
 * @return A list of all the filenames within the archive of the givenreplica.
 * @see dk.netarkivet.archive.checksum.distribute.GetAllFilenamesMessage
 */
public File getAllFilenames(String replicaId){
  ArgumentNotValid.checkNotNullOrEmpty(replicaId,"String_Node_Str");
  log.debug("String_Node_Str" + replicaId + "String_Node_Str");
  long start=System.currentTimeMillis();
  GetAllFilenamesMessage gafMsg=new GetAllFilenamesMessage(Channels.getTheRepos(),replyQ,replicaId);
  NetarkivetMessage replyNetMsg=sendAndWaitForOneReply(gafMsg,getTimeout);
  long timePassed=System.currentTimeMillis() - start;
  log.debug("String_Node_Str" + (timePassed / 1000) + "String_Node_Str");
  if (replyNetMsg == null) {
    log.info("String_Node_Str" + (getTimeout / 1000) + "String_Node_Str");
    return null;
  }
  GetAllFilenamesMessage replyCSMsg;
  try {
    replyCSMsg=(GetAllFilenamesMessage)replyNetMsg;
  }
 catch (  ClassCastException e) {
    String errorMsg="String_Node_Str" + replyNetMsg;
    log.warn(errorMsg,e);
    throw new IOFailure(errorMsg,e);
  }
  try {
    File result=File.createTempFile("String_Node_Str","String_Node_Str");
    replyCSMsg.getData(result);
    return result;
  }
 catch (  IOException e) {
    String errMsg="String_Node_Str" + "String_Node_Str" + replyCSMsg;
    log.warn(errMsg);
    throw new IOFailure(errMsg,e);
  }
}