#vulnerable code 
                                @Override
    public boolean apply(Server server, Map<String, String> metadata) {
        GatewayStrategyContext context = GatewayStrategyContext.getCurrentContext();
        String token = context.getExchange().getRequest().getHeaders().getFirst("token");
        // String value = context.getExchange().getRequest().getQueryParams().getFirst("value");

        // 执行完后，请手工清除上下文对象，否则可能会造成内存泄露
        GatewayStrategyContext.clearCurrentContext();

        String serviceId = server.getMetaInfo().getAppName().toLowerCase();

        LOG.info("Gateway端负载均衡用户定制触发：serviceId={}, host={}, metadata={}, context={}", serviceId, server.toString(), metadata, context);

        String filterToken = "abc";
        if (StringUtils.isNotEmpty(token) && token.contains(filterToken)) {
            LOG.info("过滤条件：当Token含有'{}'的时候，不能被Ribbon负载均衡到", filterToken);

            return false;
        }

        return true;
    } 
                            #location 15 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Override
    public boolean apply(Server server, Map<String, String> metadata) {
        // 1.对Rest调用传来的Header的路由Version做策略。注意这个Version不是灰度发布的Version
        boolean enabled = super.apply(server, metadata);
        if (!enabled) {
            return false;
        }

        // 2.对Rest调用传来的Header参数（例如Token）做策略
        return applyFromHeader(server, metadata);
    }