<commit_before><?php
class Session {
	// This is the helper that will help you with the communication, save and removal for the session cookies.
	// This helper is tested.
	function __construct()
	{
		session_start();
	}
	
	function getUser($key)
	{
		if(isset($_SESSION['user_'.$key])) {
			return $_SESSION['user_'.$key];
		}
	}
	
	function setUser($key, $var)
	{
		$_SESSION['user_'.$key] = $var;
		return $_SESSION['user_'.$key];
	}
	
	function deleteUser($key)
	{
		unset($_SESSION['user_'.$key]);
	}
}
?><commit_msg>make a check if session is already started<commit_after><?php
class Session {
	// This is the helper that will help you with the communication, save and removal for the session cookies.
	// This helper is tested.
	function __construct()
	{
		if (!isset($_SESSION)) session_start();
	}
	
	function getUser($key)
	{
		if(isset($_SESSION['user_'.$key])) {
			return $_SESSION['user_'.$key];
		}
	}
	
	function setUser($key, $var)
	{
		$_SESSION['user_'.$key] = $var;
		return $_SESSION['user_'.$key];
	}
	
	function deleteUser($key)
	{
		unset($_SESSION['user_'.$key]);
	}
}
?>
{'fraction_non_alphanumeric': 0.1678832116788321, 'fraction_numerical': 0.0, 'mean_word_length': 4.032110091743119, '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': '4862418', 'n_tokens_mistral': 394, 'n_tokens_neox': 377, 'n_words': 95}