<commit_before>package flounder.engine.profiling;

import javax.swing.*;
import java.util.HashMap;
import java.util.Optional;

/**
 * Created by <NAME> on 4/4/2016.
 * Wraps a few methods around JTabbedPane for convenience
 */
public class FlounderTabMenu extends JTabbedPane {

    private HashMap<String, JPanel> Components;

    public FlounderTabMenu() {
        super(SwingConstants.TOP, WRAP_TAB_LAYOUT);
    }

    private JPanel createTab(String tabName) {
        JPanel primaryComponent = new JPanel();
        super.addTab(tabName, primaryComponent);
        return primaryComponent;
    }

    public void createCategory(String categoryName) {
        JPanel swingFrame = this.createTab(categoryName);
        Components.put(categoryName, swingFrame);
    }

    public Optional<JPanel> getCategoryComponent(String categoryName) {
        if (Components.containsKey(categoryName)) {
            return Optional.of(Components.get(categoryName));<commit_msg>continued development on TabMenu. NOTE: this code currently throws NullPointerException on line 26 dealing w/ the hashmap<commit_after>package flounder.engine.profiling;

import javax.swing.*;
import java.util.HashMap;
import java.util.Optional;

/**
 * Created by <NAME> on 4/4/2016.
 * Wraps a few methods around JTabbedPane for convenience
 */
public class FlounderTabMenu extends JTabbedPane {

    private HashMap<String, JPanel> Components;

    public FlounderTabMenu() {
        super(SwingConstants.TOP, WRAP_TAB_LAYOUT);
    }

    public void createCategory(String categoryName) {
        JPanel primaryComponent = new JPanel();
        System.out.println(primaryComponent);
        super.addTab(categoryName, primaryComponent);
        System.out.println(primaryComponent);
        Components.put(categoryName, primaryComponent);
    }

    public Optional<JPanel> getCategoryComponent(String categoryName) {
        if (Components.containsKey(categoryName)) {
            return Optional.of(Components.get(categoryName));
{'fraction_non_alphanumeric': 0.08941058941058941, 'fraction_numerical': 0.006993006993006993, 'mean_word_length': 3.803357314148681, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '5707622', 'n_tokens_mistral': 565, 'n_tokens_neox': 534, 'n_words': 134}