<commit_before><?php
/**
 * This file contains the core functions.
 *
 * @author		<NAME> <<EMAIL>>
 * @copyright	2012 <NAME> <<EMAIL>>
 * @license		https://github.com/Falc/Aluminium/blob/master/LICENSE New BSD License
 * @package		Aluminium
 * @subpackage	Core
 */

/**
 * Returns an instance of the specified component.
 *
 * This method looks for the $component. If the $class_file exists, it is included and an instance is created and returned.
 *
 * @param	string	$component	Name of the component to load.
 * @return	mixed	A component instance.
 */
function load_component($component) {
	// If the class is not already included, do it
	if(!class_exists($component, FALSE)) {
		$class_file = ALUMINIUM_COMPONENTS.$component.'/'.$component.'.php';

		// If the class file does not exist, stop the process
		if(!file_exists($class_file)) {
			die('Error: File "'.$class_file.'" can not be found.');
		}

		// Include the class file
		require($class_file);

		// Remove underscores, file names use them, class names don't
		$class = str_replace('_', '', $component);

		// If the class does not exist, stop the process
		if(!class_exists($class, FALSE)) {
			die('Error: Class "'.$class.'" can not be found.');
		}
	}
<commit_msg>Fixing a bug in load_component() related to a variable name.<commit_after><?php
/**
 * This file contains the core functions.
 *
 * @author		<NAME> <<EMAIL>>
 * @copyright	2012 <NAME> <<EMAIL>>
 * @license		https://github.com/Falc/Aluminium/blob/master/LICENSE New BSD License
 * @package		Aluminium
 * @subpackage	Core
 */

/**
 * Returns an instance of the specified component.
 *
 * This method looks for the $component. If the $class_file exists, it is included and an instance is created and returned.
 *
 * @param	string	$component	Name of the component to load.
 * @return	mixed	A component instance.
 */
function load_component($component) {
	$class = $component;

	// If the class is not already included, do it
	if(!class_exists($class, FALSE)) {
		$class_file = ALUMINIUM_COMPONENTS.$class.'/'.$class.'.php';

		// If the class file does not exist, stop the process
		if(!file_exists($class_file)) {
			die('Error: File "'.$class_file.'" can not be found.');
		}

		// Include the class file
		require($class_file);

		// Remove underscores, file names use them, class names don't
		$class = str_replace('_', '', $class);

		// If the class does not exist, stop the process
		if(!class_exists($class, FALSE)) {
			die('Error: Class "'.$class.'" can not be found.');
		}
	}

{'fraction_non_alphanumeric': 0.13882259347653142, 'fraction_numerical': 0.0031821797931583136, 'mean_word_length': 3.7274436090225564, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 15, 'https://': 2, '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': '941323', 'n_tokens_mistral': 825, 'n_tokens_neox': 779, 'n_words': 275}