<commit_before><?php
set_include_path(
  __DIR__ . "/../src" .
  PATH_SEPARATOR .
  get_include_path()
);

if (file_exists(__DIR__ . "/../vendor/autoload.php")) {
    require(__DIR__ . "/../vendor/autoload.php");
}
spl_autoload_register(function($class_name)
  {
    $class_name = ltrim($class_name, "\\");
    $file_name  = "";
    if ($pos_last = strrpos($class_name, "\\")) {
      $namespace  = substr($class_name, 0, $pos_last);
      $class_name = substr($class_name, $pos_last + 1);
      $file_name  = str_replace("\\", DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
        if (strpos($file_name, "Headzoo\\Utilities\\Tests\\") === 0) {
            $file_name = str_replace("\\Tests", "", $file_name);
            $file_name = __DIR__ . "\\{$file_name}";
        }
    }
    $file_name .= str_replace("_", DIRECTORY_SEPARATOR, $class_name) . ".php";<commit_msg>Handling test namespaces<commit_after><?php
set_include_path(
  __DIR__ . "/../src" .
  PATH_SEPARATOR .
  get_include_path()
);

if (file_exists(__DIR__ . "/../vendor/autoload.php")) {
    require(__DIR__ . "/../vendor/autoload.php");
}
spl_autoload_register(function($class_name)
  {
    $class_name = ltrim($class_name, "\\");
    $file_name  = "";
    if ($pos_last = strrpos($class_name, "\\")) {
      $namespace  = substr($class_name, 0, $pos_last);
      $class_name = substr($class_name, $pos_last + 1);
      $file_name  = str_replace("\\", DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
        
        if (strpos($file_name, "Headzoo\\Utilities\\Tests\\") === 0) {
            $file_name = str_replace("\\Tests", "", $file_name);
            $file_name = __DIR__ . "\\{$file_name}";
        } else if ('Exceptions\\' === $file_name) {
            $file_name = __DIR__ . "\\Headzoo\\Utilities\\Exceptions\\";
        }
    }
    $file_name .= str_replace("_", DIRECTORY_SEPARATOR, $class_name) . ".php";
{'fraction_non_alphanumeric': 0.19337887545980031, 'fraction_numerical': 0.0031529164477141357, 'mean_word_length': 2.9749478079331944, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '1028240', 'n_tokens_mistral': 701, 'n_tokens_neox': 684, 'n_words': 100}