<commit_before>package io.tetrapod.core.utils;

import java.util.HashMap;
import java.util.Map;

public class PrefMap {

   private final Map<String, String> prefs = new HashMap<>();

   public String getPref(String key, String def) {
      return prefs.containsKey(key) ? prefs.get(key) : def;
   }

   public boolean getPref(String key, boolean def) {
      return prefs.containsKey(key) ? Boolean.parseBoolean(prefs.get(key)) : def;
   }

   public int getPref(String key, int def) {
      return prefs.containsKey(key) ? Integer.parseInt(prefs.get(key)) : def;
   }

   public long getPref(String key, long def) {
      return prefs.containsKey(key) ? Long.parseLong(prefs.get(key)) : def;
   }

   public void setPref(String key, String val) {
      prefs.put(key, val);
   }

   public void setPref(String key, boolean val) {
      prefs.put(key, Boolean.toString(val));
   }

   public void setPref(String key, int val) {
      prefs.put(key, Integer.toString(val));
   }

   public void setPref(String key, long val) {
      prefs.put(key, Long.toString(val));
   }

}<commit_msg>update PrefMap<commit_after>package io.tetrapod.core.utils;

import java.util.*;

public class PrefMap {

   private final Map<String, String> prefs = new HashMap<>();

   public String getPref(String key, String def) {
      return prefs.containsKey(key) ? prefs.get(key) : def;
   }

   public boolean getPref(String key, boolean def) {
      return prefs.containsKey(key) ? Boolean.parseBoolean(prefs.get(key)) : def;
   }

   public int getPref(String key, int def) {
      return prefs.containsKey(key) ? Integer.parseInt(prefs.get(key)) : def;
   }

   public long getPref(String key, long def) {
      return prefs.containsKey(key) ? Long.parseLong(prefs.get(key)) : def;
   }

   public void setPref(String key, String val) {
      prefs.put(key, val);
   }

   public void setPref(String key, boolean val) {
      prefs.put(key, Boolean.toString(val));
   }

   public void setPref(String key, int val) {
      prefs.put(key, Integer.toString(val));
   }

   public void setPref(String key, long val) {
      prefs.put(key, Long.toString(val));
   }

   public int size() {
      return prefs.size();
   }

   public Set<String> keys() {
      return prefs.keySet();
   }
}
{'fraction_non_alphanumeric': 0.12863436123348018, 'fraction_numerical': 0.0, 'mean_word_length': 3.2133580705009277, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '5320622', 'n_tokens_mistral': 769, 'n_tokens_neox': 745, 'n_words': 185}