Program: 89898
Project: 89898
Buggy source:
/** 
 * Sends a GetMessage on the "TheArcrepos" queue and waits for a reply. This is a blocking call. Returns null if no message is returned within Settings.ARCREPOSITORY_GET_TIMEOUT
 * @param arcfile The name of a file.
 * @param index   The offset of the wanted record in the file
 * @return a BitarchiveRecord-object or null if request times out or objectis not found.
 * @throws ArgumentNotValid If the given arcfile is null or empty, or the given index is negative.
 * @throws IOFailure If a wrong message is returned or theget operation failed.
 */
public BitarchiveRecord get(String arcfile,long index) throws ArgumentNotValid {
  ArgumentNotValid.checkNotNullOrEmpty(arcfile,"String_Node_Str");
  ArgumentNotValid.checkNotNegative(index,"String_Node_Str");
  log.debug("String_Node_Str" + arcfile + "String_Node_Str"+ index+ "String_Node_Str");
  long start=System.currentTimeMillis();
  GetMessage requestGetMsg=new GetMessage(Channels.getTheRepos(),replyQ,arcfile,index);
  NetarkivetMessage replyNetMsg=sendAndWaitForOneReply(requestGetMsg,getTimeout);
  long timePassed=System.currentTimeMillis() - start;
  log.debug("String_Node_Str" + (timePassed / 1000) + "String_Node_Str");
  if (replyNetMsg == null) {
    log.info("String_Node_Str" + arcfile + "String_Node_Str"+ index+ "String_Node_Str"+ (getTimeout / 1000)+ "String_Node_Str");
    return null;
  }
  GetMessage replyGetMsg;
  try {
    replyGetMsg=(GetMessage)replyNetMsg;
  }
 catch (  ClassCastException e) {
    String errorMsg="String_Node_Str" + replyNetMsg + "String_Node_Str";
    log.warn(errorMsg,e);
    throw new ArgumentNotValid(errorMsg,e);
  }
  if (!replyGetMsg.isOk()) {
    final String errMsg="String_Node_Str" + replyGetMsg.getErrMsg() + "String_Node_Str";
    log.warn(errMsg);
    throw new ArgumentNotValid(errMsg);
  }
  return replyGetMsg.getRecord();
}

Fixed version (ground truth):
/** 
 * Sends a GetMessage on the "TheArcrepos" queue and waits for a reply. This is a blocking call. Returns null if no message is returned within Settings.ARCREPOSITORY_GET_TIMEOUT
 * @param arcfile The name of a file.
 * @param index   The offset of the wanted record in the file
 * @return a BitarchiveRecord-object or null if request times out or objectis not found.
 * @throws ArgumentNotValid If the given arcfile is null or empty, or thegiven index is negative.
 * @throws IOFailure        If a wrong message is returned or the getoperation failed.
 */
public BitarchiveRecord get(String arcfile,long index) throws ArgumentNotValid {
  ArgumentNotValid.checkNotNullOrEmpty(arcfile,"String_Node_Str");
  ArgumentNotValid.checkNotNegative(index,"String_Node_Str");
  log.debug("String_Node_Str" + arcfile + "String_Node_Str"+ index+ "String_Node_Str");
  long start=System.currentTimeMillis();
  GetMessage requestGetMsg=new GetMessage(Channels.getTheRepos(),replyQ,arcfile,index);
  NetarkivetMessage replyNetMsg=sendAndWaitForOneReply(requestGetMsg,getTimeout);
  long timePassed=System.currentTimeMillis() - start;
  log.debug("String_Node_Str" + (timePassed / 1000) + "String_Node_Str");
  if (replyNetMsg == null) {
    log.info("String_Node_Str" + arcfile + "String_Node_Str"+ index+ "String_Node_Str"+ (getTimeout / 1000)+ "String_Node_Str");
    return null;
  }
  GetMessage replyGetMsg;
  try {
    replyGetMsg=(GetMessage)replyNetMsg;
  }
 catch (  ClassCastException e) {
    String errorMsg="String_Node_Str" + replyNetMsg + "String_Node_Str";
    log.warn(errorMsg,e);
    throw new ArgumentNotValid(errorMsg,e);
  }
  if (!replyGetMsg.isOk()) {
    final String errMsg="String_Node_Str" + replyGetMsg.getErrMsg() + "String_Node_Str";
    log.warn(errMsg);
    throw new ArgumentNotValid(errMsg);
  }
  return replyGetMsg.getRecord();
}