<commit_before>package org.metaborg.spoofax.shell.commands;

import java.util.function.Consumer;

import com.google.inject.Inject;
import com.google.inject.name.Named;

/**
 * Command for evaluating the String as an expression in some language.
 */
public class SpoofaxEvaluationCommand implements IReplCommand {
    private static final String DESCRIPTION = "Given an expression, evaluate it and show the result"
                                              + " of it when it succeeded, otherwise show the"
                                              + " error.";
    private Consumer<String> onSuccess;
    private Consumer<String> onError;

    /**
     * Create an {@link IEvaluationCommand}.
     *
     * TODO: Create more specific interfaces for the hooks, which can accept more parameters. The
     * parameters that are needed are currently unknown.
     *
     * @param onSuccess
     *            Called upon success by the created {@link IEvaluationCommand}.
     * @param onError
     *            Called upon an error by the created {@link IEvaluationCommand}.
     */
    @Inject
    SpoofaxEvaluationCommand(@Named("onSuccess") Consumer<String> onSuccess,
                             @Named("onError") Consumer<String> onError) {
        this.onSuccess = onSuccess;
        this.onError = onError;
    }

    @Override
    public String description() {
        return DESCRIPTION;
    }

    /**
     * Evaluate the given String as an expression in some language.
     *
     * @param args
     *            The String to be parsed and executed.
     */
    public void execute(String... args) {
        onSuccess.accept("Hai, good job.");
        onError.accept("Oh no..");
    }
}
<commit_msg>Update JavaDoc references in EvalCommand<commit_after>package org.metaborg.spoofax.shell.commands;

import java.util.function.Consumer;

import com.google.inject.Inject;
import com.google.inject.name.Named;

/**
 * Command for evaluating the String as an expression in some language.
 */
public class SpoofaxEvaluationCommand implements IReplCommand {
    private static final String DESCRIPTION = "Given an expression, evaluate it and show the result"
                                              + " of it when it succeeded, otherwise show the"
                                              + " error.";
    private Consumer<String> onSuccess;
    private Consumer<String> onError;

    /**
     * Create an {@link SpoofaxEvaluationCommand}.
     *
     * TODO: Create more specific interfaces for the hooks, which can accept more parameters. The
     * parameters that are needed are currently unknown.
     *
     * @param onSuccess
     *            Called upon success by the created {@link SpoofaxEvaluationCommand}.
     * @param onError
     *            Called upon an error by the created {@link SpoofaxEvaluationCommand}.
     */
    @Inject
    SpoofaxEvaluationCommand(@Named("onSuccess") Consumer<String> onSuccess,
                             @Named("onError") Consumer<String> onError) {
        this.onSuccess = onSuccess;
        this.onError = onError;
    }

    @Override
    public String description() {
        return DESCRIPTION;
    }

    /**
     * Evaluate the given String as an expression in some language.
     *
     * @param args
     *            The String to be parsed and executed.
     */
    public void execute(String... args) {
        onSuccess.accept("Hai, good job.");
        onError.accept("Oh no..");
    }
}

{'fraction_non_alphanumeric': 0.08517985611510791, 'fraction_numerical': 0.0, 'mean_word_length': 2.1628753412192903, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2658707', 'n_tokens_mistral': 898, 'n_tokens_neox': 856, 'n_words': 292}