class LouvainAlgorithm extends AbstractCommAlgorithm {

    public static final String ALGO_NAME = "louvain";

    @Override
    public String name() {
        return ALGO_NAME;
    }

    @Override
    public void checkParameters(Map<String, Object> parameters) {
        times(parameters);
        stableTimes(parameters);
        precision(parameters);
        degree(parameters);
        sourceLabel(parameters);
        sourceCLabel(parameters);
        showModularity(parameters);
        showCommunity(parameters);
        exportCommunity(parameters);
        skipIsolated(parameters);
        clearPass(parameters);
        workers(parameters);
    }

    @Override
    public Object call(UserJob<Object> job, Map<String, Object> parameters) {<FILL_FUNCTION_BODY>}

    protected static Long clearPass(Map<String, Object> parameters) {
        if (!parameters.containsKey(KEY_CLEAR)) {
            return null;
        }
        long pass = ParameterUtil.parameterLong(parameters, KEY_CLEAR);
        HugeTraverser.checkNonNegativeOrNoLimit(pass, KEY_CLEAR);
        return pass;
    }

    protected static Long showModularity(Map<String, Object> parameters) {
        if (!parameters.containsKey(KEY_SHOW_MOD)) {
            return null;
        }
        long pass = ParameterUtil.parameterLong(parameters, KEY_SHOW_MOD);
        HugeTraverser.checkNonNegative(pass, KEY_SHOW_MOD);
        return pass;
    }

    protected static Long exportCommunity(Map<String, Object> parameters) {
        if (!parameters.containsKey(KEY_EXPORT_COMM)) {
            return null;
        }
        long pass = ParameterUtil.parameterLong(parameters, KEY_EXPORT_COMM);
        HugeTraverser.checkNonNegative(pass, KEY_EXPORT_COMM);
        return pass;
    }

    protected static boolean skipIsolated(Map<String, Object> parameters) {
        if (!parameters.containsKey(KEY_SKIP_ISOLATED)) {
            return true;
        }
        return ParameterUtil.parameterBoolean(parameters, KEY_SKIP_ISOLATED);
    }
}

        String label = sourceLabel(parameters);
        String clabel = sourceCLabel(parameters);
        long degree = degree(parameters);
        boolean skipIsolated = skipIsolated(parameters);
        int workers = workers(parameters);

        Long clearPass = clearPass(parameters);
        Long modPass = showModularity(parameters);
        String showComm = showCommunity(parameters);
        Long exportPass = exportCommunity(parameters);

        try (LouvainTraverser traverser = new LouvainTraverser(
                job, workers, degree,
                label, clabel, skipIsolated)) {
            if (clearPass != null) {
                return traverser.clearPass(clearPass.intValue());
            } else if (modPass != null) {
                return traverser.modularity(modPass.intValue());
            } else if (exportPass != null) {
                boolean vertexFirst = showComm == null;
                int pass = exportPass.intValue();
                return traverser.exportCommunity(pass, vertexFirst);
            } else if (showComm != null) {
                return traverser.showCommunity(showComm);
            } else {
                return traverser.louvain(times(parameters),
                                         stableTimes(parameters),
                                         precision(parameters));
            }
        } catch (Throwable e) {
            job.graph().tx().rollback();
            throw e;
        }
    
<methods>public non-sealed void <init>() ,public java.lang.String category() <variables>private static final int MAX_TIMES