<commit_before>function a() {
    var flag_register = 0;
    var registration = document.getElementById("register");
    var login = document.getElementById("login-btn");
    var reg_info = document.getElementsByName("name")[0];

    function register() {
        flag_register = 1;
        reg_info.className = "in";
        reg_info.required = true;
        registration.innerHTML = "Just Kidding";
        login.innerHTML = "Register";
        $("#auth").attr("ng-submit","register()");
    }

    function unregister() {
        flag_register = 0;
        reg_info.className = "in hide";
        reg_info.required = false;
        reg_info.value = "";
        registration.innerHTML = "Register";
        login.innerHTML = "Login";
        $("#auth").attr("ng-submit","login()");
    }

    registration.addEventListener('click', function() {
        flag_register == 0 ? register(): unregister() ;
    }, false);
}

setTimeout(function(){a();}, 500);

<commit_msg>cleanup form population code<commit_after>function a() {
    var flag_register = false;
    var registration = document.getElementById("register");
    var login = document.getElementById("login-btn");
    var reg_info = document.getElementsByName("name")[0];

    function register() {
        reg_info.className = !flag_register ? "in" : "in hide";
        reg_info.required = !reg_info.required;
        registration.innerHTML = !flag_register ? "Just Kidding" : "Register";
        login.innerHTML = !flag_register ? "Register" : "Login";
        flag_register = !flag_register;
    }
    
    registration.addEventListener('click', function() { register(); }, false);
}

setTimeout(function(){a();}, 500);


{'fraction_non_alphanumeric': 0.15169541939321832, 'fraction_numerical': 0.007138607971445568, 'mean_word_length': 3.1530864197530866, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5809212', 'n_tokens_mistral': 471, 'n_tokens_neox': 459, 'n_words': 95}