<commit_before>package io.github.vcuswimlab.stackintheflow.controller.component;

import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.util.xmlb.XmlSerializerUtil;
import org.jetbrains.annotations.Nullable;

import java.util.HashMap;
import java.util.Map;

/**
 * <h1>PersistProfileComponent</h1>
 * Created on: 8/1/2017
 *
 * @author <NAME>
 */

@State(
        name = "ProfileState", storages = {
        @Storage(
                id = "stack-overflow",
                file = "$PROJECT_CONFIG_DIR$/stackoverflow-profile.xml")
})
public class PersistProfileComponent implements PersistentStateComponent<PersistProfileComponent> {

    private Map<String, Integer> userStatMap;

    public Map<String, Integer> getUserStatMap() {
        return userStatMap;
    }

    @Override
    public void noStateLoaded() {
        userStatMap = new HashMap<>();
    }

    @Override
    public void loadState(PersistProfileComponent state) {
        XmlSerializerUtil.copyBean(state, this);
    }<commit_msg>Fix user profile not serializing.<commit_after>package io.github.vcuswimlab.stackintheflow.controller.component;

import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.util.xmlb.XmlSerializerUtil;
import org.jetbrains.annotations.Nullable;

import java.util.HashMap;
import java.util.Map;

/**
 * <h1>PersistProfileComponent</h1>
 * Created on: 8/1/2017
 *
 * @author <NAME>
 */

@State(
        name = "ProfileState", storages = {
        @Storage("stackoverflow-profile.xml")
})
public class PersistProfileComponent implements PersistentStateComponent<PersistProfileComponent> {

    public Map<String, Integer> userStatMap;

    public Map<String, Integer> getUserStatMap() {
        return userStatMap;
    }

    @Override
    public void noStateLoaded() {
        userStatMap = new HashMap<>();
    }

    @Override
    public void loadState(PersistProfileComponent state) {
        XmlSerializerUtil.copyBean(state, this);
    }
{'fraction_non_alphanumeric': 0.10709382151029748, 'fraction_numerical': 0.007322654462242563, 'mean_word_length': 3.9457013574660635, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '1924501', 'n_tokens_mistral': 664, 'n_tokens_neox': 641, 'n_words': 120}