<commit_before>package test.query;

import java.io.IOException;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import javax.json.JsonArray;
import javax.json.JsonNumber;
import javax.json.JsonObject;
import test.data.dye.Dye;
import test.data.dye.DyeFactory;
import static test.query.QueryUtils.*;

/**
 * Permet de faire des requêtes sur l'endpoint Colors.
 * @author <NAME>
 */
public enum ColorsQuery {

    INSTANCE;

    private static final String basecode = "https://api.guildwars2.com/v2/colors"; // NOI18N.

    public static List<Integer> list() throws IOException {
        final JsonArray array = queryArray(basecode);
        final List<Integer> result = array.getValuesAs(JsonNumber.class)
                .stream()
                .map(value -> value.intValue())
                .collect(Collectors.toList());
        return Collections.unmodifiableList(result);
    }

    public static Dye dyeInfo(final String languageCode, final int id) throws IOException {
        final JsonObject value = QueryUtils.queryObject(String.format("%s/%d?lang=%s", basecode, id, languageCode)); // NOI18N.
        final Dye result = DyeFactory.createDyeFromJSON(value);
        return result;
    }

    public static List<Dye> dyeInfos(final String languageCode, final int... ids) throws IOException {
        final String idsCode = idsToString(ids);
        final JsonArray array = queryArray(String.format("%s?ids=%s&lang=%s", basecode, idsCode, languageCode)); // NOI18N.
        final List<Dye> result = array.getValuesAs(JsonObject.class)
                .stream()
                .map(value -> DyeFactory.createDyeFromJSON(value))
                .collect(Collectors.toList());
        return Collections.unmodifiableList(result);
    }
}
<commit_msg>Spelling.<commit_after>package test.query;

import java.io.IOException;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import javax.json.JsonArray;
import javax.json.JsonNumber;
import javax.json.JsonObject;
import test.data.dye.Dye;
import test.data.dye.DyeFactory;
import static test.query.QueryUtils.*;

/**
 * Permet de faire des requêtes sur l'endpoint Colors.
 * @author <NAME>
 */
public enum ColorsQuery {

    INSTANCE;

    private static final String BASECODE = "https://api.guildwars2.com/v2/colors"; // NOI18N.

    public static List<Integer> list() throws IOException {
        final JsonArray array = queryArray(BASECODE);
        final List<Integer> result = array.getValuesAs(JsonNumber.class)
                .stream()
                .map(value -> value.intValue())
                .collect(Collectors.toList());
        return Collections.unmodifiableList(result);
    }

    public static Dye dyeInfo(final String languageCode, final int id) throws IOException {
        final JsonObject value = QueryUtils.queryObject(String.format("%s/%d?lang=%s", BASECODE, id, languageCode)); // NOI18N.
        final Dye result = DyeFactory.createDyeFromJSON(value);
        return result;
    }

    public static List<Dye> dyeInfos(final String languageCode, final int... ids) throws IOException {
        final String idsCode = idsToString(ids);
        final JsonArray array = queryArray(String.format("%s?ids=%s&lang=%s", BASECODE, idsCode, languageCode)); // NOI18N.
        final List<Dye> result = array.getValuesAs(JsonObject.class)
                .stream()
                .map(value -> DyeFactory.createDyeFromJSON(value))
                .collect(Collectors.toList());
        return Collections.unmodifiableList(result);
    }
}

{'fraction_non_alphanumeric': 0.11491374513077351, 'fraction_numerical': 0.004451864218141347, 'mean_word_length': 3.132183908045977, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, 'https://': 2, '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': '5808693', 'n_tokens_mistral': 1063, 'n_tokens_neox': 1033, 'n_words': 244}