<commit_before>package org.stefanl.closure_utilities.internal;


import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import org.stefanl.closure_utilities.utilities.FsTool;

import javax.annotation.Nonnull;
import java.io.File;
import java.util.Collection;
import java.util.List;

public abstract class AbstractBuildTest<A extends AbstractBuilder<B>, B> {

    protected final A builder;

    protected final Class<B> buildOptionsClass;

    protected B builderOptions;

    protected File outputDirectory;

    protected AbstractBuildTest(@Nonnull Class<A> builderClass,
                                @Nonnull Class<B> buildOptionsClass)
            throws InstantiationException, IllegalAccessException {
        builder = builderClass.newInstance();
        this.buildOptionsClass = buildOptionsClass;
    }


    protected void setUp() throws Exception {
        builderOptions = buildOptionsClass.newInstance();
        builder.setBuildOptions(builderOptions);
        outputDirectory = FsTool.getTempDirectory();
    }

    protected void tearDown() throws Exception {
        outputDirectory = null;
        builderOptions = null;
        builder.reset();
    }

    @Nonnull
    protected File getApplicationDirectory() {
        return new File("src/test/resources/app");
    }

    @Nonnull
    protected File getApplicationDirectory(String path) {
        return new File(getApplicationDirectory(), path);
    }

    @Nonnull
    protected Collection<File> getGssSourceDirectories() {
        return Sets.newHashSet(getApplicationDirectory("src/gss/"));
    }

    @Nonnull
    protected List<String> getGssEntryPoints() {
        return Lists.newArrayList(Lists.newArrayList("company-import"));
    }

    @Nonnull
    protected Collection<File> getSoySourceDirectories() {
        return Sets.newHashSet(getApplicationDirectory("src/soy"));
    }


}<commit_msg>modify function return types for abstract build test<commit_after>package org.stefanl.closure_utilities.internal;


import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import org.stefanl.closure_utilities.utilities.FsTool;

import javax.annotation.Nonnull;
import java.io.File;
import java.util.ArrayList;
import java.util.HashSet;

public abstract class AbstractBuildTest<A extends AbstractBuilder<B>, B> {

    protected final A builder;

    protected final Class<B> buildOptionsClass;

    protected B builderOptions;

    protected File outputDirectory;

    protected AbstractBuildTest(@Nonnull Class<A> builderClass,
                                @Nonnull Class<B> buildOptionsClass)
            throws InstantiationException, IllegalAccessException {
        builder = builderClass.newInstance();
        this.buildOptionsClass = buildOptionsClass;
    }


    protected void setUp() throws Exception {
        builderOptions = buildOptionsClass.newInstance();
        builder.setBuildOptions(builderOptions);
        outputDirectory = FsTool.getTempDirectory();
    }

    protected void tearDown() throws Exception {
        outputDirectory = null;
        builderOptions = null;
        builder.reset();
    }

    @Nonnull
    protected File getApplicationDirectory() {
        return new File("src/test/resources/app");
    }

    @Nonnull
    protected File getApplicationDirectory(String path) {
        return new File(getApplicationDirectory(), path);
    }

    @Nonnull
    protected HashSet<File> getGssSourceDirectories() {
        return Sets.newHashSet(getApplicationDirectory("src/gss/"));
    }

    @Nonnull
    protected ArrayList<String> getGssEntryPoints() {
        return Lists.newArrayList(Lists.newArrayList("company-import"));
    }

    @Nonnull
    protected HashSet<File> getSoySourceDirectories() {
        return Sets.newHashSet(getApplicationDirectory("src/soy"));
    }

    @Nonnull
    protected ArrayList<String> getJavascriptEntryPoints() {
        return Lists.newArrayList("");
    }

    @Nonnull
    protected HashSet<File> getJavascriptSourceDirectories() {
        return Sets.newHashSet(getApplicationDirectory("src/javascript"));
    }


}
{'fraction_non_alphanumeric': 0.08996120271580989, 'fraction_numerical': 0.0, 'mean_word_length': 3.3929712460063897, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '6989914', 'n_tokens_mistral': 1110, 'n_tokens_neox': 1065, 'n_words': 229}