<commit_before>//=========================================
//  <NAME>
//  AUT University 2015
//  https://github.com/denkers/graphi
//=========================================

package com.graphi.app;

import com.graphi.config.ConfigManager;
import com.graphi.display.Window;
import com.graphi.error.ErrorManager;
import com.graphi.plugins.PluginManager;


/**
* Graphi entry point
* Starts Graphi and initializes it's managers
* Conceptually views Graphi plugins, config and display
*/

public final class AppManager 
{
    private static AppManager instance;
    private final ConfigManager configManager; //Manages stored configs
    private final PluginManager pluginManager; //Manages loading & active plugins
    private final ErrorManager errorManager; // Manages error messages & dumping
    private final Window window; //Handles display of the application
    
    private AppManager()
    {
        errorManager    =   new ErrorManager(this);
        configManager   =   new ConfigManager();
        window          =   Window.getWindowInstance();
        pluginManager   =   new PluginManager(this);   
    }
    
    /**
    * @return The Graphi config manager that handles all stored configs
    */
    public ConfigManager getConfigManager()
    {
        return configManager;
    }
    
    /**
    * @return The Graphi plugin manager for loading plugins & handeling active plugins
    */
    public PluginManager getPluginManager()
    {
        return pluginManager;
    }
    
    /**
    * @return The Graphi layout/display manager
    * Has access to the apps menu and frame
    */
    public Window getWindow()
    {
        return window;
    }
    
    /**
    * @return Starts Graphi by initializing & displaying the applications frame
    */
    private void start()
    {
        window.initFrame();
    }

    public static AppManager getInstance()
    {
        if(instance == null) instance = new AppManager();<commit_msg>Updated app.AppManager to initialize startupManager and poll listeners<commit_after>//=========================================
//  <NAME>
//  AUT University 2015
//  https://github.com/denkers/graphi
//=========================================

package com.graphi.app;

import com.graphi.config.ConfigManager;
import com.graphi.display.Window;
import com.graphi.error.ErrorManager;
import com.graphi.plugins.PluginManager;


/**
* Graphi entry point
* Starts Graphi and initializes it's managers
* Conceptually views Graphi plugins, config and display
*/

public final class AppManager 
{
    private static AppManager instance;
    private final ConfigManager configManager; //Manages stored configs
    private final PluginManager pluginManager; //Manages loading & active plugins
    private final ErrorManager errorManager; // Manages error messages & dumping
    private final StartupManager startupManager;
    private final Window window; //Handles display of the application
    
    private AppManager(String[] args)
    {
        errorManager    =   new ErrorManager(this);
        configManager   =   new ConfigManager();
        window          =   Window.getWindowInstance();
        pluginManager   =   new PluginManager(this); 
        
        startupManager  =   StartupManager.createInstance(args);
        startupManager.pollListeners();
    }
    
    /**
    * @return The Graphi config manager that handles all stored configs
    */
    public ConfigManager getConfigManager()
    {
        return configManager;
    }
    
    /**
    * @return The Graphi plugin manager for loading plugins & handeling active plugins
    */
    public PluginManager getPluginManager()
    {
        return pluginManager;
    }
    
    /**
    * @return The Graphi layout/display manager
    * Has access to the apps menu and frame
    */
    public Window getWindow()
    {
        return window;
    }
    
    /**
    * @return Starts Graphi by initializing & displaying the applications frame
    */
    private void start()
    {
        window.initFrame();
    }

    public static AppManager createInstance(String[] args)
    {
        if(instance == null) instance = new AppManager(args);
        return instance;
    }
    
    public static AppManager getInstance()
    {
{'fraction_non_alphanumeric': 0.11551155115511551, 'fraction_numerical': 0.001885902876001886, 'mean_word_length': 2.748233215547703, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '3379299', 'n_tokens_mistral': 1090, 'n_tokens_neox': 1057, 'n_words': 333}