class LouvainComputer extends AbstractComputer {

    public static final String LOUVAIN = "louvain";

    public static final String KEY_STABLE_TIMES = "stable_times";
    public static final String KEY_PRECISION = "precision";
    public static final String KEY_SHOW_MOD = "show_modularity";
    public static final String KEY_SHOW_COMM = "show_community";
    public static final String KEY_EXPORT_COMM = "export_community";
    public static final String KEY_SKIP_ISOLATED = "skip_isolated";
    public static final String KEY_CLEAR = "clear";

    public static final long DEFAULT_STABLE_TIMES = 3L;
    private static final int MAX_TIMES = 2048;

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

    @Override
    public String category() {
        return CATEGORY_COMM;
    }

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

    @Override
    protected Map<String, Object> checkAndCollectParameters(
            Map<String, Object> parameters) {
        return ImmutableMap.of(TIMES, times(parameters),
                               PRECISION, precision(parameters),
                               DIRECTION, direction(parameters),
                               DEGREE, degree(parameters));
    }

    protected static int stableTimes(Map<String, Object> parameters) {<FILL_FUNCTION_BODY>}

    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 String showCommunity(Map<String, Object> parameters) {
        if (!parameters.containsKey(KEY_SHOW_COMM)) {
            return null;
        }
        return ParameterUtil.parameterString(parameters, KEY_SHOW_COMM);
    }

    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);
    }

    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;
    }
}

        if (!parameters.containsKey(KEY_STABLE_TIMES)) {
            return (int) DEFAULT_STABLE_TIMES;
        }
        int times = ParameterUtil.parameterInt(parameters, KEY_STABLE_TIMES);
        HugeTraverser.checkPositiveOrNoLimit(times, KEY_STABLE_TIMES);
        E.checkArgument(times <= MAX_TIMES,
                        "The maximum number of stable iterations is %s, " +
                        "but got %s", MAX_TIMES, times);
        return times;
    
<methods>public non-sealed void <init>() ,public java.lang.Object call(Job<java.lang.Object>, Map<java.lang.String,java.lang.Object>) ,public void checkParameters(Map<java.lang.String,java.lang.Object>) <variables>protected static final java.lang.String CATEGORY_COMM,protected static final java.lang.String CATEGORY_RANK,private static final java.lang.String COMMON,private static final java.lang.String COMPUTER_HOME,public static final long DEFAULT_DEGREE,public static final int DEFAULT_MAX_STEPS,public static final double DEFAULT_PRECISION,public static final int DEFAULT_TIMES,public static final java.lang.String DEGREE,public static final java.lang.String DIRECTION,private static final java.lang.String ENV,private static final java.lang.String EQUAL,private static final java.lang.String HADOOP_HOME,private static final Logger LOG,private static final java.lang.String MAIN_COMMAND,public static final java.lang.String MAX_STEPS,private static final java.lang.String MINUS_C,public static final java.lang.String PRECISION,private static final java.lang.String SPACE,public static final java.lang.String TIMES,private Map<java.lang.String,java.lang.Object> commonConfig,private YAMLConfiguration config