<commit_before>package br.net.mirante.singular.form.view;

import br.net.mirante.singular.form.*;
import br.net.mirante.singular.form.type.core.*;
import org.junit.Test;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.function.Function;

import static org.junit.Assert.assertEquals;

public class TestViewResolver {

    private static final String textoTeste = "stringzonamuitolocabemgrandeparaevitarproblemascomarrayoutofboundsnessestestesunitariosaqui";

    @SuppressWarnings({"unchecked"})
    private static <T extends STypeSimple<X, V>, X extends SISimple<V>, V extends Serializable> STypeList<T, X> createSimpleList(
            PackageBuilder pb, String name, Class<T> type, int size, Function<Integer, Object> valueProvider) {
        T simpleType = pb.createType(name, type);
        simpleType.typelessSelection()
                .selfIdAndDisplay()
                .simpleProvider(ins -> (List<V>) repeate(valueProvider, size));
        return pb.createListTypeOf("list" + name, simpleType);
    }

    private static <T> Collection<T> repeate(Function<Integer, T> valueSupplier, int size) {
        ArrayList<T> l = new ArrayList<>(size);
        for (int i = 0; i < size; i++) {
            l.add(valueSupplier.apply(i));
        }
        return l;<commit_msg>[SINGULAR-FORM] removendo cast no test do view resolver<commit_after>package br.net.mirante.singular.form.view;

import br.net.mirante.singular.form.*;
import br.net.mirante.singular.form.type.core.*;
import org.junit.Test;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Collection;
import java.util.Date;
import java.util.function.Function;

import static org.junit.Assert.assertEquals;

public class TestViewResolver {

    private static final String textoTeste = "stringzonamuitolocabemgrandeparaevitarproblemascomarrayoutofboundsnessestestesunitariosaqui";

    @SuppressWarnings({"unchecked"})
    private static <T extends STypeSimple<X, V>, X extends SISimple<V>, V extends Serializable> STypeList<T, X> createSimpleList(
            PackageBuilder pb, String name, Class<T> type, int size, Function<Integer, Object> valueProvider) {
        T simpleType = pb.createType(name, type);
        simpleType.typelessSelection()
                .selfIdAndDisplay()
                .simpleProvider(ins -> repeate(valueProvider, size));
        return pb.createListTypeOf("list" + name, simpleType);
    }

    private static <T> List<T> repeate(Function<Integer, T> valueSupplier, int size) {
        ArrayList<T> l = new ArrayList<>(size);
        for (int i = 0; i < size; i++) {
            l.add(valueSupplier.apply(i));
        }
        return l;
{'fraction_non_alphanumeric': 0.11322789360172537, 'fraction_numerical': 0.0007189072609633358, 'mean_word_length': 3.7329931972789114, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 28, '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': '4233316', 'n_tokens_mistral': 847, 'n_tokens_neox': 831, 'n_words': 197}