<commit_before>package edu.mit.dig.ama.core;

import android.os.Environment;
import android.util.Log;
import android.view.View;
import android.widget.TextView;

import org.junit.Test;

import java.io.File;
import java.io.Serializable;
import java.util.HashMap;

/**
 * A class used to store public information for either 1) switching between accessible
 * modes, or 2) saving accessibility options for use in other applications through external storage
 * TODO: This class needs to actually store key-val pairs, not to variables
 *       (variables are for demo only)
 * @author <NAME>
 * @author <NAME>
 * @author <NAME>
 * @author <NAME>
 * @version 0.0.1
 */
public class Store {

    static final String LOG_TAG = "Store";
    private static HashMap<View, String> originals = new HashMap<>();

    /**
     * Saves the original text from a string for use in replacing complex
     * strings with more complicated strings
     * @param view the view which had the original string
     * @param original the original string to restore
     */
    public static void saveViewString(View view, String original) {
        originals.put(view, original);
    }

    /**
     * Restores the view's original text
     * TODO: This will be bad if the view was actually changed by the user!
     * @param view The view to restore the original content<commit_msg>Seeing what happens with this commit<commit_after>package edu.mit.dig.ama.core;

import android.os.Environment;
import android.util.Log;
import android.view.View;
import android.widget.TextView;

import org.junit.Test;

import java.io.File;
import java.io.Serializable;
import java.util.HashMap;

/**
 * A class used to store public information for either 1) switching between accessible
 * modes, or 2) saving accessibility options for use in other applications through external storage
 * TODO: This class needs to actually store key-val pairs, not to variables
 *       (variables are for demo only)
 * @author <NAME>
 * @author <NAME>
 * @author <NAME>
 * @author <NAME>
 * @version 0.0.1
 */
public class Store {

    private static final String LOG_TAG = "Store";
    private static HashMap<View, String> originals = new HashMap<>();

    /**
     * Saves the original text from a string for use in replacing complex
     * strings with more complicated strings
     * @param view the view which had the original string
     * @param original the original string to restore
     */
    public static void saveViewString(View view, String original) {
        originals.put(view, original);
    }

    /**
     * Restores the view's original text
     * TODO: This will be bad if the view was actually changed by the user!
     * @param view The view to restore the original content
{'fraction_non_alphanumeric': 0.08318132068588106, 'fraction_numerical': 0.0036483035388544327, 'mean_word_length': 3.4297253634894993, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6640082', 'n_tokens_mistral': 732, 'n_tokens_neox': 717, 'n_words': 319}