<commit_before>package fi.evident.apina.cli;

import java.util.ArrayList;
import java.util.List;
import java.util.Optional;

final class CommandLineArguments {

    public final List<String> files = new ArrayList<>();
    public final List<String> blackBoxPatterns = new ArrayList<>();

    private void parse(String arg) {
        // The could be more general, but this is all we need for now.

        Optional<String> blackBox = parseOptionalWithValue("black-box", arg);

        if (blackBox.isPresent()) {
            blackBoxPatterns.add(blackBox.get());
        } else {
            files.add(arg);
        }
    }

    private static Optional<String> parseOptionalWithValue(String name, String arg) {
        String prefix = "--" + name + "=";
        if (arg.startsWith(prefix))
            return Optional.of(arg.substring(prefix.length()));
        else
            return Optional.empty();
    }

    public static CommandLineArguments parse(String[] args) {
        CommandLineArguments result = new CommandLineArguments();

        for (String arg : args)
            result.parse(arg);

        return result;
    }
}
<commit_msg>Fix typo in comment<commit_after>package fi.evident.apina.cli;

import java.util.ArrayList;
import java.util.List;
import java.util.Optional;

final class CommandLineArguments {

    public final List<String> files = new ArrayList<>();
    public final List<String> blackBoxPatterns = new ArrayList<>();

    private void parse(String arg) {
        // This could be more general, but this is all we need for now.

        Optional<String> blackBox = parseOptionalWithValue("black-box", arg);

        if (blackBox.isPresent()) {
            blackBoxPatterns.add(blackBox.get());
        } else {
            files.add(arg);
        }
    }

    private static Optional<String> parseOptionalWithValue(String name, String arg) {
        String prefix = "--" + name + "=";
        if (arg.startsWith(prefix))
            return Optional.of(arg.substring(prefix.length()));
        else
            return Optional.empty();
    }

    public static CommandLineArguments parse(String[] args) {
        CommandLineArguments result = new CommandLineArguments();

        for (String arg : args)
            result.parse(arg);

        return result;
    }
}

{'fraction_non_alphanumeric': 0.11057901610796692, 'fraction_numerical': 0.0, 'mean_word_length': 2.5683229813664594, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7060594', 'n_tokens_mistral': 619, 'n_tokens_neox': 604, 'n_words': 167}