<commit_before>/*jslint browser: true*/
/*global $, console*/

//Parses the locations with bugs.
function process_buglocations(buginst) {
    "use strict";

    var meth = {}, class_tag = {}, field = {}, src = {}, locations = [];

    //Class processing 
    class_tag.classname = buginst.find('Class').attr('classname');
    class_tag.tag = "class";
    class_tag.line = buginst.find('Class').find('SourceLine').attr('start');
    class_tag.msg = buginst.find('Class').find('Message').text();

    class_tag.filen = buginst.find('Class').find('SourceLine').attr('sourcefile');

    locations.push(class_tag);

    /* Not really relevant.
    bug.class_tag.primary = buginst.find('Class').attr('primary');
    class_tag.endline = buginst.find('Class').find('SourceLine').attr('end');
    */

    //Process methods
    buginst.find('Method').each(function (i) {

        meth.tag = 'method';

        meth.classname = $(this).attr('classname');
        meth.name_attr = $(this).attr('name');
        //Parse soucefile stuff
        meth.line = $(this).find('SourceLine').attr('start');
        meth.desc = $(this).attr('signature');

        //Filename
        meth.filen = $(this).find('SourceLine').attr('sourcefile');
        /* Not too relevant, skip
        meth.primary = buginst.attr('primary');
        meth.isStatic = buginst.attr('isStatic');

        meth.startline = buginst.find('SourceLine').attr('end');

        //Message stuff
        meth.msg = buginst.find('Message').text();
        */
        locations.push(meth);
    });

    //Try to get a sourceline if one exists
    if (buginst.find('SourceLine').attr('start') !== undefined) {
        src.tag = 'SourceLine';
        src.line = buginst.find('SourceLine').attr('start');
        src.classname = buginst.find('SourceLine').attr('classname');
        //filename
        src.filen = buginst.find('SourceLine').attr('sourcefile');
        locations.push(src);
    }
<commit_msg>Fix erroneous double reporting of the same line.<commit_after>/*jslint browser: true*/
/*global $, console*/

//Parses the locations with bugs.
function process_buglocations(buginst) {
    "use strict";

    var meth = {}, class_tag = {}, field = {}, src = {}, locations = [];

    //Class processing 
    class_tag.classname = buginst.find('Class').attr('classname');
    class_tag.tag = "class";
    class_tag.line = buginst.find('Class').find('SourceLine').attr('start');
    class_tag.msg = buginst.find('Class').find('Message').text();

    class_tag.filen = buginst.find('Class').find('SourceLine').attr('sourcefile');

    locations.push(class_tag);

    /* Not really relevant.
    bug.class_tag.primary = buginst.find('Class').attr('primary');
    class_tag.endline = buginst.find('Class').find('SourceLine').attr('end');
    */

    //Process methods
    buginst.find('Method').each(function (i) {

        meth.tag = 'method';

        meth.classname = $(this).attr('classname');
        meth.name_attr = $(this).attr('name');
        //Parse soucefile stuff
        meth.line = $(this).find('SourceLine').attr('start');
        meth.desc = $(this).attr('signature');

        //Filename
        meth.filen = $(this).find('SourceLine').attr('sourcefile');
        /* Not too relevant, skip
        meth.primary = buginst.attr('primary');
        meth.isStatic = buginst.attr('isStatic');

        meth.startline = buginst.find('SourceLine').attr('end');

        //Message stuff
        meth.msg = buginst.find('Message').text();
        */
        locations.push(meth);
    });

{'fraction_non_alphanumeric': 0.18700564971751413, 'fraction_numerical': 0.0, 'mean_word_length': 2.974186307519641, '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': '7575064', 'n_tokens_mistral': 1067, 'n_tokens_neox': 1035, 'n_words': 178}