class StressCentralityAlgorithm extends AbstractCentAlgorithm {

    public static final String KEY_WITH_BOUNDARY = "with_boundary";

    @Override
    public String name() {
        return "stress_centrality";
    }

    @Override
    public void checkParameters(Map<String, Object> parameters) {
        super.checkParameters(parameters);
        withBoundary(parameters);
    }

    @Override
    public Object call(UserJob<Object> job, Map<String, Object> parameters) {
        try (Traverser traverser = new Traverser(job)) {
            return traverser.stressCentrality(direction(parameters),
                                              edgeLabel(parameters),
                                              depth(parameters),
                                              degree(parameters),
                                              sample(parameters),
                                              withBoundary(parameters),
                                              sourceLabel(parameters),
                                              sourceSample(parameters),
                                              sourceCLabel(parameters),
                                              top(parameters));
        }
    }

    protected static boolean withBoundary(Map<String, Object> parameters) {<FILL_FUNCTION_BODY>}

    private static class Traverser extends AbstractCentAlgorithm.Traverser {

        public Traverser(UserJob<Object> job) {
            super(job);
        }

        public Object stressCentrality(Directions direction,
                                       String label,
                                       int depth,
                                       long degree,
                                       long sample,
                                       boolean withBoundary,
                                       String sourceLabel,
                                       long sourceSample,
                                       String sourceCLabel,
                                       long topN) {
            assert depth > 0;
            assert degree > 0L || degree == NO_LIMIT;
            assert topN >= 0L || topN == NO_LIMIT;

            GraphTraversal<Vertex, Vertex> t = constructSource(sourceLabel,
                                                               sourceSample,
                                                               sourceCLabel);
            t = constructPath(t, direction, label, degree, sample,
                              sourceLabel, sourceCLabel);
            t = t.emit().until(__.loops().is(P.gte(depth)));
            t = filterNonShortestPath(t, false);

            GraphTraversal<Vertex, ?> tg = this.substractPath(t, withBoundary)
                                               .groupCount();
            GraphTraversal<Vertex, ?> tLimit = topN(tg, topN);

            return this.execute(tLimit, tLimit::next);
        }
    }
}

        if (!parameters.containsKey(KEY_WITH_BOUNDARY)) {
            return false;
        }
        return ParameterUtil.parameterBoolean(parameters, KEY_WITH_BOUNDARY);
    
<methods>public non-sealed void <init>() ,public java.lang.String category() ,public void checkParameters(Map<java.lang.String,java.lang.Object>) <variables>private static final Logger LOG