<commit_before>#include <Ecore.h>

static Ecore_Hash *ecore_strings = NULL;

/**
 * @defgroup Ecore_String_Group String Instance Functions
 *
 * These functions allow you to store one copy of a string, and use it
 * throughout your program.
 */

/**
 * Retrieves an instance of a string for use in an ecore program.
 * @param   string The string to retrieve an instance of.
 * @return  A pointer to an instance of the string on success.
 *          @c NULL on failure.
 * @ingroup Ecore_String_Group
 */
char *ecore_string_instance(char *string)
{
	Ecore_String *str;

	CHECK_PARAM_POINTER_RETURN("string", string, NULL);

	/*
	 * No strings have been loaded at this point, so create the hash
	 * table for storing string info for later.
	 */
	if (!ecore_strings)
		ecore_strings = ecore_hash_new(ecore_str_hash, ecore_str_compare);

	/*
	 * Check for a previous instance of the string, if not found, create
	 * it.
	 */
	str = ecore_hash_get(ecore_strings, string);
	if (!str) {

		/*
		 * Allocate and initialize a new string reference.
		 */
		str = (Ecore_String *)malloc(sizeof(Ecore_String));

		str->string = strdup(string);
		str->references = 0;

		ecore_hash_set(ecore_strings, str->string, str);
	}

	str->references++;

	return str->string;
}

/**
 * Notes that the given string has lost an instance.
 * 
 * It will free the string if no other instances are left.
 *
 * @param   string The given string.
 * @ingroup Ecore_String_Group
 */
void ecore_string_release(char *string)
{
	Ecore_String *str;

	CHECK_PARAM_POINTER("string", string);

	str = ecore_hash_get(ecore_strings, string);
	if (!str)
		return;

	str->references--;
	if (str->references < 1) {
		ecore_hash_remove(ecore_strings, string);
		FREE(str->string);
		FREE(str);
	}
}<commit_msg>bad fix<commit_after>#include <Ecore.h>

static Ecore_Hash *ecore_strings = NULL;

/**
 * @defgroup Ecore_String_Group String Instance Functions
 *
 * These functions allow you to store one copy of a string, and use it
 * throughout your program.
 */

/**
 * Retrieves an instance of a string for use in an ecore program.
 * @param   string The string to retrieve an instance of.
 * @return  A pointer to an instance of the string on success.
 *          @c NULL on failure.
 * @ingroup Ecore_String_Group
 */
char *ecore_string_instance(char *string)
{
	Ecore_String *str;

	CHECK_PARAM_POINTER_RETURN("string", string, NULL);

	/*
	 * No strings have been loaded at this point, so create the hash
	 * table for storing string info for later.
	 */
	if (!ecore_strings)
		ecore_strings = ecore_hash_new(ecore_str_hash, ecore_str_compare);

	/*
	 * Check for a previous instance of the string, if not found, create
	 * it.
	 */
	str = ecore_hash_get(ecore_strings, string);
	if (!str) {

		/*
		 * Allocate and initialize a new string reference.
		 */
		str = (Ecore_String *)malloc(sizeof(Ecore_String));

		str->string = strdup(string);
		str->references = 0;

		ecore_hash_set(ecore_strings, str->string, str);
	}

	str->references++;

	return str->string;
}

/**
 * Notes that the given string has lost an instance.
 * 
 * It will free the string if no other instances are left.
 *
 * @param   string The given string.
 * @ingroup Ecore_String_Group
 */
void ecore_string_release(char *string)
{
	Ecore_String *str;

	CHECK_PARAM_POINTER("string", string);

	str = ecore_hash_get(ecore_strings, string);
	if (!str)
		return;

	str->references--;
	if (str->references < 1) {
		ecore_hash_remove(ecore_strings, string);
		FREE(str->string);
	}
}
{'fraction_non_alphanumeric': 0.10851609228140131, 'fraction_numerical': 0.0011392765593847907, 'mean_word_length': 3.778231292517007, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 21, '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': '6318871', 'n_tokens_mistral': 1219, 'n_tokens_neox': 1148, 'n_words': 368}