<commit_before><?php
$application  = '@APPLICATION@';
$appDirectory = $application == 'site' ? '' : '/' . $application;
$cmsDirectory = '@CMS_ROOT@';

$_SERVER['HTTP_HOST'] = 'localhost';
$_SERVER['HTTP_USER_AGENT'] = 'none';

define('_JEXEC', 1);
define('DS', DIRECTORY_SEPARATOR);

if (file_exists($cmsDirectory . "$appDirectory/defines.php"))
{
	include_once $cmsDirectory . "$appDirectory/defines.php";
}

if (!defined('JPATH_BASE'))
{
	define('JPATH_BASE', $cmsDirectory . $appDirectory);
	require_once JPATH_BASE . "/includes/defines.php";
}

require_once JPATH_BASE . '/includes/framework.php';

if ($application == 'administrator')
{
	require_once JPATH_BASE . '/includes/helper.php';
	require_once JPATH_BASE . '/includes/toolbar.php';
}
if ($application == 'site')
{
}

require_once $cmsDirectory . '/libraries/loader.php';

$mainframe = JFactory::getApplication($application);

$mainframe->initialise();

echo "\nBootstrap file for PHPUnit: " . __FILE__ . "\n";
<commit_msg>Fixed autoload problem in 1.5 bootstrap<commit_after><?php
$application  = '@APPLICATION@';
$appDirectory = $application == 'site' ? '' : '/' . $application;
$cmsDirectory = '@CMS_ROOT@';

$_SERVER['HTTP_HOST'] = 'localhost';
$_SERVER['HTTP_USER_AGENT'] = 'none';

define('_JEXEC', 1);
define('JPATH_BASE', $cmsDirectory . $appDirectory);
define('DS', DIRECTORY_SEPARATOR);

require_once JPATH_BASE . "/includes/defines.php";

require_once JPATH_LIBRARIES . '/loader.php';
spl_autoload_register(function ($class)
{
	return JLoader::load($class);
});

require_once JPATH_BASE . '/includes/framework.php';

if ($application == 'administrator')
{
	require_once JPATH_BASE . '/includes/helper.php';
	require_once JPATH_BASE . '/includes/toolbar.php';
}
if ($application == 'site')
{
}

$mainframe = JFactory::getApplication($application);
$mainframe->initialise();

echo "\nBootstrap file for PHPUnit: " . __FILE__ . "\n";

{'fraction_non_alphanumeric': 0.18329831932773108, 'fraction_numerical': 0.0021008403361344537, 'mean_word_length': 6.0036764705882355, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6713865', 'n_tokens_mistral': 658, 'n_tokens_neox': 641, 'n_words': 119}