<commit_before>(function ($) {
    var settings = {},
        defaults = {
            api: "http://api.ihackernews.com/post/%s?format=jsonp",
            apidatatype: "jsonp",
        };

    $.fn.ycomments = function (options) {
        $.extend(settings, defaults, options);

        return this.each(init);
    };

    init = function () {
        var $this = $(this),
            url = settings.api.replace("%s", settings.id);

        var jump = $("<a href='#ycomments-thread' id='ycomments-jump'>" +
            "Show comments on Hacker News</a>");
        $this.append(jump);

        $.ajax({url: url, dataType: settings.apidatatype})
            .success(function (data) { showcomments(data, jump, $this); } );
    };

    showcomments = function (data, jump, article) {
        jump.text(jump.text().replace("Show", data.commentCount));

        var comments = "<section id='ycomments-thread'>" + 
            "<header><h1>Showing " + data.commentCount + " comments</h1>" +
            "<p>Sort comments</p>" + 
            "</header>";

        $.each(data.comments, function () {
            comments += $.fn.ycomments.thread(this, 0);
        });

        comments += '</section>';
        article.append(comments);
    };

    $.fn.ycomments.thread = function (thread, depth) {
        var html = "<article class='ycomments-comment ycomments-comment-depth-" + depth + "'>" +
            "<header>posted by: " + thread.postedBy + "</header>";
        $.each(thread.children, function () {
            html += $.fn.ycomments.thread(this, depth + 1);
        });
        html += "</article>";

        return html;
    };
})(jQuery);

<commit_msg>Fill in more comment info.<commit_after>(function ($) {
    var settings = {},
        defaults = {
            api: "http://api.ihackernews.com/post/%s?format=jsonp",
            apidatatype: "jsonp",
        };

    $.fn.ycomments = function (options) {
        $.extend(settings, defaults, options);

        return this.each(init);
    };

    init = function () {
        var $this = $(this),
            url = settings.api.replace("%s", settings.id);

        var jump = $("<a href='#ycomments-thread' id='ycomments-jump'>" +
            "Show comments on Hacker News</a>");
        $this.append(jump);

        $.ajax({url: url, dataType: settings.apidatatype})
            .success(function (data) { showcomments(data, jump, $this); } );
    };

    showcomments = function (data, jump, article) {
        jump.text(jump.text().replace("Show", data.commentCount));

        var comments = "<section id='ycomments-thread'>" + 
            "<header><h1>Showing " + data.commentCount + " comments</h1>" +
            "<p>Sort comments</p>" + 
            "</header>";

        $.each(data.comments, function () {
            comments += $.fn.ycomments.thread(this, 0);
        });

        comments += '</section>';
        article.append(comments);
    };

    $.fn.ycomments.thread = function (thread, depth) {
        var html = "<article class='ycomments-comment ycomments-comment-depth-" + depth + "'>" +
            "<header><p>" + 
                thread.points + " points " +
                "by " + $.fn.ycomments.user(thread.postedBy) + " " +
                thread.postedAgo + " | " + $.fn.ycomments.postid(thread.id, "link") +
            "</p></header>";
        $.each(thread.children, function () {
            html += $.fn.ycomments.thread(this, depth + 1);
        });
        html += "</article>";

        return html;
    };

    $.fn.ycomments.user = function (user) {
        var html = "<a href='http://news.ycombinator.com/user?id=%s'>%s</a>";
        return html.replace(/%s/g, user);
    }

    $.fn.ycomments.postid = function (id, text) {
        return "<a href='http://news.ycombinator.com/item?id=" + id + "'>" + text + "</a>";
    }
})(jQuery);


{'fraction_non_alphanumeric': 0.18714211348256116, 'fraction_numerical': 0.002082248828735034, 'mean_word_length': 2.0572792362768495, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, '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': '3544606', 'n_tokens_mistral': 1177, 'n_tokens_neox': 1128, 'n_words': 217}