Program: 99188
Project: 99188
Buggy source:
/** 
 * Logins. <p> Renders the response with a json object, for example, <pre> { "isLoggedIn": boolean, "msg": "" // optional, exists if isLoggedIn equals to false } </pre> </p>
 * @param context the specified context
 */
@RequestProcessing(value={"String_Node_Str"},method=HTTPRequestMethod.POST) public void login(final HTTPRequestContext context){
  final HttpServletRequest request=context.getRequest();
  final JSONRenderer renderer=new JSONRenderer();
  context.setRenderer(renderer);
  final JSONObject jsonObject=new JSONObject();
  renderer.setJSONObject(jsonObject);
  try {
    jsonObject.put(Common.IS_LOGGED_IN,false);
    final String loginFailLabel=langPropsService.get("String_Node_Str");
    jsonObject.put(Keys.MSG,loginFailLabel);
    final JSONObject requestJSONObject=Requests.parseRequestJSONObject(request,context.getResponse());
    final String userEmail=requestJSONObject.getString(User.USER_EMAIL);
    final String userPwd=requestJSONObject.getString(User.USER_PASSWORD);
    if (Strings.isEmptyOrNull(userEmail) || Strings.isEmptyOrNull(userPwd)) {
      return;
    }
    LOGGER.log(Level.INFO,"String_Node_Str",userEmail);
    final JSONObject user=userQueryService.getUserByEmail(userEmail);
    if (null == user) {
      LOGGER.log(Level.WARN,"String_Node_Str",userEmail);
      return;
    }
    if (MD5.hash(userPwd).equals(user.getString(User.USER_PASSWORD))) {
      Sessions.login(request,context.getResponse(),user);
      LOGGER.log(Level.INFO,"String_Node_Str",userEmail);
      jsonObject.put(Common.IS_LOGGED_IN,true);
      if (Role.VISITOR_ROLE.equals(user.optString(User.USER_ROLE))) {
        jsonObject.put("String_Node_Str",Latkes.getServePath());
      }
 else {
        jsonObject.put("String_Node_Str",Latkes.getServePath() + Common.ADMIN_INDEX_URI);
      }
      jsonObject.remove(Keys.MSG);
      return;
    }
    LOGGER.log(Level.WARN,"String_Node_Str",userPwd);
  }
 catch (  final Exception e) {
    LOGGER.log(Level.ERROR,e.getMessage(),e);
  }
}

Fixed version (ground truth):
/** 
 * Logins. <p/> <p> Renders the response with a json object, for example, <pre> { "isLoggedIn": boolean, "msg": "" // optional, exists if isLoggedIn equals to false } </pre> </p>
 * @param context the specified context
 */
@RequestProcessing(value={"String_Node_Str"},method=HTTPRequestMethod.POST) public void login(final HTTPRequestContext context){
  final HttpServletRequest request=context.getRequest();
  final JSONRenderer renderer=new JSONRenderer();
  context.setRenderer(renderer);
  final JSONObject jsonObject=new JSONObject();
  renderer.setJSONObject(jsonObject);
  try {
    jsonObject.put(Common.IS_LOGGED_IN,false);
    final String loginFailLabel=langPropsService.get("String_Node_Str");
    jsonObject.put(Keys.MSG,loginFailLabel);
    final JSONObject requestJSONObject=Requests.parseRequestJSONObject(request,context.getResponse());
    final String userEmail=requestJSONObject.getString(User.USER_EMAIL);
    final String userPwd=requestJSONObject.getString(User.USER_PASSWORD);
    if (Strings.isEmptyOrNull(userEmail) || Strings.isEmptyOrNull(userPwd)) {
      return;
    }
    LOGGER.log(Level.INFO,"String_Node_Str",userEmail);
    final JSONObject user=userQueryService.getUserByEmail(userEmail);
    if (null == user) {
      LOGGER.log(Level.WARN,"String_Node_Str",userEmail);
      return;
    }
    if (MD5.hash(userPwd).equals(user.getString(User.USER_PASSWORD))) {
      Sessions.login(request,context.getResponse(),user);
      LOGGER.log(Level.INFO,"String_Node_Str",userEmail);
      jsonObject.put(Common.IS_LOGGED_IN,true);
      if (Role.VISITOR_ROLE.equals(user.optString(User.USER_ROLE))) {
        jsonObject.put("String_Node_Str",Latkes.getServePath());
      }
 else {
        jsonObject.put("String_Node_Str",Latkes.getServePath() + Common.ADMIN_INDEX_URI);
      }
      jsonObject.remove(Keys.MSG);
      return;
    }
    LOGGER.log(Level.WARN,"String_Node_Str",userPwd);
  }
 catch (  final Exception e) {
    LOGGER.log(Level.ERROR,e.getMessage(),e);
  }
}