<commit_before>public class InvTweaksModCompatibility {
    
    private static InvTweaksModCompatibility instance = null;
    
    private InvTweaksModCompatibility() {
        
    }
    
    public static InvTweaksModCompatibility getInstance() {
        if (instance == null) {
            instance = new InvTweaksModCompatibility();
        }
        return instance;
    }
    
    /**
     * Returns true if the container is a chest/dispenser,
     * despite not being a GuiChest or a GuiDispenser.
     * @param guiContainer
     * @return
     */
    public boolean isSpecialChest(em guiContainer) {
        return is(guiContainer, "GuiAlchest"); // Equivalent Exchange
    }

    /**
     * Returns a special chest row size.
     * Given guiContainer must be checked first with isSpecialChest().
     * @param guiContainer
     * @param defaultValue
     * @return
     */
    public int getSpecialChestRowSize(em guiContainer, int defaultValue) {
        if (is(guiContainer, "GuiAlchest")) { // Equivalent Exchange
            return 13;
        }
        return defaultValue;
    }
    
    /**
     * Returns true if the container is the inventory screen,
     * despite not being a GuiInventory.
     * @param guiContainer
     * @return
     */
    public boolean isSpecialInventory(em guiContainer) {
        return is(guiContainer, "GuiInventoryMoreSlots"); // Aether mod
    }

    /**
     * Returns true if the guiScreen is a GuiChest or a GuiDispenser
     * but should not be handled for sorting/shortcuts.
     * @param guiContainer
     * @return
     */
    public boolean isForbiddenChest(em guiContainer) {
        return is(guiContainer, "MLGuiChestBuilding"); // Millenaire mod
    }
    
    private static final boolean is(em guiContainer, String className) {
        return guiContainer.getClass().getSimpleName().contains(className);
    }


}
<commit_msg>Support for IronChests IC2 mod<commit_after>public class InvTweaksModCompatibility {
    
    private static InvTweaksModCompatibility instance = null;
    
    private InvTweaksModCompatibility() {
        
    }
    
    public static InvTweaksModCompatibility getInstance() {
        if (instance == null) {
            instance = new InvTweaksModCompatibility();
        }
        return instance;
    }
    
    /**
     * Returns true if the container is a chest/dispenser,
     * despite not being a GuiChest or a GuiDispenser.
     * @param guiContainer
     * @return
     */
    public boolean isSpecialChest(em guiContainer) {
        return is(guiContainer, "GuiAlchest") // Equivalent Exchange
          || is(guiContainer, "GuiDiamondChest")
          || is(guiContainer, "GuiGoldChest"); // Iron chests (IC2)
    }

    /**
     * Returns a special chest row size.
     * Given guiContainer must be checked first with isSpecialChest().
     * @param guiContainer
     * @param defaultValue
     * @return
     */
    public int getSpecialChestRowSize(em guiContainer, int defaultValue) {
        if (is(guiContainer, "GuiAlchest")) { // Equivalent Exchange
            return 13;
        } else if (is(guiContainer, "GuiDiamondChest")) { //Iron chests
          return 12;
        } else if (is(guiContainer, "GuiGoldChest")) {
          return 9;
        }
        return defaultValue;
    }
    
    /**
     * Returns true if the container is the inventory screen,
     * despite not being a GuiInventory.
     * @param guiContainer
     * @return
     */
    public boolean isSpecialInventory(em guiContainer) {
        return is(guiContainer, "GuiInventoryMoreSlots"); // Aether mod
    }

    /**
     * Returns true if the guiScreen is a GuiChest or a GuiDispenser
     * but should not be handled for sorting/shortcuts.
     * @param guiContainer
     * @return
     */
    public boolean isForbiddenChest(em guiContainer) {
        return is(guiContainer, "MLGuiChestBuilding"); // Millenaire mod
    }
    
    private static final boolean is(em guiContainer, String className) {
        return guiContainer.getClass().getSimpleName().contains(className);
    }


}

{'fraction_non_alphanumeric': 0.08157457908465734, 'fraction_numerical': 0.0021342186388427793, 'mean_word_length': 2.145413870246085, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2118168', 'n_tokens_mistral': 1230, 'n_tokens_neox': 1163, 'n_words': 325}