<commit_before>package net.cserny.videosmover;

import com.google.common.collect.Sets;
import dagger.Module;
import dagger.Provides;
import dagger.multibindings.IntoSet;
import info.movito.themoviedbapi.TmdbApi;
import net.cserny.videosmover.error.GlobalExceptionCatcher;
import net.cserny.videosmover.service.*;
import net.cserny.videosmover.service.parser.*;
import net.cserny.videosmover.service.validator.*;

import javax.inject.Singleton;
import java.util.HashSet;
import java.util.Set;

@Module
public class CoreModule {

    @Provides
    public Set<VideoNameParser> videoNameParsers(VideoNameTrimmer trimmer,
                                                 CachedVideoRetriever retriever,
                                                 VideoExistenceChecker checker) {
        Set<VideoNameParser> parsers = new HashSet<>();
        parsers.add(trimmer);
        parsers.add(retriever);
        parsers.add(checker);
        return parsers;
    }

    @Provides
    public Set<VideoValidator> videoValidators(VideoPathValidator pathValidator,
                                               VideoTypeValidator typeValidator,
                                               VideoSizeValidator sizeValidator) {
        Set<VideoValidator> validators = new HashSet<>();
        validators.add(pathValidator);
        validators.add(typeValidator);
        validators.add(sizeValidator);
        return validators;
    }

    @Provides @IntoSet
    public RemovalRestriction mainPathsRestriction(MainPathsRestriction mainPathsRestriction) {
        return mainPathsRestriction;
    }

    @Provides @IntoSet
    public RemovalRestriction customPathsRestriction(CustomPathsRestriction customPathsRestriction) {<commit_msg>fixes order of injected sets<commit_after>package net.cserny.videosmover;

import com.google.common.collect.Sets;
import dagger.Module;
import dagger.Provides;
import dagger.multibindings.IntoSet;
import info.movito.themoviedbapi.TmdbApi;
import net.cserny.videosmover.error.GlobalExceptionCatcher;
import net.cserny.videosmover.service.*;
import net.cserny.videosmover.service.parser.*;
import net.cserny.videosmover.service.validator.*;

import javax.inject.Singleton;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;

@Module
public class CoreModule {

    @Provides
    public Set<VideoNameParser> videoNameParsers(VideoNameTrimmer trimmer,
                                                 CachedVideoRetriever retriever,
                                                 VideoExistenceChecker checker) {
        Set<VideoNameParser> parsers = new LinkedHashSet<>();
        parsers.add(trimmer);
        parsers.add(retriever);
        parsers.add(checker);
        return parsers;
    }

    @Provides
    public Set<VideoValidator> videoValidators(VideoPathValidator pathValidator,
                                               VideoTypeValidator typeValidator,
                                               VideoSizeValidator sizeValidator) {
        Set<VideoValidator> validators = new LinkedHashSet<>();
        validators.add(pathValidator);
        validators.add(typeValidator);
        validators.add(sizeValidator);
        return validators;
    }

    @Provides @IntoSet
    public RemovalRestriction mainPathsRestriction(MainPathsRestriction mainPathsRestriction) {
        return mainPathsRestriction;
    }

    @Provides @IntoSet
    public RemovalRestriction customPathsRestriction(CustomPathsRestriction customPathsRestriction) {
{'fraction_non_alphanumeric': 0.07490743377954999, 'fraction_numerical': 0.0, 'mean_word_length': 2.756149732620321, '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': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2493143', 'n_tokens_mistral': 963, 'n_tokens_neox': 911, 'n_words': 166}