<commit_before>#include "jellyfish.h"
#include <string.h>
#include <ctype.h>

int match_rating_comparison(const char *s1, const char *s2) {
    size_t s1c_len, s2c_len;
    size_t i, j;
    int diff;
    char *longer;

    char *s1_codex = match_rating_codex(s1);
    if (!s1_codex) {
        return -1;
    }

    char *s2_codex = match_rating_codex(s2);
    if (!s2_codex) {
        free(s1_codex);
        return -1;
    }

    s1c_len = strlen(s1_codex);
    s2c_len = strlen(s2_codex);

    if (abs(s1c_len - s2c_len) >= 3) {
        free(s1_codex);
        free(s2_codex);
        return -1;
    }

    for (i = 0; i < s1c_len && i < s2c_len; i++) {
        if (s1_codex[i] == s2_codex[i]) {
            s1_codex[i] = ' ';
            s2_codex[i] = ' ';
        }
    }

    i = s1c_len - 1;
    j = s2c_len - 1;

    while (i != 0 && j != 0) {
        if (s1_codex[i] == ' ') {
            i--;
            continue;
        }

        if (s2_codex[j] == ' ') {<commit_msg>fix C90 warning in mra<commit_after>#include "jellyfish.h"
#include <string.h>
#include <ctype.h>

int match_rating_comparison(const char *s1, const char *s2) {
    size_t s1c_len, s2c_len;
    size_t i, j;
    int diff;
    char *longer;
    char *s1_codex = match_rating_codex(s1);
    char *s2_codex = match_rating_codex(s2);

    if (!s1_codex) {
        return -1;
    }

    if (!s2_codex) {
        free(s1_codex);
        return -1;
    }

    s1c_len = strlen(s1_codex);
    s2c_len = strlen(s2_codex);

    if (abs(s1c_len - s2c_len) >= 3) {
        free(s1_codex);
        free(s2_codex);
        return -1;
    }

    for (i = 0; i < s1c_len && i < s2c_len; i++) {
        if (s1_codex[i] == s2_codex[i]) {
            s1_codex[i] = ' ';
            s2_codex[i] = ' ';
        }
    }

    i = s1c_len - 1;
    j = s2c_len - 1;

    while (i != 0 && j != 0) {
        if (s1_codex[i] == ' ') {
            i--;
            continue;
        }

        if (s2_codex[j] == ' ') {
{'fraction_non_alphanumeric': 0.15540883697308278, 'fraction_numerical': 0.03961401726764855, 'mean_word_length': 1.7475592747559274, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, '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': '1726397', 'n_tokens_mistral': 898, 'n_tokens_neox': 864, 'n_words': 164}