<commit_before>(function($) {

    var formDiv;

    $.fn.dropdownFiller = function() {
        formDiv = this;
        $('select').each(function(index, value) {
            if ($(this).is(':empty')) {
                var masterName = $(this).attr('data-master');
                if (masterName) {
                    formDiv.loadData($(this));
                }
            }
        });

        return this;
    };

    $.fn.loadData = function(selectBox) {
        var contextpath = document.URL.substring(document.URL.indexOf('/',document.URL.indexOf('//')+2));
        contextpath = contextpath.substring(0,contextpath.indexOf('/',2));
        $.ajax({
            url: contextpath + '/master/' + selectBox.attr('data-master'),
            success: function(result) {
                $.each(result, function() {
                    selectBox.append($("<option />").val(this.name).text(this.label));
                });
                if (selectBox.attr('value')) {
                    selectBox.val(selectBox.attr('value'));
                }
            }
        });

        // Load From Data Store
        if (selectBox.is(':empty')) {
            $.ajax({
                url: contextpath + 'master/all/' + selectBox.attr('data-master'),
                success: function(result) {
                    $.each(result[selectBox.attr('data-master')], function() {
                        selectBox.append($("<option />").val(this.name).text(this.name));
                    });
                    if (selectBox.attr('value')) {
                        selectBox.val(selectBox.attr('value'));
                    }
                },
                error: function(error) {
                    
                }
            });
        }

    };

}(jQuery));<commit_msg>Path Issue<commit_after>(function($) {

    var formDiv;

    $.fn.dropdownFiller = function() {
        formDiv = this;
        $('select').each(function(index, value) {
            if ($(this).is(':empty')) {
                var masterName = $(this).attr('data-master');
                if (masterName) {
                    formDiv.loadData($(this));
                }
            }
        });

        return this;
    };

    $.fn.loadData = function(selectBox) {
        var contextpath = document.URL.substring(document.URL.indexOf('/',document.URL.indexOf('//')+2));
        contextpath = contextpath.substring(0,contextpath.indexOf('/',2));
        $.ajax({
            url: contextpath + '/master/' + selectBox.attr('data-master'),
            success: function(result) {
                $.each(result, function() {
                    selectBox.append($("<option />").val(this.name).text(this.label));
                });
                if (selectBox.attr('value')) {
                    selectBox.val(selectBox.attr('value'));
                }
            }
        });

        // Load From Data Store
        if (selectBox.is(':empty')) {
            $.ajax({
                url: contextpath + '/master/all/' + selectBox.attr('data-master'),
                success: function(result) {
                    $.each(result[selectBox.attr('data-master')], function() {
                        selectBox.append($("<option />").val(this.name).text(this.name));
                    });
                    if (selectBox.attr('value')) {
                        selectBox.val(selectBox.attr('value'));
                    }
                },
                error: function(error) {
                    
                }
            });
        }

    };

}(jQuery));
{'fraction_non_alphanumeric': 0.1654494382022472, 'fraction_numerical': 0.0016853932584269663, 'mean_word_length': 1.3443054641211323, 'pattern_counts': {'":': 0, '<': 7, '<?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': '251487', 'n_tokens_mistral': 952, 'n_tokens_neox': 893, 'n_words': 126}