<commit_before>package pl.edu.uj.JImageStream.tests.filters;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.junit.Before;
import pl.edu.uj.JImageStream.collectors.FileCollector;
import pl.edu.uj.JImageStream.collectors.StreamableImageCollector;
import pl.edu.uj.JImageStream.model.StreamableImage;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;

public abstract class AbstractBaseTest {

    protected StreamableImage streamableImage;
    protected Logger logger = LogManager.getLogger("Test");

    @Before
    public void setUp() throws IOException {
        if (!Files.exists(Paths.get("target/docs/images"))) {
            Files.createDirectories(Paths.get("target/docs/images"));
        }
        ClassLoader classLoader = getClass().getClassLoader();
        File file = new File("");
        try {
            file = new File(classLoader.getResource("lena.png").toURI());
            logger.info("loading image");
        } catch (Exception e) {
            e.printStackTrace();
            logger.error("cannot load file from source");
        }

        streamableImage = new StreamableImage(file);

       streamableImage.stream().collect(new FileCollector("png", "target/docs/images/lena.png"));
    }

}<commit_msg>removing logs from tests<commit_after>package pl.edu.uj.JImageStream.tests.filters;

import org.junit.Before;
import pl.edu.uj.JImageStream.collectors.FileCollector;
import pl.edu.uj.JImageStream.model.StreamableImage;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;

public abstract class AbstractBaseTest {

    protected StreamableImage streamableImage;

    @Before
    public void setUp() throws IOException {
        if (!Files.exists(Paths.get("target/docs/images"))) {
            Files.createDirectories(Paths.get("target/docs/images"));
        }
        ClassLoader classLoader = getClass().getClassLoader();
        File file = new File("");
        try {
            file = new File(classLoader.getResource("lena.png").toURI());
        } catch (Exception e) {
            e.printStackTrace();
        }

        streamableImage = new StreamableImage(file);

       streamableImage.stream().collect(new FileCollector("png", "target/docs/images/lena.png"));
    }

}
{'fraction_non_alphanumeric': 0.12436762225969646, 'fraction_numerical': 0.0008431703204047217, 'mean_word_length': 3.2989130434782608, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6207295', 'n_tokens_mistral': 683, 'n_tokens_neox': 676, 'n_words': 126}