<commit_before>class BubbleSort {
  constructor(data = [], compareFunc = (a, b) => a < b) {
    this._list = data;
    this._compareFunc = compareFunc;
  }

  get size() {
    return this._list.length;
  }

  sort() {
    const data = this._list;

    data.forEach((val, index, array) => {
      console.log(val, index, array);
    });
  }
}

module.exports = BubbleSort;<commit_msg>BubbleSort: Sort added<commit_after>class BubbleSort {
  constructor(data = [], compareFunc = (a, b) => a < b) {
    this._list = data;
    this._compareFunc = compareFunc;
  }

  get size() {
    return this._list.length;
  }

  _sort(list) {
    const len = list.length;
    let didSwap;

    for (let i = 0; i < len - 1; i += 1) {
      didSwap = false;

      for (let j = 0; j < len - i - 1; j += 1) {
        if (this._compareFunc(list[j + 1], list[j])) {
          [list[j], list[j + 1]] = [list[j + 1], list[j]];
          didSwap = true;
        }
      }

      if (!didSwap) {
        break;
      }
    }

    return list;
  }

    data.forEach((val, index, array) => {
      console.log(val, index, array);
    });
  }
}

module.exports = BubbleSort;
{'fraction_non_alphanumeric': 0.16579406631762653, 'fraction_numerical': 0.007853403141361256, 'mean_word_length': 2.1084010840108403, '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': '804847', 'n_tokens_mistral': 434, 'n_tokens_neox': 412, 'n_words': 97}