<commit_before>package com.rejasupotaro.android.kvs;

import android.content.SharedPreferences;

import com.jakewharton.fliptables.FlipTable;

import java.util.Map;

public class SharedPreferencesTable {
    private static final String[] HEADER = {"Key", "Value", "Type"};

    private SharedPreferences sharedPreferences;
    private String name;
    private String path;

    public SharedPreferencesTable(SharedPreferences sharedPreferences, String name, String path) {
        this.sharedPreferences = sharedPreferences;
        this.name = name;
        this.path = path;
    }

    public SharedPreferences getSharedPreferences() {
        return sharedPreferences;
    }

    public String getName() {
        return name;
    }

    public String getPath() {
        return path;
    }

    private String[][] toArray() {
        String[][] data = new String[sharedPreferences.getAll().size()][3];

        int index = 0;
        for (Map.Entry<String, ?> entry : sharedPreferences.getAll().entrySet()) {
            String key = entry.getKey();
            String value = entry.getValue().toString();
            String type = value.getClass().getSimpleName();

            data[index][0] = key;
            data[index][1] = value;
            data[index][2] = type;

            index++;
        }

        return data;
    }

    @Override
    public String toString() {
        return String.format("\n\n  name: %s\n  path: %s\n%s\n",
                name,
                path,
                FlipTable.of(HEADER, toArray()));
    }
}

<commit_msg>Get class from raw value<commit_after>package com.rejasupotaro.android.kvs;

import android.content.SharedPreferences;

import com.jakewharton.fliptables.FlipTable;

import java.util.Map;

public class SharedPreferencesTable {
    private static final String[] HEADER = {"Key", "Value", "Type"};

    private SharedPreferences sharedPreferences;
    private String name;
    private String path;

    public SharedPreferencesTable(SharedPreferences sharedPreferences, String name, String path) {
        this.sharedPreferences = sharedPreferences;
        this.name = name;
        this.path = path;
    }

    public SharedPreferences getSharedPreferences() {
        return sharedPreferences;
    }

    public String getName() {
        return name;
    }

    public String getPath() {
        return path;
    }

    private String[][] toArray() {
        String[][] data = new String[sharedPreferences.getAll().size()][3];

        int index = 0;
        for (Map.Entry<String, ?> entry : sharedPreferences.getAll().entrySet()) {
            String key = entry.getKey();
            String value = entry.getValue().toString();
            String type = entry.getValue().getClass().getSimpleName();

            data[index][0] = key;
            data[index][1] = value;
            data[index][2] = type;

            index++;
        }

        return data;
    }

    @Override
    public String toString() {
        return String.format("\n\n  name: %s\n  path: %s\n%s\n",
                name,
                path,
                FlipTable.of(HEADER, toArray()));
    }
}


{'fraction_non_alphanumeric': 0.11602034329307057, 'fraction_numerical': 0.003178639542275906, 'mean_word_length': 2.2849686847599164, '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': '6723347', 'n_tokens_mistral': 879, 'n_tokens_neox': 843, 'n_words': 208}