Program: 37407
Project: 37407
Buggy source:
@Override public boolean preProcess(HttpServletRequest request,HttpServletResponse response) throws Exception {
  String tempPass=null;
  tempPass=request.getHeader("String_Node_Str");
  Principal principal=Principal.getAnonymousPrincipal();
  if (StringUtils.isNotBlank(tempPass)) {
    String AUTH_BASIC_PREFIX="String_Node_Str";
    if (!StringUtils.startsWith(tempPass,AUTH_BASIC_PREFIX)) {
      writeError401Response(response);
      return false;
    }
    tempPass=tempPass.substring(AUTH_BASIC_PREFIX.length(),tempPass.length());
    String tempPassdeCode="String_Node_Str";
    BASE64Decoder decoder=new BASE64Decoder();
    try {
      byte[] b=decoder.decodeBuffer(tempPass);
      tempPassdeCode=new String(b);
    }
 catch (    Exception e) {
      writeError401Response(response);
      return false;
    }
    String userReqId="String_Node_Str";
    String userReqPwd="String_Node_Str";
    int indexOfSeparator=tempPassdeCode.indexOf("String_Node_Str");
    if (-1 == indexOfSeparator) {
      writeError401Response(response);
      return false;
    }
    userReqId=tempPassdeCode.substring(0,indexOfSeparator);
    userReqPwd=tempPassdeCode.substring(indexOfSeparator + 1);
    User user=null;
    IdentityCheckService idcService=ServiceBeanUtil.getIdentityCheckService();
    user=idcService.IdentityCheckService(userReqId,userReqPwd);
    if (null == user) {
      request.getSession().removeAttribute("String_Node_Str");
      writeError401Response(response);
      return false;
    }
 else {
      principal=new Principal(user.getUserId());
    }
  }
  PrincipalHolder.setPrincipal(principal);
  return true;
}

Fixed version (ground truth):
@Override public boolean preProcess(HttpServletRequest request,HttpServletResponse response) throws Exception {
  String tempPass=null;
  tempPass=request.getHeader("String_Node_Str");
  Principal principal=Principal.getAnonymousPrincipal();
  if (StringUtils.isNotBlank(tempPass)) {
    String AUTH_BASIC_PREFIX="String_Node_Str";
    if (!StringUtils.startsWithIgnoreCase(tempPass,AUTH_BASIC_PREFIX)) {
      writeError401Response(response);
      return false;
    }
    tempPass=tempPass.substring(AUTH_BASIC_PREFIX.length(),tempPass.length());
    String tempPassdeCode="String_Node_Str";
    BASE64Decoder decoder=new BASE64Decoder();
    try {
      byte[] b=decoder.decodeBuffer(tempPass);
      tempPassdeCode=new String(b);
    }
 catch (    Exception e) {
      writeError401Response(response);
      return false;
    }
    String userReqId="String_Node_Str";
    String userReqPwd="String_Node_Str";
    int indexOfSeparator=tempPassdeCode.indexOf("String_Node_Str");
    if (-1 == indexOfSeparator) {
      writeError401Response(response);
      return false;
    }
    userReqId=tempPassdeCode.substring(0,indexOfSeparator);
    userReqPwd=tempPassdeCode.substring(indexOfSeparator + 1);
    User user=null;
    IdentityCheckService idcService=ServiceBeanUtil.getIdentityCheckService();
    user=idcService.IdentityCheckService(userReqId,userReqPwd);
    if (null == user) {
      request.getSession().removeAttribute("String_Node_Str");
      writeError401Response(response);
      return false;
    }
 else {
      principal=new Principal(user.getUserId());
    }
  }
  PrincipalHolder.setPrincipal(principal);
  return true;
}