class AbstractCommAlgorithm extends AbstractAlgorithm {

    private static final int MAX_TIMES = 2048;

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

    protected static int times(Map<String, Object> parameters) {
        if (!parameters.containsKey(KEY_TIMES)) {
            return (int) DEFAULT_TIMES;
        }
        int times = ParameterUtil.parameterInt(parameters, KEY_TIMES);
        HugeTraverser.checkPositiveOrNoLimit(times, KEY_TIMES);
        E.checkArgument(times <= MAX_TIMES,
                        "The maximum number of iterations is %s, but got %s",
                        MAX_TIMES, times);
        return times;
    }

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

    protected static double precision(Map<String, Object> parameters) {
        if (!parameters.containsKey(KEY_PRECISION)) {
            return DEFAULT_PRECISION;
        }
        double precision = ParameterUtil.parameterDouble(parameters,
                                                         KEY_PRECISION);
        E.checkArgument(0d < precision && precision < 1d,
                        "The %s parameter must be in range(0,1), but got: %s",
                        KEY_PRECISION, precision);
        return precision;
    }

    protected static String showCommunity(Map<String, Object> parameters) {
        if (!parameters.containsKey(KEY_SHOW_COMM)) {
            return null;
        }
        return ParameterUtil.parameterString(parameters, KEY_SHOW_COMM);
    }
}

        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 void checkParameters(Map<java.lang.String,java.lang.Object>) <variables>public static final int BATCH,public static final java.lang.String CATEGORY_AGGR,public static final java.lang.String CATEGORY_CENT,public static final java.lang.String CATEGORY_COMM,public static final java.lang.String CATEGORY_PATH,public static final java.lang.String CATEGORY_RANK,public static final java.lang.String CATEGORY_SIMI,public static final java.lang.String C_LABEL,public static final double DEFAULT_ALPHA,public static final long DEFAULT_CAPACITY,public static final long DEFAULT_DEGREE,public static final long DEFAULT_EACH_LIMIT,public static final long DEFAULT_LIMIT,public static final double DEFAULT_PRECISION,public static final long DEFAULT_SAMPLE,public static final long DEFAULT_STABLE_TIMES,public static final long DEFAULT_TIMES,public static final java.lang.String EXPORT_PATH,public static final java.lang.String KEY_ALPHA,public static final java.lang.String KEY_CAPACITY,public static final java.lang.String KEY_CLEAR,public static final java.lang.String KEY_DEGREE,public static final java.lang.String KEY_DEPTH,public static final java.lang.String KEY_DIRECTION,public static final java.lang.String KEY_EACH_LIMIT,public static final java.lang.String KEY_EXPORT_COMM,public static final java.lang.String KEY_LABEL,public static final java.lang.String KEY_LIMIT,public static final java.lang.String KEY_PRECISION,public static final java.lang.String KEY_SAMPLE,public static final java.lang.String KEY_SHOW_COMM,public static final java.lang.String KEY_SHOW_MOD,public static final java.lang.String KEY_SKIP_ISOLATED,public static final java.lang.String KEY_SOURCE_CLABEL,public static final java.lang.String KEY_SOURCE_LABEL,public static final java.lang.String KEY_SOURCE_SAMPLE,public static final java.lang.String KEY_STABLE_TIMES,public static final java.lang.String KEY_TIMES,public static final java.lang.String KEY_TOP,public static final java.lang.String KEY_WORKERS,public static final long MAX_CAPACITY,public static final long MAX_QUERY_LIMIT,public static final long MAX_RESULT_SIZE,public static final java.lang.String R_RANK,public static final java.lang.String USER_DIR