<commit_before>#include <stdio.h>
#include <string.h>

char *str_replace(char initial[], char replace[], char with[], char dest[])
{
	int i = 0;
	int r = 0;

	int index_count = 0;
	int pos_indexes[100];

	int initial_length = 0;

	// TODO: Replace hardcoded 100
	char fully_formed_string[100];

	for (i = 0; i < strlen(initial);) {
		if (initial[i] != replace[r]) {
			r++;
		} else {
			fully_formed_string[i] = replace[i];
			i++; r++;
			
			if (strcmp(fully_formed_string,replace) == 0) {

				for (int rep = 0; rep < index_count; rep++) {
					initial[pos_indexes[rep]] = with[rep];
				}

				int final_string_count = 0;
				while (strlen(initial) != strlen(dest)) {
					dest[final_string_count] = initial[final_string_count];
					final_string_count++;
				}
			}
			pos_indexes[index_count] = i;
			index_count++;
			
		}
	}
	dest = initial;
	initial = "";
	return dest;
}

int main()
{
	char name[] = "Harry";
	char rep[] 	= "Harry";
	char with[] = "Lewis";
	char dest[10];

	str_replace(name, rep, with, dest);

	printf("String: %s\n", dest);

	return 0;
}<commit_msg>Tabs to spaces<commit_after>#include <stdio.h>
#include <string.h>

char *str_replace(char initial[], char replace[], char with[], char dest[])
{
    int i = 0;
    int r = 0;

    int index_count = 0;
    int pos_indexes[100];

    int initial_length = 0;

    // TODO: Replace hardcoded 100
    char fully_formed_string[100];

    for (i = 0; i < strlen(initial);) {
        if (initial[i] != replace[r]) {
            r++;
        } else {
            fully_formed_string[i] = replace[i];
            i++; r++;
            
            if (strcmp(fully_formed_string,replace) == 0) {

                for (int rep = 0; rep < index_count; rep++) {
                    initial[pos_indexes[rep]] = with[rep];
                }

                int final_string_count = 0;
                while (strlen(initial) != strlen(dest)) {
                    dest[final_string_count] = initial[final_string_count];
                    final_string_count++;
                }
            }
            pos_indexes[index_count] = i;
            index_count++;
            
        }
    }
    dest = initial;
    initial = "";
    return dest;
}

int main()
{
    char name[] = "Harry";
    char rep[]  = "Harry";
    char with[] = "Lewis";
    char dest[10];

    str_replace(name, rep, with, dest);

    printf("String: %s\n", dest);

    return 0;
}
{'fraction_non_alphanumeric': 0.15206611570247933, 'fraction_numerical': 0.01652892561983471, 'mean_word_length': 2.236631016042781, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, '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': '4952898', 'n_tokens_mistral': 935, 'n_tokens_neox': 819, 'n_words': 198}