<commit_before>package com.fatico.winthing;

import java.io.File;

import com.fatico.winthing.messaging.MessagingModule;
import com.fatico.winthing.windows.WindowsModule;

import com.google.gson.Gson;
import com.google.inject.AbstractModule;
import com.google.inject.Provides;
import com.google.inject.Singleton;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
import com.typesafe.config.ConfigParseOptions;
import com.typesafe.config.ConfigSyntax;

public class ApplicationModule extends AbstractModule {
	public static final String ConfigFile = "winthing.conf";
	
    @Override
    protected void configure() {
        bind(Gson.class).in(Singleton.class);

        install(new MessagingModule());
        install(new WindowsModule());

        install(new com.fatico.winthing.systems.system.Module());
        install(new com.fatico.winthing.systems.keyboard.Module());
        install(new com.fatico.winthing.systems.desktop.Module());
    }

    @Provides
    @Singleton
    Config config() {
    	Config cfg = ConfigFactory.load();
    	
    	String path = System.getProperty("user.dir") + File.separator + ConfigFile;
    	
    	System.out.println(path);
    	
    	File fp = new File(path);
    	if (fp.exists()) {
    		ConfigParseOptions options = ConfigParseOptions.defaults();
    		options.setSyntax(ConfigSyntax.CONF);
    		
    		cfg = ConfigFactory.parseFile(fp).withFallback(cfg);
    	}
        
        return cfg;
    }
}<commit_msg>Include Windows modules only when running on Windows platform<commit_after>package com.fatico.winthing;

import java.io.File;

import com.fatico.winthing.messaging.MessagingModule;
import com.fatico.winthing.windows.WindowsModule;

import com.google.gson.Gson;
import com.google.inject.AbstractModule;
import com.google.inject.Provides;
import com.google.inject.Singleton;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
import com.typesafe.config.ConfigParseOptions;
import com.typesafe.config.ConfigSyntax;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

public class ApplicationModule extends AbstractModule {
	public static final String ConfigFile = "winthing.conf";
	
    @Override
    protected void configure() {
        bind(Gson.class).in(Singleton.class);

        install(new MessagingModule());
        if (System.getProperty("os.name").toLowerCase().contains("win")) {
        	install(new WindowsModule());
        	
        	install(new com.fatico.winthing.systems.system.Module());
        	install(new com.fatico.winthing.systems.keyboard.Module());
        	install(new com.fatico.winthing.systems.desktop.Module());
        }
    }

    @Provides
    @Singleton
    @SuppressFBWarnings("RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT")
    Config config() {
    	Config cfg = ConfigFactory.load();
    	
    	String path = System.getProperty("user.dir") + File.separator + ConfigFile;
    	
    	System.out.println(path);
    	
    	File fp = new File(path);
    	if (fp.exists()) {
    		ConfigParseOptions options = ConfigParseOptions.defaults();
    		options.setSyntax(ConfigSyntax.CONF);
    		
    		cfg = ConfigFactory.parseFile(fp, options).withFallback(cfg);
    	}
        
        return cfg;
    }
}
{'fraction_non_alphanumeric': 0.11271943332306744, 'fraction_numerical': 0.0, 'mean_word_length': 3.4493150684931506, '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': '4226786', 'n_tokens_mistral': 1013, 'n_tokens_neox': 987, 'n_words': 168}