Program: 152349
Project: 152349
Buggy source:
/** 
 * Execute command.
 */
public void execute(RequestHandler handler,FtpRequestImpl request,FtpWriter out) throws IOException, FtpException {
  request.resetState();
  IFtpConfig fconfig=handler.getConfig();
  String fileName=request.getArgument();
  if (fileName == null) {
    out.send(501,"String_Node_Str",null);
    return;
  }
  Ftplet ftpletContainer=fconfig.getFtpletContainer();
  FtpletEnum ftpletRet=ftpletContainer.onDeleteStart(request,out);
  if (ftpletRet == FtpletEnum.RET_SKIP) {
    return;
  }
 else   if (ftpletRet == FtpletEnum.RET_DISCONNECT) {
    fconfig.getConnectionManager().closeConnection(handler);
    return;
  }
  FileObject file=request.getFileSystemView().getFileObject(fileName);
  fileName=file.getFullName();
  if (!file.isFile()) {
    out.send(550,"String_Node_Str",fileName);
    return;
  }
  if (!file.hasDeletePermission()) {
    out.send(450,"String_Node_Str",fileName);
    return;
  }
  if (file.delete()) {
    out.send(250,"String_Node_Str",fileName);
    String userName=request.getUser().getName();
    Log log=fconfig.getLogFactory().getInstance(getClass());
    log.info("String_Node_Str" + userName + "String_Node_Str"+ fileName);
    IFtpStatistics ftpStat=(IFtpStatistics)fconfig.getFtpStatistics();
    ftpStat.setDelete(handler,file);
    ftpletRet=ftpletContainer.onDeleteEnd(request,out);
    if (ftpletRet == FtpletEnum.RET_DISCONNECT) {
      fconfig.getConnectionManager().closeConnection(handler);
      return;
    }
  }
 else {
    out.send(450,"String_Node_Str",fileName);
  }
}

Fixed version (ground truth):
/** 
 * Execute command.
 */
public void execute(RequestHandler handler,FtpRequestImpl request,FtpWriter out) throws IOException, FtpException {
  request.resetState();
  IFtpConfig fconfig=handler.getConfig();
  String fileName=request.getArgument();
  if (fileName == null) {
    out.send(501,"String_Node_Str",null);
    return;
  }
  Ftplet ftpletContainer=fconfig.getFtpletContainer();
  FtpletEnum ftpletRet=ftpletContainer.onDeleteStart(request,out);
  if (ftpletRet == FtpletEnum.RET_SKIP) {
    return;
  }
 else   if (ftpletRet == FtpletEnum.RET_DISCONNECT) {
    fconfig.getConnectionManager().closeConnection(handler);
    return;
  }
  FileObject file=null;
  try {
    file=request.getFileSystemView().getFileObject(fileName);
  }
 catch (  Exception ex) {
  }
  if (file == null) {
    out.send(550,"String_Node_Str",fileName);
    return;
  }
  fileName=file.getFullName();
  if (!file.isFile()) {
    out.send(550,"String_Node_Str",fileName);
    return;
  }
  if (!file.hasDeletePermission()) {
    out.send(450,"String_Node_Str",fileName);
    return;
  }
  if (file.delete()) {
    out.send(250,"String_Node_Str",fileName);
    String userName=request.getUser().getName();
    Log log=fconfig.getLogFactory().getInstance(getClass());
    log.info("String_Node_Str" + userName + "String_Node_Str"+ fileName);
    IFtpStatistics ftpStat=(IFtpStatistics)fconfig.getFtpStatistics();
    ftpStat.setDelete(handler,file);
    ftpletRet=ftpletContainer.onDeleteEnd(request,out);
    if (ftpletRet == FtpletEnum.RET_DISCONNECT) {
      fconfig.getConnectionManager().closeConnection(handler);
      return;
    }
  }
 else {
    out.send(450,"String_Node_Str",fileName);
  }
}