<commit_before>package scorex.utils

import scala.util.control.NonFatal
import org.h2.mvstore.MVMap

class LogMVMapBuilder[K,V] extends MVMap.Builder[K,V] with ScorexLogging {
  override def create(): MVMap[K, V] = new MVMap[K, V](getKeyType, getValueType) {
    override def put(key: K, value: V): V = {
      try super.put(key, value) catch {
        case NonFatal(t) =>
          log.error("MVStore put error", t)
          throw t
      }
    }
    override def get(key: scala.Any): V = try super.get(key) catch {
      case NonFatal(t) =>
        log.error("MVStore get error", t)
        throw t
    }
  }
}<commit_msg>Fixed empty mvmap types<commit_after>package scorex.utils

import scala.util.control.NonFatal
import org.h2.mvstore.MVMap
import org.h2.mvstore.`type`.ObjectDataType

class LogMVMapBuilder[K, V] extends MVMap.Builder[K, V] with ScorexLogging {
  override def create(): MVMap[K, V] = {
    if (keyType == null) keyType = new ObjectDataType
    if (valueType == null) valueType = new ObjectDataType
    new MVMap[K, V](keyType, valueType) {
      override def put(key: K, value: V): V = {
        try super.put(key, value) catch {
          case NonFatal(t) =>
            log.error("MVStore put error", t)
            throw t
        }
      }
      override def get(key: scala.Any): V = try super.get(key) catch {
        case NonFatal(t) =>
          log.error("MVStore get error", t)
          throw t
      }
    }
  }
}
{'fraction_non_alphanumeric': 0.12292817679558012, 'fraction_numerical': 0.0020718232044198894, 'mean_word_length': 2.5866336633663365, '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': '6719674', 'n_tokens_mistral': 506, 'n_tokens_neox': 488, 'n_words': 131}