<commit_before><#import "template.ftl" as layout>
<@layout.registrationLayout displayInfo=true; section>
    <#if section = "title">
        ${msg("updatePasswordTitle")}
    <#elseif section = "header">
        ${msg("updatePasswordTitle")}
    <#elseif section = "form">

    <div class="mdl-grid">
        <div class="mdl-layout-spacer"></div>
        <div class="mdl-cell mdl-cell--4-col mdl-cell--12-col-phone">
            <div class="demo-card-wide mdl-card mdl-shadow--2dp mdl-textfield--full-width">
                <div class="mdl-card__title">
                    <h2 class="mdl-card__title-text">Welcome</h2>
                </div>
                <div class="mdl-card__supporting-text">
                    <form id="kc-passwd-update-form" class="${properties.kcFormClass!}" action="${url.loginAction}" method="post">

                        <input type="text" readonly value="this is not a login form" style="display: none;">
                        <input type="password" readonly value="this is not a login form" style="display: none;">

                        <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label mdl-textfield--full-width">
                            <input class="mdl-textfield__input" type="password" id="password-new" name="password-new" autofocus autocomplete="off">
                            <button class="mdl-button mdl-js-button mdl-button--icon show-password" id="kc-password-show" type="button" onclick="return false;">
                                <i class="material-icons">visibility</i>
                            </button>
                            <label class="mdl-textfield__label" for="password-new">${msg("passwordNew")}</label>
                            <span class="mdl-textfield__error">${msg("passwordNew")} ${msg("empty")}</span>
                        </div>
                        <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label mdl-textfield--full-width">
                            <input class="mdl-textfield__input" type="password" id="password-confirm" name="password-confirm" autocomplete="off">
                            <label class="mdl-textfield__label" for="password-confirm">${msg("passwordConfirm")}</label>
                            <span class="mdl-textfield__error">${msg("passwordConfirm")} ${msg("empty")}</span>
                        </div>
                        <div id="kc-form-buttons" class="${properties.kcFormButtonsClass!}">
                            <button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" type="submit" id="kc-submit">
                            ${msg("doSubmit")}
                            </button>
                        </div>
                    </form>

                    <script>
                    $(function () {
                        var btnPasswordShow = document.querySelector("#kc-password-show");
                        var password = <PASSWORD>");
                        var passwordConfirm = $("#<PASSWORD>");
                        var submitButton = document.querySelector('#kc-submit');

                        submitButton.addEventListener('click', function() {
                            'use strict';
                            addValidation(password);
                            addValidation(passwordConfirm);
                        });
                        password[0].addEventListener('focusout', function() {
                            'use strict';
                            addValidation(password);
                        });
                        passwordConfirm[0].addEventListener('focusout', function() {
                            'use strict';
                            addValidation(passwordConfirm);
                        });

                        btnPasswordShow.addEventListener('mousedown', function () {
                            'use strict';
                            password.attr("type", "text");
                        });
                        btnPasswordShow.addEventListener('mouseup', function () {
                            'use strict';
                            password.attr("type", "password");
                        });
                    });
                    </script>
                </div>
                <div class="mdl-card__actions mdl-card--border">
                    <div id="kc-form-options" class="${properties.kcFormOptionsClass!}">
                        <div class="${properties.kcFormOptionsWrapperClass!}">
                            <span><a href="${url.loginUrl}">${msg("backToLogin")}</a></span>
                        </div>
                    </div>
                </div>
            </div><commit_msg>add password equals confirm into update password<commit_after><#import "template.ftl" as layout>
<@layout.registrationLayout displayInfo=true; section>
    <#if section = "title">
        ${msg("updatePasswordTitle")}
    <#elseif section = "header">
        ${msg("updatePasswordTitle")}
    <#elseif section = "form">

    <div class="mdl-grid">
        <div class="mdl-layout-spacer"></div>
        <div class="mdl-cell mdl-cell--4-col mdl-cell--12-col-phone">
            <div class="demo-card-wide mdl-card mdl-shadow--2dp mdl-textfield--full-width">
                <div class="mdl-card__title">
                    <h2 class="mdl-card__title-text">Welcome</h2>
                </div>
                <div class="mdl-card__supporting-text">
                    <form id="kc-passwd-update-form" class="${properties.kcFormClass!}" action="${url.loginAction}" method="post">

                        <input type="text" readonly value="this is not a login form" style="display: none;">
                        <input type="password" readonly value="this is not a login form" style="display: none;">

                        <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label mdl-textfield--full-width">
                            <input class="mdl-textfield__input" type="password" id="password-new" name="password-new" autofocus autocomplete="off">
                            <button class="mdl-button mdl-js-button mdl-button--icon show-password" id="kc-password-show" type="button" onclick="return false;">
                                <i class="material-icons">visibility</i>
                            </button>
                            <label class="mdl-textfield__label" for="password-new">${msg("passwordNew")}</label>
                            <span class="mdl-textfield__error">${msg("passwordNew")} ${msg("empty")}</span>
                        </div>
                        <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label mdl-textfield--full-width">
                            <input class="mdl-textfield__input" type="password" id="password-confirm" name="password-confirm" autocomplete="off">
                            <label class="mdl-textfield__label" for="password-confirm">${msg("passwordConfirm")}</label>
                            <span class="mdl-textfield__error" id="error-confirm">${msg("passwordConfirm")} ${msg("empty")}</span>
                        </div>
                        <div id="kc-form-buttons" class="${properties.kcFormButtonsClass!}">
                            <button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" type="submit" id="kc-submit">
                            ${msg("doSubmit")}
                            </button>
                        </div>
                    </form>

                    <script>
                    $(function () {
                        var btnPasswordShow = document.querySelector("#kc-password-show");
                        var password = <PASSWORD>");
                        var passwordConfirm = $("#password-<PASSWORD>");
                        var submitButton = document.querySelector('#kc-submit');
                        var errorConfirm= $("#error-confirm");

                        submitButton.addEventListener('click', function() {
                            'use strict';
                            addValidation(password);
                            addValidation(passwordConfirm);
                        });
                        password[0].addEventListener('focusout', function() {
                            'use strict';
                            addValidation(password);
                        });
                        passwordConfirm[0].addEventListener('focusout', function() {
                            'use strict';
                            addValidation(passwordConfirm);

                            if( password.val() !== undefined && passwordConfirm.val() !== undefined &&
                                    passwordConfirm.val().length > 1 && password.val().length > 1 ){
                                if(password.val() !== passwordConfirm.val() && passwordConfirm.val().length > 0 ){
                                    errorConfirm[0].innerText = document.createTextNode("Password not equals").textContent;
                                    passwordConfirm.parent().addClass('is-invalid');
                                }

                            }
                            else if(passwordConfirm.val() === undefined && password.val() !== undefined ||
                                    passwordConfirm.val().length < 1 && password.val().length > 0){
                                errorConfirm[0].innerText = document.createTextNode("Input must not be empty").textContent;
                                passwordConfirm.parent().addClass('is-invalid');
                            }
                        });

                        btnPasswordShow.addEventListener('mousedown', function () {
                            'use strict';
                            password.attr("type", "text");
                        });
                        btnPasswordShow.addEventListener('mouseup', function () {
                            'use strict';
                            password.attr("type", "password");
                        });
                    });
                    </script>
                </div>
                <div class="mdl-card__actions mdl-card--border">
                    <div id="kc-form-options" class="${properties.kcFormOptionsClass!}">
                        <div class="${properties.kcFormOptionsWrapperClass!}">
                            <span><a href="${url.loginUrl}">${msg("backToLogin")}</a></span>
                        </div>
                    </div>
                </div>
            </div>
{'fraction_non_alphanumeric': 0.13509462244706763, 'fraction_numerical': 0.0021547685965898444, 'mean_word_length': 1.4184413230629813, 'pattern_counts': {'":': 0, '<': 118, '<?xml version=': 0, '>': 121, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4823118', 'n_tokens_mistral': 2585, 'n_tokens_neox': 2452, 'n_words': 417}