<commit_before>class KeyMap {
    constructor() {
      this.map = new Map();
    }

    set(key, value) {
      let set = this.map.get(key);
      if (!set) {
        set = new Set();
        this.map.set(key, set);
      }

      if (value) {
        set.add(value);
      }

      return set;
    }

    shift(key, value) {
      let set = this.map.get(key);
      if (set && set.size) {
        if (set.has(value)) {
          set.delete(value);
          return value;
        } else {
          for(let result of set) {
            set.delete(result);
            return result;
          }
        }
      }
      return false;
    }
}

export default KeyMap;
<commit_msg>FIX Babel reject duplicated variable name<commit_after>class KeyMap {
    constructor() {
      this.map = new Map();
    }

    set(key, value) {
      let list = this.map.get(key);
      if (!list) {
        list = new Set();
        this.map.set(key, list);
      }

      if (value) {
        list.add(value);
      }

      return list;
    }

    shift(key, value) {
      let set = this.map.get(key);
      if (set && set.size) {
        if (set.has(value)) {
          set.delete(value);
          return value;
        } else {
          for(let result of set) {
            set.delete(result);
            return result;
          }
        }
      }
      return false;
    }
}

export default KeyMap;

{'fraction_non_alphanumeric': 0.13218390804597702, 'fraction_numerical': 0.0, 'mean_word_length': 1.3530405405405406, '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': '5780311', 'n_tokens_mistral': 452, 'n_tokens_neox': 442, 'n_words': 103}