<commit_before>'use strict';

function create_squares(){
    var colorsquares = [];
    var loop_counter = core_storage_data['square-count'];
    do{
        colorsquares.push('<input class=gridbutton id=' + loop_counter + ' type=button>');
    }while(loop_counter--);

    document.getElementById('colorsquares').innerHTML = colorsquares.join('');

    random_color();
}

function random_color(){
    changed_color = '#' + core_random_hex();
    default_color = '#' + core_random_hex();
}

function reset(){
    update_counter = 0;

    core_interval_modify({
      'id': 'color-squares-interval',
      'interval': core_storage_data['interval'],
      'todo': update,
    });
}

function update(){
    update_counter += 1;
    if(update_counter > core_storage_data['square-count'] / 2){
        update_counter = 1;
    }

    var loop_counter = core_storage_data['square-count'];
    do{
        document.getElementById(core_storage_data['square-count'] - loop_counter).style.background =
          loop_counter % update_counter === 0
            ? default_color
            : changed_color;
    }while(loop_counter--);
}<commit_msg>changed var to let<commit_after>'use strict';

function create_squares(){
    let colorsquares = [];
    let loop_counter = core_storage_data['square-count'];
    do{
        colorsquares.push('<input class=gridbutton id=' + loop_counter + ' type=button>');
    }while(loop_counter--);

    document.getElementById('colorsquares').innerHTML = colorsquares.join('');

    random_color();
}

function random_color(){
    changed_color = '#' + core_random_hex();
    default_color = '#' + core_random_hex();
}

function reset(){
    update_counter = 0;

    core_interval_modify({
      'id': 'color-squares-interval',
      'interval': core_storage_data['interval'],
      'todo': update,
    });
}

function update(){
    update_counter += 1;
    if(update_counter > core_storage_data['square-count'] / 2){
        update_counter = 1;
    }

    let loop_counter = core_storage_data['square-count'];
    do{
        document.getElementById(core_storage_data['square-count'] - loop_counter).style.background =
          loop_counter % update_counter === 0
            ? default_color
            : changed_color;
    }while(loop_counter--);
}
{'fraction_non_alphanumeric': 0.1432967032967033, 'fraction_numerical': 0.004395604395604396, 'mean_word_length': 3.376923076923077, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3037471', 'n_tokens_mistral': 702, 'n_tokens_neox': 676, 'n_words': 117}