<commit_before>package deploydb.registry

import groovy.transform.TypeChecked
import java.util.concurrent.ConcurrentSkipListMap

/**
 * Model Registry object
 *
 * It creates the configuration driven model objects. The key for Model 
 * instances is String. Objects are stored in skiplistMap for later retrieval.
 */
@TypeChecked
class ModelRegistry<T> {
    private ConcurrentSkipListMap<String, T> modelTable = new ConcurrentSkipListMap<String, T>()

    /**
     * Insert an extant model in the table
     *
     * @param model          the Model instance
     */
    void put(String name, T model) throws NullPointerException {
        modelTable[name] = model
    }

    /**
     * Return list of all model objects
     */
    List<T> getAll() {
        return new ArrayList<T>(modelTable.values())
    }

    /**
     * Locate a Model by string name
     *
     * @param name The model instance's name (e.g. "fun-as-a-service")
     */
    T get(String name) {
        return modelTable[name]
    }
}<commit_msg>Restore the ConcurrentHashMap in ModelRegistry<commit_after>package deploydb.registry

import groovy.transform.TypeChecked
import java.util.concurrent.ConcurrentHashMap

/**
 * Model Registry object
 *
 * It creates the configuration driven model objects. The key for Model 
 * instances is String. Objects are stored in skiplistMap for later retrieval.
 */
@TypeChecked
class ModelRegistry<T> {
    private ConcurrentHashMap<String, T> modelTable = new ConcurrentHashMap<>()

    /**
     * Insert an extant model in the table
     *
     * @param model          the Model instance
     */
    void put(String name, T model) throws NullPointerException {
        modelTable[name] = model
    }

    /**
     * Return list of all model objects
     */
    List<T> getAll() {
        return modelTable.keySet().sort().collect { String key ->
            modelTable[key]
        }
    }

    /**
     * Locate a Model by string name
     *
     * @param name The model instance's name (e.g. "fun-as-a-service")
     */
    T get(String name) {
        return modelTable[name]
    }
}
{'fraction_non_alphanumeric': 0.09385421629347308, 'fraction_numerical': 0.0, 'mean_word_length': 2.583617747440273, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 13, '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': '976056', 'n_tokens_mistral': 599, 'n_tokens_neox': 581, 'n_words': 189}