<commit_before>package com.squarespace.template;

import java.lang.reflect.Field;

import com.fasterxml.jackson.core.type.TypeReference;


/**
 * Generic symbol table to map string symbols to instances of a given
 * class. Uses reflection to discover and instances by container class,
 * since they are numerous.
 */
public abstract class SymbolTable<K, V> {

  private StringViewMap<K, V> table;

  private TypeReference<V> ref;
  
  private boolean inUse = false;
  
  public SymbolTable(TypeReference<V> ref, int numBuckets) {
    table = new StringViewMap<K, V>(numBuckets);
    this.ref = ref;
  }

  public void setInUse() {
    this.inUse = true;
  }
  
  public void register(Registry<K, V> source) {
    registerClass(source);
  }
  
  public V get(K symbol) {
    return table.get(symbol);<commit_msg>[template] More tweaks from code review.<commit_after>package com.squarespace.template;

import java.lang.reflect.Field;

import com.fasterxml.jackson.core.type.TypeReference;


/**
 * Generic symbol table to map string symbols to instances of a given
 * class. Uses reflection to discover and instances by container class,
 * since they are numerous.
 */
public abstract class SymbolTable<K, V> {

  private StringViewMap<K, V> table;

  private TypeReference<V> ref;
  
  private boolean inUse = false;
  
  public SymbolTable(TypeReference<V> ref, int numBuckets) {
    table = new StringViewMap<>(numBuckets);
    this.ref = ref;
  }

  public void setInUse() {
    this.inUse = true;
  }
  
  public void register(Registry<K, V> source) {
    registerClass(source);
  }
  
  public V get(K symbol) {
    return table.get(symbol);
{'fraction_non_alphanumeric': 0.09969604863221884, 'fraction_numerical': 0.0, 'mean_word_length': 3.702857142857143, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6342228', 'n_tokens_mistral': 523, 'n_tokens_neox': 504, 'n_words': 155}