<commit_before>package com.ids1024.whitakerswords;

import java.util.Map;
import android.preference.PreferenceActivity;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Bundle;
import android.app.ActionBar;
import java.io.IOException;
import java.io.FileOutputStream;

public class WhitakersSettings extends PreferenceActivity
                               implements OnSharedPreferenceChangeListener {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        addPreferencesFromResource(R.xml.preferences);

        ActionBar actionBar = getActionBar();
        actionBar.setDisplayHomeAsUpEnabled(true);
    }

    public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
    String changed_key) {
        try {
            FileOutputStream fos = openFileOutput("WORD.MOD", MODE_PRIVATE);
            for (String setting: new String[] {"trim_output",
		    "do_unknowns_only", "ignore_unknown_names",
		    "ignore_unknown_caps", "do_compounds", "do_fixes",
                    "do_dictionary_forms", "show_age", "show_frequency",
		    "do_examples", "do_only_meanings",
		    "do_stems_for_unknown"}) {
		if (sharedPreferences.contains(setting)) {
                    String value = sharedPreferences.getBoolean(setting, false) ? "Y" : "N";
                    String line = setting.toUpperCase() + " " + value + "\n";
                    fos.write(line.getBytes());
		}
            }
            fos.close();
        } catch(IOException e) {
            throw new RuntimeException(e.getMessage());
        }
    }

    @Override<commit_msg>Fix issue with some locales<commit_after>package com.ids1024.whitakerswords;

import java.util.Map;
import java.util.Locale;
import android.preference.PreferenceActivity;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Bundle;
import android.app.ActionBar;
import java.io.IOException;
import java.io.FileOutputStream;

public class WhitakersSettings extends PreferenceActivity
                               implements OnSharedPreferenceChangeListener {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        addPreferencesFromResource(R.xml.preferences);

        ActionBar actionBar = getActionBar();
        actionBar.setDisplayHomeAsUpEnabled(true);
    }

    public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
    String changed_key) {
        try {
            FileOutputStream fos = openFileOutput("WORD.MOD", MODE_PRIVATE);
            for (String setting: new String[] {"trim_output",
		    "do_unknowns_only", "ignore_unknown_names",
		    "ignore_unknown_caps", "do_compounds", "do_fixes",
                    "do_dictionary_forms", "show_age", "show_frequency",
		    "do_examples", "do_only_meanings",
		    "do_stems_for_unknown"}) {
		if (sharedPreferences.contains(setting)) {
                    String value = sharedPreferences.getBoolean(setting, false) ? "Y" : "N";
                    String line = setting.toUpperCase(Locale.US) + " " + value + "\n";
                    fos.write(line.getBytes());
		}
            }
            fos.close();
        } catch(IOException e) {
            throw new RuntimeException(e.getMessage());
        }
    }

    @Override
{'fraction_non_alphanumeric': 0.09735023041474654, 'fraction_numerical': 0.002304147465437788, 'mean_word_length': 3.010392609699769, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '7486877', 'n_tokens_mistral': 954, 'n_tokens_neox': 911, 'n_words': 175}