<commit_before><?php

/**
 * Module handler class of Cycle CLI.
 *
 * @author <NAME> <<EMAIL>>
 * @usedby index.php
 */
class Cyclone_Cli_Module {

    // short version of valid modules (module name and short description
    private static $_modules_short = NULL;
    // modules
    private static $_modules = NULL;
    // is the _modules_short and _modules variables initalized
    private static $_initalized = FALSE;
    // currently parsed module
    private static $_curr_module = NULL;
    // currently parsed command
    private static $_curr_command = NULL;

    /** constanst for  depth  of module parsing */
    const MODULE_NAME = 1;
    const MODULE_INFO = 2;
    const COMMAND_NAME = 3;
    const COMMAND_INFO = 4;
    const COMMAND_ARGS = 5;
    const COMMAND_ARG_INFO = 6;

    /**
     * Load the modules and initalize the core variables.
     */
    private static function initalize() {
        self::$_modules = FileSystem::list_files('cli.php', TRUE);
        $i = 0;
        foreach (self::$_modules as $name => $module) {
            if (self::$validate_module($module) == TRUE) {
                $this->_modules_short[$i]['name'] = $name;
                $this->_modules_short[$i]['desc'] = $module['description'];
                $i++;
            }
        }
        if (self::$_modules_short === NULL) {
            self::$_modules_short = array();
        }
        self::$_initalized = TRUE;
    }

    /**
     * Returns with an array of module_names and their short description.
     * @return array
     */
    public static function get_modules_short() {
        if (!self::$_initalized) {
            self::initalize();
        }<commit_msg>Implementation of module validator started. New error class for storing error constants.<commit_after><?php

/**
 * Module handler class of Cycle CLI.
 *
 * @author <NAME> <<EMAIL>>
 * @usedby index.php
 */
class Cyclone_Cli_Module {

    // short version of valid modules (module name and short description
    private static $_modules_short = NULL;
    // modules
    private static $_modules = NULL;
    // is the _modules_short and _modules variables initalized
    private static $_initalized = FALSE;
    // currently parsed module
    private static $_curr_module = NULL;
    // currently parsed command
    private static $_curr_command = NULL;

    /** constanst for  depth  of module parsing */
    const MODULE_NAME = 1;
    const MODULE_INFO = 2;
    const COMMAND_NAME = 3;
    const COMMAND_INFO = 4;
    const COMMAND_ARGS = 5;
    const COMMAND_ARG_INFO = 6;

    /**
     * Load the modules and initalize the core variables.
     */
    private static function initalize() {
        self::$_modules = FileSystem::list_files('cli.php', TRUE);
        $i = 0;
        foreach (self::$_modules as $name => $module) {
            if (self::$validate_module($module) == TRUE) {
                self::$_modules_short[$i]['name'] = $name;
                self::$_modules_short[$i]['desc'] = $module['description'];
                $i++;
            }
        }
        if (self::$_modules_short === NULL) {
            self::$_modules_short = array();
        }
        self::$_initalized = TRUE;
    }

    /**
     * Returns with an array of module_names and their short description.
     * @return array
     */
    public static function get_modules_short() {
        if (!self::$_initalized) {
            self::initalize();
        }
{'fraction_non_alphanumeric': 0.11685655857434998, 'fraction_numerical': 0.00408997955010225, 'mean_word_length': 2.337231968810916, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '5001399', 'n_tokens_mistral': 992, 'n_tokens_neox': 947, 'n_words': 287}