<commit_before>/* 
 * JavaScript to display and hide comment area in manual audit
 */
$(document).ready(
        function() {

            // hide all comment area
            $(".audit-result-manual-comment").addClass( "audit-result-manual-comment-hidden" ).removeClass( "audit-result-manual-comment" );

            //enable comment area for checked failed radio 
            $('input:radio').each(function() {
                if ((($(this).val()) === 'failed') && $(this).is(':checked')) {
                    var commentAreaId = 'commentContainer' + $(this).attr('id').substring(6, $(this).attr('id').length);
                    $('div[id="' + commentAreaId + '"]').addClass( "audit-result-manual-comment" ).removeClass( "audit-result-manual-comment-hidden" );
                }
            }
            );

            // bind event to radiobutton
            $('input:radio').on(
                    'change',
                    function() {
                        if (($(this).val()) === 'failed') {
                            var commentAreaId = 'commentContainer' + $(this).attr('id').substring(6, $(this).attr('id').length);
                            $('div[id="' + commentAreaId + '"]').addClass( "audit-result-manual-comment" ).removeClass( "audit-result-manual-comment-hidden" );
                        }
                    });

            $('input:radio').on('change',
                    function() {
                        if ((($(this).val()) === 'passed')) {
                            var commentAreaId = 'commentContainer' + $(this).attr('id').substring(6, $(this).attr('id').length);
                            $('div[id="' + commentAreaId + '"]').addClass( "audit-result-manual-comment-hidden" ).removeClass( "audit-result-manual-comment" );
                        }
                        if (($(this).val()) === 'na') {
                            var commentAreaId = 'commentContainer' + $(this).attr('id').substring(3, $(this).attr('id').length);
                            $('div[id="' + commentAreaId + '"]').addClass( "audit-result-manual-comment-hidden" ).removeClass( "audit-result-manual-comment" );
                        }

                    });
        });<commit_msg>update js script to display comment textarea on 'na' selection<commit_after>/* 
 * JavaScript to display and hide comment area in manual audit
 */
$(document).ready(
        function() {

            // hide all comment area
            $(".audit-result-manual-comment").addClass( "audit-result-manual-comment-hidden" ).removeClass( "audit-result-manual-comment" );

            //enable comment area for checked failed radio 
            $('input:radio').each(function() {
                if ( (($(this).val()) === 'failed') && $(this).is(':checked')) {
                    var commentAreaId = 'commentContainer' + $(this).attr('id').substring(6, $(this).attr('id').length);
                    $('div[id="' + commentAreaId + '"]').addClass( "audit-result-manual-comment" ).removeClass( "audit-result-manual-comment-hidden" );
                } else if ( (($(this).val()) === 'na') && $(this).is(':checked')) {
                    var commentAreaId = 'commentContainer' + $(this).attr('id').substring(2, $(this).attr('id').length);
                    $('div[id="' + commentAreaId + '"]').addClass( "audit-result-manual-comment" ).removeClass( "audit-result-manual-comment-hidden" );
                }
            }
            );

            // bind event to radiobutton
            $('input:radio').on(
                    'change',
                    function() {
                        if (($(this).val()) === 'failed') {
                            var commentAreaId = 'commentContainer' + $(this).attr('id').substring(6, $(this).attr('id').length);
                            $('div[id="' + commentAreaId + '"]').addClass( "audit-result-manual-comment" ).removeClass( "audit-result-manual-comment-hidden" );
                        }
                        if (($(this).val()) === 'na') {
                            var commentAreaId = 'commentContainer' + $(this).attr('id').substring(2, $(this).attr('id').length);
                            console.log($(this).attr('id').substring(2, $(this).attr('id').length));
                            $('div[id="' + commentAreaId + '"]').addClass( "audit-result-manual-comment" ).removeClass( "audit-result-manual-comment-hidden" );
                        }
                    });

            $('input:radio').on('change',
                    function() {
                        if ((($(this).val()) === 'passed')) {
                            var commentAreaId = 'commentContainer' + $(this).attr('id').substring(6, $(this).attr('id').length);
                            $('div[id="' + commentAreaId + '"]').addClass( "audit-result-manual-comment-hidden" ).removeClass( "audit-result-manual-comment" );
                        }
                    });
        });
{'fraction_non_alphanumeric': 0.190870531205817, 'fraction_numerical': 0.0020197939810139365, 'mean_word_length': 1.7178924259055983, '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': '2895296', 'n_tokens_mistral': 1339, 'n_tokens_neox': 1268, 'n_words': 217}