<commit_before>package com.daedafusion.configuration.providers;

import com.daedafusion.configuration.ConfigurationProvider;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.log4j.Logger;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * Created by mphilpot on 6/23/14.
 */
public class FilesystemPropertiesProvider implements ConfigurationProvider
{
    private static final Logger log = Logger.getLogger(FilesystemPropertiesProvider.class);

    private Properties properties;

    public FilesystemPropertiesProvider()
    {
        properties = new Properties();
    }


    @Override
    public String getName()
    {
        return FilesystemPropertiesProvider.class.getName();
    }

    @Override
    public void init() throws IOException
    {
        String file = System.getProperty("filesystemPropertiesFile", "/etc/system.properties");

        InputStream is = FileUtils.openInputStream(new File(file));

        properties.load(is);

        is.close();
    }<commit_msg>Making the filesystem property file location overwritable by the ENV<commit_after>package com.daedafusion.configuration.providers;

import com.daedafusion.configuration.ConfigurationProvider;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.log4j.Logger;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * Created by mphilpot on 6/23/14.
 */
public class FilesystemPropertiesProvider implements ConfigurationProvider
{
    private static final Logger log = Logger.getLogger(FilesystemPropertiesProvider.class);

    private Properties properties;

    public FilesystemPropertiesProvider()
    {
        properties = new Properties();
    }


    @Override
    public String getName()
    {
        return FilesystemPropertiesProvider.class.getName();
    }

    @Override
    public void init() throws IOException
    {
        String file = System.getenv().getOrDefault("filesystemPropertiesFile", System.getProperty("filesystemPropertiesFile", "/etc/system.properties"));

        InputStream is = FileUtils.openInputStream(new File(file));

        properties.load(is);

        is.close();
    }
{'fraction_non_alphanumeric': 0.09484625378951927, 'fraction_numerical': 0.00519705500216544, 'mean_word_length': 3.863157894736842, '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': '3756917', 'n_tokens_mistral': 621, 'n_tokens_neox': 597, 'n_words': 138}