Program: 152309
Project: 152309
Buggy source:
/** 
 * Execute command.
 */
public void execute(Connection connection,FtpRequest request,FtpSessionImpl session,FtpReplyOutput out) throws IOException, FtpException {
  session.resetState();
  FtpServerContext serverContext=connection.getServerContext();
  String fileName=request.getArgument();
  if (fileName == null || fileName.indexOf(File.pathSeparatorChar) > -1) {
    out.write(FtpReplyUtil.translate(session,FtpReply.REPLY_501_SYNTAX_ERROR_IN_PARAMETERS_OR_ARGUMENTS,"String_Node_Str",null));
    return;
  }
  Ftplet ftpletContainer=serverContext.getFtpletContainer();
  FtpletEnum ftpletRet;
  try {
    ftpletRet=ftpletContainer.onMkdirStart(session,request,out);
  }
 catch (  Exception e) {
    LOG.debug("String_Node_Str",e);
    ftpletRet=FtpletEnum.RET_DISCONNECT;
  }
  if (ftpletRet == FtpletEnum.RET_SKIP) {
    return;
  }
 else   if (ftpletRet == FtpletEnum.RET_DISCONNECT) {
    serverContext.getConnectionManager().closeConnection(connection);
    return;
  }
  FileObject file=null;
  try {
    file=session.getFileSystemView().getFileObject(fileName);
  }
 catch (  Exception ex) {
    LOG.debug("String_Node_Str",ex);
  }
  if (file == null) {
    out.write(FtpReplyUtil.translate(session,FtpReply.REPLY_550_REQUESTED_ACTION_NOT_TAKEN,"String_Node_Str",fileName));
    return;
  }
  fileName=file.getFullName();
  if (!file.hasWritePermission()) {
    out.write(FtpReplyUtil.translate(session,FtpReply.REPLY_550_REQUESTED_ACTION_NOT_TAKEN,"String_Node_Str",fileName));
    return;
  }
  if (file.doesExist()) {
    out.write(FtpReplyUtil.translate(session,FtpReply.REPLY_550_REQUESTED_ACTION_NOT_TAKEN,"String_Node_Str",fileName));
    return;
  }
  if (file.mkdir()) {
    out.write(FtpReplyUtil.translate(session,FtpReply.REPLY_250_REQUESTED_FILE_ACTION_OKAY,"String_Node_Str",fileName));
    String userName=session.getUser().getName();
    LOG.info("String_Node_Str" + userName + "String_Node_Str"+ fileName);
    ServerFtpStatistics ftpStat=(ServerFtpStatistics)connection.getServerContext().getFtpStatistics();
    ftpStat.setMkdir(connection,file);
    try {
      ftpletRet=ftpletContainer.onMkdirEnd(session,request,out);
    }
 catch (    Exception e) {
      LOG.debug("String_Node_Str",e);
      ftpletRet=FtpletEnum.RET_DISCONNECT;
    }
    if (ftpletRet == FtpletEnum.RET_DISCONNECT) {
      serverContext.getConnectionManager().closeConnection(connection);
      return;
    }
  }
 else {
    out.write(FtpReplyUtil.translate(session,FtpReply.REPLY_550_REQUESTED_ACTION_NOT_TAKEN,"String_Node_Str",fileName));
  }
}

Fixed version (ground truth):
/** 
 * Execute command.
 */
public void execute(Connection connection,FtpRequest request,FtpSessionImpl session,FtpReplyOutput out) throws IOException, FtpException {
  session.resetState();
  FtpServerContext serverContext=connection.getServerContext();
  String fileName=request.getArgument();
  if (fileName == null || fileName.indexOf(File.pathSeparatorChar) > -1) {
    out.write(FtpReplyUtil.translate(session,FtpReply.REPLY_501_SYNTAX_ERROR_IN_PARAMETERS_OR_ARGUMENTS,"String_Node_Str",null));
    return;
  }
  Ftplet ftpletContainer=serverContext.getFtpletContainer();
  FtpletEnum ftpletRet;
  try {
    ftpletRet=ftpletContainer.onMkdirStart(session,request,out);
  }
 catch (  Exception e) {
    LOG.debug("String_Node_Str",e);
    ftpletRet=FtpletEnum.RET_DISCONNECT;
  }
  if (ftpletRet == FtpletEnum.RET_SKIP) {
    return;
  }
 else   if (ftpletRet == FtpletEnum.RET_DISCONNECT) {
    serverContext.getConnectionManager().closeConnection(connection);
    return;
  }
  FileObject file=null;
  try {
    file=session.getFileSystemView().getFileObject(fileName);
  }
 catch (  Exception ex) {
    LOG.debug("String_Node_Str",ex);
  }
  if (file == null) {
    out.write(FtpReplyUtil.translate(session,FtpReply.REPLY_550_REQUESTED_ACTION_NOT_TAKEN,"String_Node_Str",fileName));
    return;
  }
  fileName=file.getFullName();
  if (!file.hasWritePermission()) {
    out.write(FtpReplyUtil.translate(session,FtpReply.REPLY_550_REQUESTED_ACTION_NOT_TAKEN,"String_Node_Str",fileName));
    return;
  }
  if (file.doesExist()) {
    out.write(FtpReplyUtil.translate(session,FtpReply.REPLY_550_REQUESTED_ACTION_NOT_TAKEN,"String_Node_Str",fileName));
    return;
  }
  if (file.mkdir()) {
    out.write(FtpReplyUtil.translate(session,FtpReply.REPLY_257_PATHNAME_CREATED,"String_Node_Str",fileName));
    String userName=session.getUser().getName();
    LOG.info("String_Node_Str" + userName + "String_Node_Str"+ fileName);
    ServerFtpStatistics ftpStat=(ServerFtpStatistics)connection.getServerContext().getFtpStatistics();
    ftpStat.setMkdir(connection,file);
    try {
      ftpletRet=ftpletContainer.onMkdirEnd(session,request,out);
    }
 catch (    Exception e) {
      LOG.debug("String_Node_Str",e);
      ftpletRet=FtpletEnum.RET_DISCONNECT;
    }
    if (ftpletRet == FtpletEnum.RET_DISCONNECT) {
      serverContext.getConnectionManager().closeConnection(connection);
      return;
    }
  }
 else {
    out.write(FtpReplyUtil.translate(session,FtpReply.REPLY_550_REQUESTED_ACTION_NOT_TAKEN,"String_Node_Str",fileName));
  }
}