<commit_before>function Queue() {
  this.size = 0;
  this.pointer = 0;
  this.elements = [];
}

Queue.prototype = {

  getSize: function() {
    return this.size;
  },

  enqueue: function(item) {
    this.elements.push(item);
    this.size++;
  },

  dequeue: function() {
    if (this.size === 0)
      throw new Error("Underflowed the queue, have we?");

    var item = this.elements[this.pointer];
    this.size--;
    this.pointer++;

    if (this.elements.length > 100 && this.pointer > this.size / 2)
      this._tightenUp();

    return item;
  },

  _tightenUp: function() {
    this.elements = this.elements.slice(this.pointer);
    this.pointer = 0;
  }

};
<commit_msg>removed underscore subscript from private function<commit_after>function Queue() {
  this.size = 0;
  this.pointer = 0;
  this.elements = [];
}

Queue.prototype = {

  getSize: function() {
    return this.size;
  },

  enqueue: function(item) {
    this.elements.push(item);
    this.size++;
  },

  dequeue: function() {
    if (this.size === 0)
      throw new Error("Underflowed the queue, have we?");

    var item = this.elements[this.pointer];
    this.size--;
    this.pointer++;

    if (this.elements.length > 100 && this.pointer > this.size / 2)
      this.tightenUp();

    return item;
  },

  tightenUp: function() {
    this.elements = this.elements.slice(this.pointer);
    this.pointer = 0;
  }

};

{'fraction_non_alphanumeric': 0.15891195418754475, 'fraction_numerical': 0.01145311381531854, 'mean_word_length': 2.6984126984126986, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4172882', 'n_tokens_mistral': 500, 'n_tokens_neox': 467, 'n_words': 101}