Program: 37503
Project: 37503
Buggy source:
@Override public void doFilter(ServletRequest arg0,ServletResponse arg1,FilterChain chain) throws IOException, ServletException {
  HttpServletRequest request=(HttpServletRequest)arg0;
  HttpServletResponse response=(HttpServletResponse)arg1;
  String tempPass=null;
  tempPass=request.getHeader("String_Node_Str");
  Principal principal=Principal.getAnonymousPrincipal();
  if (tempPass != null) {
    tempPass=tempPass.substring(6,tempPass.length());
    String tempPassdeCode="String_Node_Str";
    BASE64Decoder decoder=new BASE64Decoder();
    try {
      byte[] b=decoder.decodeBuffer(tempPass);
      tempPassdeCode=new String(b);
    }
 catch (    Exception e) {
      return;
    }
    String userReqId="String_Node_Str";
    String userReqPwd="String_Node_Str";
    userReqId=tempPassdeCode.substring(0,tempPassdeCode.indexOf("String_Node_Str"));
    userReqPwd=tempPassdeCode.substring(tempPassdeCode.indexOf("String_Node_Str") + 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;
    }
 else {
      principal=new Principal(user.getUserId());
    }
  }
  PrincipalHolder.setPrincipal(principal);
  chain.doFilter(request,response);
  PrincipalHolder.remove();
}

Fixed version (ground truth):
@Override public void doFilter(ServletRequest arg0,ServletResponse arg1,FilterChain chain) throws IOException, ServletException {
  HttpServletRequest request=(HttpServletRequest)arg0;
  HttpServletResponse response=(HttpServletResponse)arg1;
  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;
    }
    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;
    }
    String userReqId="String_Node_Str";
    String userReqPwd="String_Node_Str";
    int indexOfSeparator=tempPassdeCode.indexOf("String_Node_Str");
    if (-1 == indexOfSeparator) {
      writeError401Response(response);
      return;
    }
    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;
    }
 else {
      principal=new Principal(user.getUserId());
    }
  }
  PrincipalHolder.setPrincipal(principal);
  chain.doFilter(request,response);
  PrincipalHolder.remove();
}