class AlgorithmJob extends UserJob<Object> {

    public static final String TASK_TYPE = "algorithm";

    public static boolean check(String name, Map<String, Object> parameters) {
        Algorithm algorithm = AlgorithmPool.instance().find(name);
        if (algorithm == null) {
            return false;
        }
        algorithm.checkParameters(parameters);
        return true;
    }

    @Override
    public String type() {
        return TASK_TYPE;
    }

    @Override
    public Object execute() throws Exception {<FILL_FUNCTION_BODY>}
}

        String input = this.task().input();
        E.checkArgumentNotNull(input, "The input can't be null");
        @SuppressWarnings("unchecked")
        Map<String, Object> map = JsonUtil.fromJson(input, Map.class);

        Object value = map.get("algorithm");
        E.checkArgument(value instanceof String,
                        "Invalid algorithm name '%s'", value);
        String name = (String) value;

        value = map.get("parameters");
        E.checkArgument(value instanceof Map,
                        "Invalid algorithm parameters '%s'", value);
        @SuppressWarnings("unchecked")
        Map<String, Object> parameters = (Map<String, Object>) value;

        AlgorithmPool pool = AlgorithmPool.instance();
        Algorithm algorithm = pool.find(name);
        E.checkArgument(algorithm != null,
                        "There is no algorithm named '%s'", name);
        return algorithm.call(this, parameters);
    
<methods>public non-sealed void <init>() ,public java.lang.Object call() throws java.lang.Exception<variables>