Program: 44765
Project: 44765
Buggy source:
@Override public String doProcess(ResolverContext context) throws ProcessorException {
  IDDBService app=(IDDBService)context.getServletContext().getAttribute("String_Node_Str");
  HttpServletRequest req=context.getRequest();
  String id=context.getParameter("String_Node_Str");
  Player player;
  try {
    player=app.getPlayer(id);
  }
 catch (  Exception e) {
    StringWriter w=new StringWriter();
    e.printStackTrace(new PrintWriter(w));
    log.error(w.getBuffer().toString());
    throw new HttpError(HttpServletResponse.SC_NOT_FOUND);
  }
  Server server;
  try {
    server=app.getServer(player.getServer(),true);
  }
 catch (  EntityDoesNotExistsException e) {
    StringWriter w=new StringWriter();
    e.printStackTrace(new PrintWriter(w));
    log.error(w.getBuffer().toString());
    throw new ProcessorException(e);
  }
  Integer minLevel=server.getAdminLevel();
  Boolean hasAdmin=UserServiceFactory.getUserService().hasAnyServer(minLevel);
  Boolean hasServerAdmin=UserServiceFactory.getUserService().hasPermission(server.getKey());
  Boolean canApplyAction=false;
  Player currentPlayer=UserServiceFactory.getUserService().getSubjectPlayer(server.getKey());
  if (currentPlayer != null && (currentPlayer.getLevel() > player.getLevel())) {
    canApplyAction=true;
  }
  List<NoticeViewBean> notices=null;
  List<PenaltyEventViewBean> events=null;
  PlayerViewBean infoView=new PlayerViewBean();
  infoView.setKey(player.getKey().toString());
  infoView.setName(player.getNickname());
  if (hasAdmin) {
    infoView.setGuid(player.getGuid());
    infoView.setIp(player.getIp());
  }
 else {
    infoView.setIp(Functions.maskIpAddress(player.getIp()));
  }
  infoView.setUpdated(player.getUpdated());
  infoView.setServer(server);
  if (hasAdmin) {
    Penalty ban=app.getLastPenalty(player);
    if (ban != null) {
      PenaltyViewBean penaltyViewBean=new PenaltyViewBean();
      penaltyViewBean.setKey(ban.getKey());
      penaltyViewBean.setCreated(ban.getCreated());
      penaltyViewBean.setDuration(ban.getDuration());
      penaltyViewBean.setReason(ban.getReason());
      if (ban.getAdmin() != null) {
        try {
          Player admin=app.getPlayer(ban.getAdmin());
          penaltyViewBean.setAdmin(admin.getNickname());
        }
 catch (        EntityDoesNotExistsException e) {
          log.warn(e.getMessage());
        }
      }
      infoView.setBanInfo(penaltyViewBean);
    }
    List<Penalty> pn=app.getActivePenalties(player.getKey(),Penalty.NOTICE);
    notices=new ArrayList<NoticeViewBean>();
    for (    Penalty notice : pn) {
      NoticeViewBean noticeViewBean=new NoticeViewBean();
      noticeViewBean.setKey(notice.getKey());
      noticeViewBean.setCreated(notice.getCreated());
      noticeViewBean.setReason(notice.getReason());
      if (notice.getAdmin() != null) {
        try {
          Player admin=app.getPlayer(notice.getAdmin());
          noticeViewBean.setAdmin(admin.getNickname());
        }
 catch (        EntityDoesNotExistsException e) {
          log.warn(e.getMessage());
        }
      }
      notices.add(noticeViewBean);
    }
    List<PenaltyHistory> historyList=app.listPenaltyEvents(player.getKey(),10);
    events=new ArrayList<PenaltyEventViewBean>();
    for (    PenaltyHistory history : historyList) {
      PenaltyEventViewBean event=new PenaltyEventViewBean();
      event.setStatus(MessageResource.getMessage("String_Node_Str" + history.getStatus().toString()));
      event.setUpdated(history.getUpdated());
      User user=null;
      try {
        user=UserServiceFactory.getUserService().getUser(history.getAdminId());
        Player pa=UserServiceFactory.getUserService().getUserPlayer(user,server.getKey());
        if (pa != null) {
          event.setAdmin(pa.getNickname());
        }
 else {
          event.setAdmin(user.getLoginId());
        }
      }
 catch (      EntityDoesNotExistsException e) {
        event.setAdmin("String_Node_Str");
      }
      try {
        Penalty pe=app.getPenalty(history.getPenaltyId());
        if (pe.getType().equals(Penalty.BAN)) {
          if (history.getFuncId() == PenaltyHistory.FUNC_ID_ADD) {
            event.setType(MessageResource.getMessage("String_Node_Str"));
          }
 else {
            event.setType(MessageResource.getMessage("String_Node_Str"));
          }
        }
 else {
          if (history.getFuncId() == PenaltyHistory.FUNC_ID_ADD) {
            event.setType(MessageResource.getMessage("String_Node_Str"));
          }
 else {
            event.setType(MessageResource.getMessage("String_Node_Str"));
          }
        }
      }
 catch (      EntityDoesNotExistsException e) {
        event.setType("String_Node_Str");
      }
      events.add(event);
    }
  }
 else {
    if (player.getBanInfo() != null) {
      infoView.setBanInfo(new PenaltyViewBean(true));
    }
  }
  infoView.setAliases(new ArrayList<AliasResult>());
  infoView.setClientId(player.getClientId() != null ? "String_Node_Str" + player.getClientId().toString() : "String_Node_Str");
  infoView.setPlaying(player.isConnected());
  if (hasAdmin && player.getLevel() != null) {
    infoView.setLevel(player.getLevel().toString());
  }
 else {
    infoView.setLevel("String_Node_Str");
  }
  req.setAttribute("String_Node_Str",infoView);
  req.setAttribute("String_Node_Str",events);
  req.setAttribute("String_Node_Str",server);
  req.setAttribute("String_Node_Str",notices);
  req.setAttribute("String_Node_Str",hasAdmin);
  req.setAttribute("String_Node_Str",hasServerAdmin);
  req.setAttribute("String_Node_Str",server.getPermission());
  req.setAttribute("String_Node_Str",canApplyAction);
  return null;
}

Fixed version (ground truth):
@Override public String doProcess(ResolverContext context) throws ProcessorException {
  IDDBService app=(IDDBService)context.getServletContext().getAttribute("String_Node_Str");
  HttpServletRequest req=context.getRequest();
  String id=context.getParameter("String_Node_Str");
  Player player;
  try {
    player=app.getPlayer(id);
  }
 catch (  Exception e) {
    StringWriter w=new StringWriter();
    e.printStackTrace(new PrintWriter(w));
    log.error(w.getBuffer().toString());
    throw new HttpError(HttpServletResponse.SC_NOT_FOUND);
  }
  Server server;
  try {
    server=app.getServer(player.getServer(),true);
  }
 catch (  EntityDoesNotExistsException e) {
    StringWriter w=new StringWriter();
    e.printStackTrace(new PrintWriter(w));
    log.error(w.getBuffer().toString());
    throw new ProcessorException(e);
  }
  Integer minLevel=server.getAdminLevel();
  Boolean hasAdmin=UserServiceFactory.getUserService().hasAnyServer(minLevel);
  Boolean hasServerAdmin=UserServiceFactory.getUserService().hasPermission(server.getKey());
  Boolean canApplyAction=false;
  Player currentPlayer=UserServiceFactory.getUserService().getSubjectPlayer(server.getKey());
  if (currentPlayer != null && (currentPlayer.getLevel() > player.getLevel())) {
    canApplyAction=true;
  }
  List<NoticeViewBean> notices=null;
  List<PenaltyEventViewBean> events=null;
  PlayerViewBean infoView=new PlayerViewBean();
  infoView.setKey(player.getKey().toString());
  infoView.setName(player.getNickname());
  if (hasAdmin) {
    infoView.setGuid(player.getGuid());
    infoView.setIp(player.getIp());
  }
 else {
    infoView.setIp(Functions.maskIpAddress(player.getIp()));
  }
  infoView.setUpdated(player.getUpdated());
  infoView.setServer(server);
  if (hasAdmin) {
    Penalty ban=app.getLastPenalty(player);
    if (ban != null) {
      PenaltyViewBean penaltyViewBean=new PenaltyViewBean();
      penaltyViewBean.setKey(ban.getKey());
      penaltyViewBean.setCreated(ban.getCreated());
      penaltyViewBean.setDuration(ban.getDuration());
      penaltyViewBean.setReason(ban.getReason());
      if (ban.getAdmin() != null) {
        try {
          Player admin=app.getPlayer(ban.getAdmin());
          penaltyViewBean.setAdmin(admin.getNickname());
        }
 catch (        EntityDoesNotExistsException e) {
          log.warn(e.getMessage());
        }
      }
      infoView.setBanInfo(penaltyViewBean);
    }
    List<Penalty> pn=app.getActivePenalties(player.getKey(),Penalty.NOTICE);
    notices=new ArrayList<NoticeViewBean>();
    for (    Penalty notice : pn) {
      NoticeViewBean noticeViewBean=new NoticeViewBean();
      noticeViewBean.setKey(notice.getKey());
      noticeViewBean.setCreated(notice.getCreated());
      noticeViewBean.setReason(notice.getReason());
      if (notice.getAdmin() != null) {
        try {
          Player admin=app.getPlayer(notice.getAdmin());
          noticeViewBean.setAdmin(admin.getNickname());
        }
 catch (        EntityDoesNotExistsException e) {
          log.warn(e.getMessage());
        }
      }
      notices.add(noticeViewBean);
    }
    List<PenaltyHistory> historyList=app.listPenaltyEvents(player.getKey(),10);
    events=new ArrayList<PenaltyEventViewBean>();
    for (    PenaltyHistory history : historyList) {
      PenaltyEventViewBean event=new PenaltyEventViewBean();
      event.setStatus(MessageResource.getMessage("String_Node_Str" + history.getStatus().toString()));
      event.setUpdated(history.getUpdated());
      User user=null;
      try {
        user=UserServiceFactory.getUserService().getUser(history.getAdminId());
        Player pa=UserServiceFactory.getUserService().getUserPlayer(user,server.getKey());
        if (pa != null) {
          event.setAdmin(pa.getNickname());
        }
 else {
          event.setAdmin(user.getLoginId());
        }
      }
 catch (      EntityDoesNotExistsException e) {
        event.setAdmin("String_Node_Str");
      }
      try {
        Penalty pe=app.getPenalty(history.getPenaltyId());
        if (pe.getType().equals(Penalty.BAN)) {
          if (history.getFuncId() == PenaltyHistory.FUNC_ID_ADD) {
            event.setType(MessageResource.getMessage("String_Node_Str"));
          }
 else {
            event.setType(MessageResource.getMessage("String_Node_Str"));
          }
        }
 else {
          if (history.getFuncId() == PenaltyHistory.FUNC_ID_ADD) {
            event.setType(MessageResource.getMessage("String_Node_Str"));
          }
 else {
            event.setType(MessageResource.getMessage("String_Node_Str"));
          }
        }
      }
 catch (      EntityDoesNotExistsException e) {
        event.setType("String_Node_Str");
      }
      events.add(event);
    }
  }
 else {
    if (player.getBanInfo() != null) {
      infoView.setBanInfo(new PenaltyViewBean(true));
    }
  }
  infoView.setAliases(new ArrayList<AliasResult>());
  infoView.setClientId(player.getClientId() != null ? "String_Node_Str" + player.getClientId().toString() : "String_Node_Str");
  infoView.setPlaying(player.isConnected());
  if (hasAdmin && player.getLevel() != null) {
    infoView.setLevel(player.getLevel().toString());
  }
 else {
    infoView.setLevel("String_Node_Str");
  }
  req.setAttribute("String_Node_Str",infoView);
  req.setAttribute("String_Node_Str",events);
  req.setAttribute("String_Node_Str",server);
  req.setAttribute("String_Node_Str",notices);
  req.setAttribute("String_Node_Str",hasAdmin);
  req.setAttribute("String_Node_Str",hasServerAdmin);
  req.setAttribute("String_Node_Str",server.getRemotePermission());
  req.setAttribute("String_Node_Str",canApplyAction);
  return null;
}