Program: 89895
Project: 89895
Buggy source:
/** 
 * Sends a StoreMessage via the synchronized JMS connection method sendAndWaitForOneReply(). After a successful storage operation, both the local copy of the file and the copy on the ftp server are deleted.
 * @param file A file to be stored. Must exist.
 * @throws IOFailure thrown if store is unsuccessful, or failed to cleanup files locally or on the ftp server after the store operation.
 * @throws ArgumentNotValid if file parameter is null or file is not anexisting file.
 */
public void store(File file) throws IOFailure, ArgumentNotValid {
  ArgumentNotValid.checkNotNull(file,"String_Node_Str");
  ArgumentNotValid.checkTrue(file.isFile(),"String_Node_Str" + file.getPath() + "String_Node_Str"+ "String_Node_Str");
  StringBuilder messages=new StringBuilder();
  for (long i=0; i < storeRetries; i++) {
    StoreMessage outMsg=null;
    try {
      log.debug("String_Node_Str" + file.getPath() + "String_Node_Str");
      outMsg=new StoreMessage(replyQ,file);
      NetarkivetMessage replyMsg=sendAndWaitForOneReply(outMsg,storeTimeout);
      if (replyMsg != null && replyMsg.isOk()) {
        try {
          FileUtils.removeRecursively(file);
        }
 catch (        IOFailure e) {
          log.warn("String_Node_Str" + file.getAbsolutePath() + "String_Node_Str",e);
        }
        return;
      }
 else       if (replyMsg == null) {
        String msg="String_Node_Str" + "String_Node_Str" + file.getPath() + "String_Node_Str"+ (i + 1)+ "String_Node_Str"+ storeRetries;
        log.warn(msg);
        messages.append(msg).append("String_Node_Str");
      }
 else {
        String msg="String_Node_Str" + replyMsg + "String_Node_Str"+ "String_Node_Str"+ file.getPath()+ "String_Node_Str"+ (i + 1)+ "String_Node_Str"+ storeRetries+ "String_Node_Str"+ replyMsg.getErrMsg()+ "String_Node_Str";
        log.warn(msg);
        messages.append(msg).append("String_Node_Str");
      }
    }
 catch (    NetarkivetException e) {
      String msg="String_Node_Str" + file.getPath() + "String_Node_Str"+ (i + 1)+ "String_Node_Str"+ storeRetries+ "String_Node_Str";
      log.warn(msg,e);
      messages.append(msg).append("String_Node_Str");
      messages.append(ExceptionUtils.getStackTrace(e));
    }
 finally {
      if (outMsg != null) {
        cleanUpAfterStore(outMsg);
      }
    }
  }
  String errMsg="String_Node_Str" + file.getPath() + "String_Node_Str"+ storeRetries+ "String_Node_Str"+ messages;
  log.warn(errMsg);
  NotificationsFactory.getInstance().errorEvent(errMsg);
  throw new IOFailure(errMsg);
}

Fixed version (ground truth):
/** 
 * Sends a StoreMessage via the synchronized JMS connection method sendAndWaitForOneReply(). After a successful storage operation, both the local copy of the file and the copy on the ftp server are deleted.
 * @param file A file to be stored. Must exist.
 * @throws IOFailure        thrown if store is unsuccessful, or failed toclean up files locally or on the ftp server after the store operation.
 * @throws ArgumentNotValid if file parameter is null or file is not anexisting file.
 */
public void store(File file) throws IOFailure, ArgumentNotValid {
  ArgumentNotValid.checkNotNull(file,"String_Node_Str");
  ArgumentNotValid.checkTrue(file.isFile(),"String_Node_Str" + file.getPath() + "String_Node_Str"+ "String_Node_Str");
  StringBuilder messages=new StringBuilder();
  for (long i=0; i < storeRetries; i++) {
    StoreMessage outMsg=null;
    try {
      log.debug("String_Node_Str" + file.getPath() + "String_Node_Str");
      outMsg=new StoreMessage(replyQ,file);
      NetarkivetMessage replyMsg=sendAndWaitForOneReply(outMsg,storeTimeout);
      if (replyMsg != null && replyMsg.isOk()) {
        try {
          FileUtils.removeRecursively(file);
        }
 catch (        IOFailure e) {
          log.warn("String_Node_Str" + file.getAbsolutePath() + "String_Node_Str",e);
        }
        return;
      }
 else       if (replyMsg == null) {
        String msg="String_Node_Str" + "String_Node_Str" + file.getPath() + "String_Node_Str"+ (i + 1)+ "String_Node_Str"+ storeRetries;
        log.warn(msg);
        messages.append(msg).append("String_Node_Str");
      }
 else {
        String msg="String_Node_Str" + replyMsg + "String_Node_Str"+ "String_Node_Str"+ file.getPath()+ "String_Node_Str"+ (i + 1)+ "String_Node_Str"+ storeRetries+ "String_Node_Str"+ replyMsg.getErrMsg()+ "String_Node_Str";
        log.warn(msg);
        messages.append(msg).append("String_Node_Str");
      }
    }
 catch (    Exception e) {
      String msg="String_Node_Str" + file.getPath() + "String_Node_Str"+ (i + 1)+ "String_Node_Str"+ storeRetries+ "String_Node_Str";
      log.warn(msg,e);
      messages.append(msg).append("String_Node_Str");
      messages.append(ExceptionUtils.getStackTrace(e));
    }
 finally {
      if (outMsg != null) {
        cleanUpAfterStore(outMsg);
      }
    }
  }
  String errMsg="String_Node_Str" + file.getPath() + "String_Node_Str"+ storeRetries+ "String_Node_Str"+ messages;
  log.warn(errMsg);
  NotificationsFactory.getInstance().errorEvent(errMsg);
  throw new IOFailure(errMsg);
}