<commit_before>package org.metaborg.sunshine;

import org.metaborg.spoofax.core.SpoofaxModule;
import org.metaborg.spoofax.core.stratego.StrategoRuntimeService;
import org.metaborg.sunshine.drivers.SunshineMainDriver;
import org.metaborg.sunshine.environment.LaunchConfiguration;
import org.metaborg.sunshine.environment.SunshineMainArguments;
import org.metaborg.sunshine.prims.SunshineLibrary;
import org.metaborg.sunshine.statistics.Statistics;
import org.spoofax.interpreter.library.IOperatorRegistry;

import com.google.inject.multibindings.Multibinder;
import com.google.inject.name.Names;

public class SunshineModule extends SpoofaxModule {
    private final SunshineMainArguments args;

    public SunshineModule(SunshineMainArguments args) {
        this.args = args;
    }

    @Override protected void bindOther() {
        bind(SunshineMainArguments.class).toInstance(args);
        bind(LaunchConfiguration.class).asEagerSingleton();
        bind(SunshineMainDriver.class).asEagerSingleton();
        bind(StrategoRuntimeService.class).asEagerSingleton();
        bind(Statistics.class).asEagerSingleton();

        final Multibinder<IOperatorRegistry> strategoLibraryBinder =
            Multibinder.newSetBinder(binder(), IOperatorRegistry.class);
        strategoLibraryBinder.addBinding().toInstance(new SunshineLibrary());

        bind(String.class).annotatedWith(Names.named("LanguageDiscoveryAnalysisOverride")).toInstance("analysis-cmd");
        bind(ClassLoader.class).annotatedWith(Names.named("ResourceClassLoader")).toInstance(
            this.getClass().getClassLoader());
    }
}<commit_msg>Split up Spoofax module.<commit_after>package org.metaborg.sunshine;

import org.metaborg.spoofax.core.SpoofaxModule;
import org.metaborg.spoofax.core.stratego.StrategoRuntimeService;
import org.metaborg.sunshine.drivers.SunshineMainDriver;
import org.metaborg.sunshine.environment.LaunchConfiguration;
import org.metaborg.sunshine.environment.SunshineMainArguments;
import org.metaborg.sunshine.prims.SunshineLibrary;
import org.metaborg.sunshine.statistics.Statistics;
import org.spoofax.interpreter.library.IOperatorRegistry;

import com.google.inject.multibindings.Multibinder;

public class SunshineModule extends SpoofaxModule {
    private final SunshineMainArguments args;

    
    public SunshineModule(SunshineMainArguments args) {
        this.args = args;
    }


    @Override protected void configure() {
        super.configure();

        bind(SunshineMainArguments.class).toInstance(args);
        bind(LaunchConfiguration.class).asEagerSingleton();
        bind(SunshineMainDriver.class).asEagerSingleton();
        bind(StrategoRuntimeService.class).asEagerSingleton();
        bind(Statistics.class).asEagerSingleton();

        final Multibinder<IOperatorRegistry> strategoLibraryBinder =
            Multibinder.newSetBinder(binder(), IOperatorRegistry.class);
        strategoLibraryBinder.addBinding().toInstance(new SunshineLibrary());
    }
}
{'fraction_non_alphanumeric': 0.09796054831160148, 'fraction_numerical': 0.0, 'mean_word_length': 5.020120724346077, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5530149', 'n_tokens_mistral': 881, 'n_tokens_neox': 865, 'n_words': 109}