<commit_before><?php

namespace Extlib;

use Extlib\System\IpAddress,
    Extlib\System\Url,
    Extlib\System;

/**
 * Utils class
 *
 * @category    Extlib
 * @author      <NAME> <<EMAIL>> 
 * @copyright   Copyright (c) <NAME> (mart)
 */
final class Utils
{
    /**
     * Sign code namespace
     */
    const SIGN_NAMESPACE = 'sing';

    /**
     * Instance of ip address obejct
     * 
     * @var \Extlib\System\IpAddress
     */
    protected $ipAddress = null;

    /**
     * Instance of url address
     * 
     * @var Extlib\System\Url
     */
    protected $urlAddress = null;

    /**
     * Instance of system
     * 
     * @var \Extlib\System
     */
    protected $system = null;

    /**
     * Istance of utils object
     *
     * @var Utils 
     */
    static private $instance = null;

    /**
     * Instance of construct
     */
    private function __construct()
    {
        $this->system = System::getInstance();
        $this->ipAddress = new IpAddress();
        $this->urlAddress = new Url();
    }

    /**
     * Get instance of utils
     * 
     * @return Utils
     */
    static public function getInstance()
    {
        if (null === self::$instance) {
            self::$instance = new Utils();
        }

        return self::$instance;
    }

    /**
     * Return short text
     * 
     * @param string $text
     * @param integer $length
     * <commit_msg>Modified utils<commit_after><?php

namespace Extlib;

use Extlib\System\IpAddress,
    Extlib\System\Url;

/**
 * Utils class
 *
 * @category    Extlib
 * @author      <NAME> <<EMAIL>> 
 * @copyright   Copyright (c) <NAME> (mart)
 */
final class Utils
{
    /**
     * Sign code namespace
     */
    const SIGN_NAMESPACE = 'sing';

    /**
     * Instance of ip address obejct
     * 
     * @var \Extlib\System\IpAddress
     */
    protected $ipAddress = null;

    /**
     * Instance of url address
     * 
     * @var Extlib\System\Url
     */
    protected $urlAddress = null;

    /**
     * Instance of system
     * 
     * @var \Extlib\System
     */
    protected $system = null;

    /**
     * Istance of utils object
     *
     * @var Utils 
     */
    static private $instance = null;

    /**
     * Instance of construct
     */
    private function __construct()
    {
        $this->system = \Extlib\System::getInstance();
        $this->ipAddress = new IpAddress();
        $this->urlAddress = new Url();
    }

    /**
     * Get instance of utils
     * 
     * @return Utils
     */
    static public function getInstance()
    {
        if (null === self::$instance) {
            self::$instance = new Utils();
        }

        return self::$instance;
    }

    /**
     * Return short text
     * 
     * @param string $text
     * @param integer $length
     * 
{'fraction_non_alphanumeric': 0.13152251608291637, 'fraction_numerical': 0.0, 'mean_word_length': 1.6861804222648753, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, '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': '2193328', 'n_tokens_mistral': 874, 'n_tokens_neox': 866, 'n_words': 212}