<commit_before>import structs/[HashBag, HashMap, ArrayList]

Dictionary: class {
  _myHashBag: HashBag
  _capacity: Int
  init: func {
    init ~withCapacity(10)
  }
  init: func ~withCapacity (=_capacity) {
    _myHashBag = HashBag new(this _capacity)
  }
  init: func ~copy (other: This) {
    hashMapClone := other _myHashBag myMap clone()
    _myHashBag = HashBag new(other _capacity)
    this _myHashBag myMap = hashMapClone
  }
  clone: func -> This {
    result := This new()
    hashMapClone := this _myHashBag myMap clone()
    result _myHashBag myMap = hashMapClone
    result
  }
  get: func <T>  (key: String, defaultValue: T) -> T {
    result := defaultValue
    if (_myHashBag contains?(key)) {
        storedType := _myHashBag getClass(key)
        // is `T` a derived type or the same type as the stored type?
        if (T inheritsFrom?(storedType))
            result = _myHashBag getEntry(key, T) value as T
    }
    result
  }
  getClass: func (key: String) -> Class {
    return _myHashBag getClass(key)
  }
  getEntry: func <V> (key: String, V: Class) -> HashEntry<String, Pointer> {
    return _myHashBag getEntry(key, V)
  }
  put: func <T> (key: String, value: T) -> Bool {
    return _myHashBag put(key, value)
  }
  add: func <T> (key: String, value: T) -> Bool {
    return _myHashBag add(key, value)
  }
  empty?: func -> Bool { return _myHashBag empty?() }
  remove: func (key: String) -> Bool {
    return _myHashBag remove(key)<commit_msg>Removed extra space<commit_after>import structs/[HashBag, HashMap, ArrayList]

Dictionary: class {
  _myHashBag: HashBag
  _capacity: Int
  init: func {
    init ~withCapacity(10)
  }
  init: func ~withCapacity (=_capacity) {
    _myHashBag = HashBag new(this _capacity)
  }
  init: func ~copy (other: This) {
    hashMapClone := other _myHashBag myMap clone()
    _myHashBag = HashBag new(other _capacity)
    this _myHashBag myMap = hashMapClone
  }
  clone: func -> This {
    result := This new()
    hashMapClone := this _myHashBag myMap clone()
    result _myHashBag myMap = hashMapClone
    result
  }
  get: func <T> (key: String, defaultValue: T) -> T {
    result := defaultValue
    if (_myHashBag contains?(key)) {
        storedType := _myHashBag getClass(key)
        // is `T` a derived type or the same type as the stored type?
        if (T inheritsFrom?(storedType))
            result = _myHashBag getEntry(key, T) value as T
    }
    result
  }
  getClass: func (key: String) -> Class {
    return _myHashBag getClass(key)
  }
  getEntry: func <V> (key: String, V: Class) -> HashEntry<String, Pointer> {
    return _myHashBag getEntry(key, V)
  }
  put: func <T> (key: String, value: T) -> Bool {
    return _myHashBag put(key, value)
  }
  add: func <T> (key: String, value: T) -> Bool {
    return _myHashBag add(key, value)
  }
  empty?: func -> Bool { return _myHashBag empty?() }
  remove: func (key: String) -> Bool {
    return _myHashBag remove(key)
{'fraction_non_alphanumeric': 0.11657065401558793, 'fraction_numerical': 0.0013554727211114877, 'mean_word_length': 3.0661157024793386, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 29, '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': '1641082', 'n_tokens_mistral': 1007, 'n_tokens_neox': 1007, 'n_words': 311}