Program: 62906
Project: 62906
Buggy source:
protected boolean isAccessAllowed(ServletRequest servletRequest,ServletResponse servletResponse,Object mappedValue) throws Exception {
  Subject subject=getSubject(servletRequest,servletResponse);
  LogExeManager.getInstance().executeLogTask(LogTaskFactory.bussinssLog(WebUtils.toHttp(servletRequest).getHeader("String_Node_Str"),WebUtils.toHttp(servletRequest).getRequestURI(),WebUtils.toHttp(servletRequest).getMethod(),(short)1,null));
  if ((null == subject || !subject.isAuthenticated()) && isJwtSubmission(servletRequest)) {
    AuthenticationToken token=createJwtToken(servletRequest);
    try {
      subject.login(token);
      return this.checkRoles(subject,mappedValue);
    }
 catch (    AuthenticationException e) {
      if (e.getMessage().equals("String_Node_Str")) {
        String appId=WebUtils.toHttp(servletRequest).getHeader("String_Node_Str");
        String jwt=WebUtils.toHttp(servletRequest).getHeader("String_Node_Str");
        String refreshJwt=redisTemplate.opsForValue().get("String_Node_Str" + appId);
        if (null != refreshJwt && refreshJwt.equals(jwt)) {
          String roles=accountService.loadAccountRole(appId);
          long refreshPeriodTime=36000L;
          String newJwt=JsonWebTokenUtil.issueJWT(UUID.randomUUID().toString(),appId,"String_Node_Str",refreshPeriodTime >> 2,roles,null,SignatureAlgorithm.HS512);
          redisTemplate.opsForValue().set("String_Node_Str" + appId,newJwt,refreshPeriodTime,TimeUnit.SECONDS);
          Message message=new Message().ok(1005,"String_Node_Str").addData("String_Node_Str",newJwt);
          RequestResponseUtil.responseWrite(JSON.toJSONString(message),servletResponse);
          return false;
        }
 else {
          Message message=new Message().error(1006,"String_Node_Str");
          RequestResponseUtil.responseWrite(JSON.toJSONString(message),servletResponse);
          return false;
        }
      }
      Message message=new Message().error(1007,"String_Node_Str");
      RequestResponseUtil.responseWrite(JSON.toJSONString(message),servletResponse);
      return false;
    }
catch (    Exception e) {
      LOGGER.error(IpUtil.getIpFromRequest(WebUtils.toHttp(servletRequest)) + "String_Node_Str" + e.getMessage(),e);
      Message message=new Message().error(1007,"String_Node_Str");
      RequestResponseUtil.responseWrite(JSON.toJSONString(message),servletResponse);
      return false;
    }
  }
 else {
    Message message=new Message().error(1111,"String_Node_Str");
    RequestResponseUtil.responseWrite(JSON.toJSONString(message),servletResponse);
    return false;
  }
}

Fixed version (ground truth):
protected boolean isAccessAllowed(ServletRequest servletRequest,ServletResponse servletResponse,Object mappedValue) throws Exception {
  Subject subject=getSubject(servletRequest,servletResponse);
  LogExeManager.getInstance().executeLogTask(LogTaskFactory.bussinssLog(WebUtils.toHttp(servletRequest).getHeader("String_Node_Str"),WebUtils.toHttp(servletRequest).getRequestURI(),WebUtils.toHttp(servletRequest).getMethod(),(short)1,null));
  if ((null != subject && !subject.isAuthenticated()) && isJwtSubmission(servletRequest)) {
    AuthenticationToken token=createJwtToken(servletRequest);
    try {
      subject.login(token);
      return this.checkRoles(subject,mappedValue);
    }
 catch (    AuthenticationException e) {
      if (e.getMessage().equals("String_Node_Str")) {
        String appId=WebUtils.toHttp(servletRequest).getHeader("String_Node_Str");
        String jwt=WebUtils.toHttp(servletRequest).getHeader("String_Node_Str");
        String refreshJwt=redisTemplate.opsForValue().get("String_Node_Str" + appId);
        if (null != refreshJwt && refreshJwt.equals(jwt)) {
          String roles=accountService.loadAccountRole(appId);
          long refreshPeriodTime=36000L;
          String newJwt=JsonWebTokenUtil.issueJWT(UUID.randomUUID().toString(),appId,"String_Node_Str",refreshPeriodTime >> 2,roles,null,SignatureAlgorithm.HS512);
          redisTemplate.opsForValue().set("String_Node_Str" + appId,newJwt,refreshPeriodTime,TimeUnit.SECONDS);
          Message message=new Message().ok(1005,"String_Node_Str").addData("String_Node_Str",newJwt);
          RequestResponseUtil.responseWrite(JSON.toJSONString(message),servletResponse);
          return false;
        }
 else {
          Message message=new Message().error(1006,"String_Node_Str");
          RequestResponseUtil.responseWrite(JSON.toJSONString(message),servletResponse);
          return false;
        }
      }
      Message message=new Message().error(1007,"String_Node_Str");
      RequestResponseUtil.responseWrite(JSON.toJSONString(message),servletResponse);
      return false;
    }
catch (    Exception e) {
      LOGGER.error(IpUtil.getIpFromRequest(WebUtils.toHttp(servletRequest)) + "String_Node_Str" + e.getMessage(),e);
      Message message=new Message().error(1007,"String_Node_Str");
      RequestResponseUtil.responseWrite(JSON.toJSONString(message),servletResponse);
      return false;
    }
  }
 else {
    Message message=new Message().error(1111,"String_Node_Str");
    RequestResponseUtil.responseWrite(JSON.toJSONString(message),servletResponse);
    return false;
  }
}