<commit_before>"use strict";

var BugData = {
  bugs: {},
  trackingFlag: null,

  load: function BD_load(bugs, loadCallback, errorCallback) {
    if (mcMerge.trackingFlag)
      this.trackingFlag = 'cf_' + mcMerge.trackingFlag;
    if (mcMerge.statusFlag)
      this.statusFlag = 'cf_' + mcMerge.statusFlag;

    bugs = {id : bugs};

    var self = this;
    var callback  = function BD_LoadCallback(errmsg, data) {
      if (errmsg)
        errorCallback(errmsg);
      else
        self.parseData(data, loadCallback);
    };

    var bugzilla = bz.createClient();
    bugzilla.searchBugs(bugs, callback);
  },


  makeBug: function BD_makeBug(bugObj) {
    var bug = {};
    bug.resolution = UI.htmlEncode(bugObj.resolution);
    bug.status = UI.htmlEncode(bugObj.status);
    bug.whiteboard = UI.htmlEncode(bugObj.whiteboard);
    bug.keywords = bugObj.keywords;
    bug.milestone = UI.htmlEncode(bugObj.target_milestone);
    bug.summary = UI.htmlEncode(bugObj.summary);
    bug.canResolve = !(bug.status == 'RESOLVED' || bug.status == 'VERIFIED');
    bug.id = bugObj.id;
    if (typeof bug.id == 'string')
      bug.id = UI.htmlEncode(bug.id);
    bug.product = bugObj.product;
    bug.canReopen = bug.resolution == 'FIXED';
    bug.isTracked = false;
    if (this.trackingFlag && bugObj[this.trackingFlag] == '+')
      bug.isTracked = true;
    bug.statusFlag = '---';
    if (this.statusFlag)<commit_msg>re Issue 21 - no need to encode whiteboard textarea contents<commit_after>"use strict";

var BugData = {
  bugs: {},
  trackingFlag: null,

  load: function BD_load(bugs, loadCallback, errorCallback) {
    if (mcMerge.trackingFlag)
      this.trackingFlag = 'cf_' + mcMerge.trackingFlag;
    if (mcMerge.statusFlag)
      this.statusFlag = 'cf_' + mcMerge.statusFlag;

    bugs = {id : bugs};

    var self = this;
    var callback  = function BD_LoadCallback(errmsg, data) {
      if (errmsg)
        errorCallback(errmsg);
      else
        self.parseData(data, loadCallback);
    };

    var bugzilla = bz.createClient();
    bugzilla.searchBugs(bugs, callback);
  },


  makeBug: function BD_makeBug(bugObj) {
    var bug = {};
    bug.resolution = UI.htmlEncode(bugObj.resolution);
    bug.status = UI.htmlEncode(bugObj.status);
    bug.whiteboard = bugObj.whiteboard;
    bug.keywords = bugObj.keywords;
    bug.milestone = UI.htmlEncode(bugObj.target_milestone);
    bug.summary = UI.htmlEncode(bugObj.summary);
    bug.canResolve = !(bug.status == 'RESOLVED' || bug.status == 'VERIFIED');
    bug.id = bugObj.id;
    if (typeof bug.id == 'string')
      bug.id = UI.htmlEncode(bug.id);
    bug.product = bugObj.product;
    bug.canReopen = bug.resolution == 'FIXED';
    bug.isTracked = false;
    if (this.trackingFlag && bugObj[this.trackingFlag] == '+')
      bug.isTracked = true;
    bug.statusFlag = '---';
    if (this.statusFlag)
{'fraction_non_alphanumeric': 0.13986013986013987, 'fraction_numerical': 0.0006993006993006993, 'mean_word_length': 3.0929899856938485, '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': '1621472', 'n_tokens_mistral': 1002, 'n_tokens_neox': 952, 'n_words': 186}