<commit_before>package com.cinnamon.object;


import com.cinnamon.system.Config;
import com.cinnamon.system.Game;
import com.cinnamon.system.IndexedFactory;

/**
 * <p>
 *     GObjectFactory is responsible for producing {@link GObject}s to act as whatever game object is needed.
 * </p>
 *
 * <p>
 *     GObjects are neither destroyed nor forgotten when removed from the GObjectFactory. Instead, GObjects are
 *     placed in an object pool to be reused at a later GObject request and reconfigured for a different task. The
 *     GObject's id, version, or both will be different than previously, marking a new "life cycle". Therefore,
 *     references to GObjects should not be made as the reference may become stale (e.g. pointing to the GObject in
 *     the object pool or as a different entity after being recycled).
 * </p>
 *
 * <p>
 *     Instead, the id and version of a GObject should be passed around as a compound key. GObjectFactory Look ups
 *     using the id and version a of GObject from a different life cycle will yield <i>null</i>.
 * </p>
 */
public abstract class GObjectFactory<E extends GObject> extends IndexedFactory<E, Game.Resources>
{
    /**
     * <p>Constructor for GObjectFactory.</p>
     *
     * @param resources resources for assembling {@link GObject}s.
     * @param load initial capacity.
     * @param growth normalized capacity growth.
     */
    protected GObjectFactory(Game.Resources resources, int load, float growth)
    {
        super(resources, load, growth);
    }

    @Override
    public E get()
    {
        return super.get();
    }

    @Override
    public final E get(String configName)
    {
        return super.get(configName);
    }

    @Override
    public final E get(int id, int version)
    {
        return super.get(id, version);
    }

    @Override
    public final E get(int id)
    {
        return super.get(id);
    }

    @Override
    public E remove(int id, int version)
    {
        return super.remove(id, version);
    }

    @Override
    public final E remove(int id)
    {
        return super.remove(id);
    }

    @Override
    public final Config<E, Game.Resources> getConfig(String name)
    {
        return super.getConfig(name);
    }

    @Override
    public final Config<E, Game.Resources> addConfig(String name, Config<E, Game.Resources> config)
    {
        return super.addConfig(name, config);
    }

    @Override
    public Config<E, Game.Resources> removeConfig(String name)
    {
        return super.removeConfig(name);
    }
}<commit_msg>Marked get(), remove(), and removeConfig(0 as final<commit_after>package com.cinnamon.object;


import com.cinnamon.system.Config;
import com.cinnamon.system.Game;
import com.cinnamon.system.IndexedFactory;

/**
 * <p>
 *     GObjectFactory is responsible for producing {@link GObject}s to act as whatever game object is needed.
 * </p>
 *
 * <p>
 *     GObjects are neither destroyed nor forgotten when removed from the GObjectFactory. Instead, GObjects are
 *     placed in an object pool to be reused at a later GObject request and reconfigured for a different task. The
 *     GObject's id, version, or both will be different than previously, marking a new "life cycle". Therefore,
 *     references to GObjects should not be made as the reference may become stale (e.g. pointing to the GObject in
 *     the object pool or as a different entity after being recycled).
 * </p>
 *
 * <p>
 *     Instead, the id and version of a GObject should be passed around as a compound key. GObjectFactory Look ups
 *     using the id and version a of GObject from a different life cycle will yield <i>null</i>.
 * </p>
 */
public abstract class GObjectFactory<E extends GObject> extends IndexedFactory<E, Game.Resources>
{
    /**
     * <p>Constructor for GObjectFactory.</p>
     *
     * @param resources resources for assembling {@link GObject}s.
     * @param load initial capacity.
     * @param growth normalized capacity growth.
     */
    protected GObjectFactory(Game.Resources resources, int load, float growth)
    {
        super(resources, load, growth);
    }

    @Override
    public final E get()
    {
        return super.get();
    }

    @Override
    public final E get(String configName)
    {
        return super.get(configName);
    }

    @Override
    public final E get(int id, int version)
    {
        return super.get(id, version);
    }

    @Override
    public final E get(int id)
    {
        return super.get(id);
    }

    @Override
    public final E remove(int id, int version)
    {
        return super.remove(id, version);
    }

    @Override
    public final E remove(int id)
    {
        return super.remove(id);
    }

    @Override
    public final Config<E, Game.Resources> getConfig(String name)
    {
        return super.getConfig(name);
    }

    @Override
    public final Config<E, Game.Resources> addConfig(String name, Config<E, Game.Resources> config)
    {
        return super.addConfig(name, config);
    }

    @Override
    public final Config<E, Game.Resources> removeConfig(String name)
    {
        return super.removeConfig(name);
    }
}
{'fraction_non_alphanumeric': 0.09060923554520761, 'fraction_numerical': 0.00019402405898331392, 'mean_word_length': 2.719336219336219, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, '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': '3939250', 'n_tokens_mistral': 1486, 'n_tokens_neox': 1444, 'n_words': 535}