<commit_before><?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace acd;

/**
 * Registry class
 */
class Registry implements \ArrayAccess
{

    /** @var array Registry configuration array */
    private $registry = array();

    /** @var object|null Class instance */
    private static $instance = null;

    /** @var string $key configuration array key */
    private static $key = null;
    
    /** @var string $value configuration array value */
    private static $value = null;

    /**
     * Gets an istance of the Registry class
     * @return Registry|null
     */
    public static function getInstance()
    {
        if (self::$instance === null) {
            self::$instance = new Registry();
        }

        return self::$instance;
    }

    private function __construct() {}

    private function __clone() {}

    private function __wakeup() {}
    
    /**
     * Adds element to registry array
     * @param string $key - registry Key
     * @param mixed $value - registry Value
     * @throws Exception When there is a duplicate $key
     */
    public function set($key, $value)
    {
        if (isset($this->registry[$key])) {
            throw new \Exception("There is already an entry for key: ".$key);
        }
$this->
        $this->registry[$key] = $value;
    }

    /**
     * Retrieves elements from registry array
     * @param string $key
     * @return mixed returns a registry value
     * @throws Exception when no $key found
     */
    public function get($key)
    {<commit_msg>Fix typo<commit_after><?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace acd;

/**
 * Registry class
 */
class Registry implements \ArrayAccess
{

    /** @var array Registry configuration array */
    private $registry = array();

    /** @var object|null Class instance */
    private static $instance = null;

    /** @var string $key configuration array key */
    private static $key = null;
    
    /** @var string $value configuration array value */
    private static $value = null;

    /**
     * Gets an istance of the Registry class
     * @return Registry|null
     */
    public static function getInstance()
    {
        if (self::$instance === null) {
            self::$instance = new Registry();
        }

        return self::$instance;
    }

    private function __construct() {}

    private function __clone() {}

    private function __wakeup() {}
    
    /**
     * Adds element to registry array
     * @param string $key - registry Key
     * @param mixed $value - registry Value
     * @throws Exception When there is a duplicate $key
     */
    public function set($key, $value)
    {
        if (isset($this->registry[$key])) {
            throw new \Exception("There is already an entry for key: ".$key);
        }

        $this->registry[$key] = $value;
    }

    /**
     * Retrieves elements from registry array
     * @param string $key
     * @return mixed returns a registry value
     * @throws Exception when no $key found
     */
    public function get($key)
    {
{'fraction_non_alphanumeric': 0.11167664670658682, 'fraction_numerical': 0.0, 'mean_word_length': 2.3310069790628116, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, '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': '63261', 'n_tokens_mistral': 890, 'n_tokens_neox': 868, 'n_words': 332}