Program: 15096
Project: 15096
Buggy source:
public DeleteUserResponseType deleteUser(DeleteUserType request) throws EucalyptusCloudException {
  DeleteUserResponseType reply=request.getReply();
  reply.getResponseMetadata().setRequestId(reply.getCorrelationId());
  String action=PolicySpec.requestToAction(request);
  Context ctx=Contexts.lookup();
  User requestUser=ctx.getUser();
  Account account=getRealAccount(ctx,request.getDelegateAccount());
  User userToDelete=null;
  try {
    userToDelete=account.lookupUserByName(request.getUserName());
    if (userToDelete.isSystemAdmin()) {
      throw new AuthException("String_Node_Str");
    }
  }
 catch (  Exception e) {
    LOG.debug(e,e);
    if (e instanceof AuthException && AuthException.NO_SUCH_USER.equals(e.getMessage())) {
      throw new EuareException(HttpResponseStatus.NOT_FOUND,EuareException.NO_SUCH_ENTITY,"String_Node_Str" + request.getUserName());
    }
 else {
      throw new EucalyptusCloudException(e);
    }
  }
  if (!Permissions.isAuthorized(PolicySpec.VENDOR_IAM,PolicySpec.IAM_RESOURCE_USER,Accounts.getUserFullName(userToDelete),account,action,requestUser)) {
    throw new EuareException(HttpResponseStatus.FORBIDDEN,EuareException.NOT_AUTHORIZED,"String_Node_Str" + requestUser.getName());
  }
  try {
    account.deleteUser(request.getUserName(),false,request.getIsRecursive() != null && request.getIsRecursive());
  }
 catch (  Exception e) {
    LOG.debug(e,e);
    if (e instanceof AuthException && AuthException.USER_DELETE_CONFLICT.equals(e.getMessage())) {
      throw new EuareException(HttpResponseStatus.CONFLICT,EuareException.DELETE_CONFLICT,"String_Node_Str" + requestUser.getName());
    }
 else {
      throw new EucalyptusCloudException(e);
    }
  }
  return reply;
}

Fixed version (ground truth):
public DeleteUserResponseType deleteUser(DeleteUserType request) throws EucalyptusCloudException {
  DeleteUserResponseType reply=request.getReply();
  reply.getResponseMetadata().setRequestId(reply.getCorrelationId());
  String action=PolicySpec.requestToAction(request);
  Context ctx=Contexts.lookup();
  User requestUser=ctx.getUser();
  Account account=getRealAccount(ctx,request.getDelegateAccount());
  User userToDelete=null;
  try {
    userToDelete=account.lookupUserByName(request.getUserName());
    if (userToDelete.isSystemAdmin() && userToDelete.isAccountAdmin()) {
      throw new AuthException("String_Node_Str");
    }
  }
 catch (  Exception e) {
    LOG.debug(e,e);
    if (e instanceof AuthException && AuthException.NO_SUCH_USER.equals(e.getMessage())) {
      throw new EuareException(HttpResponseStatus.NOT_FOUND,EuareException.NO_SUCH_ENTITY,"String_Node_Str" + request.getUserName());
    }
 else {
      throw new EucalyptusCloudException(e);
    }
  }
  if (!Permissions.isAuthorized(PolicySpec.VENDOR_IAM,PolicySpec.IAM_RESOURCE_USER,Accounts.getUserFullName(userToDelete),account,action,requestUser)) {
    throw new EuareException(HttpResponseStatus.FORBIDDEN,EuareException.NOT_AUTHORIZED,"String_Node_Str" + requestUser.getName());
  }
  try {
    account.deleteUser(request.getUserName(),false,request.getIsRecursive() != null && request.getIsRecursive());
  }
 catch (  Exception e) {
    LOG.debug(e,e);
    if (e instanceof AuthException && AuthException.USER_DELETE_CONFLICT.equals(e.getMessage())) {
      throw new EuareException(HttpResponseStatus.CONFLICT,EuareException.DELETE_CONFLICT,"String_Node_Str" + requestUser.getName());
    }
 else {
      throw new EucalyptusCloudException(e);
    }
  }
  return reply;
}