Program: 22318
Project: 22318
Buggy source:
public static void registerFirearms(){
  if (Config.enableFirearms || Config.enableRL) {
    SteamcraftRegistry.addCategory("String_Node_Str");
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(SteamcraftItems.steamcraftCrafting,1,1),new ItemStack(SteamcraftItems.steamcraftCrafting,1,2),new ItemStack(SteamcraftItems.steamcraftCrafting,1,3),new ItemStack(SteamcraftItems.steamcraftCrafting,1,4)),new BookPageCrafting("String_Node_Str","String_Node_Str"),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
  }
  if (Config.enableFirearms) {
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(SteamcraftItems.musket)),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    if (Config.enableSpyglass) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(SteamcraftItems.spyglass)));
    }
    if (Config.enableEnhancementAblaze) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(SteamcraftItems.enhancementAblaze)),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    }
    if (Config.enableEnhancementSpeedloader) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(SteamcraftItems.enhancementSpeedloader)),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
    }
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(SteamcraftItems.blunderbuss)),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    if (Config.enableEnhancementAblaze) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(SteamcraftItems.enhancementAblaze)),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    }
    if (Config.enableEnhancementSpeedloader) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(SteamcraftItems.enhancementSpeedloader)),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
    }
    if (Config.enableEnhancementRecoil) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(SteamcraftItems.enhancementRecoil)),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    }
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(SteamcraftItems.pistol)),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    if (Config.enableEnhancementRevolver) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(SteamcraftItems.enhancementRevolver)),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
    }
    if (Config.enableEnhancementSilencer) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(SteamcraftItems.enhancementSilencer)),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    }
    if (Config.enableEnhancementSpeedy) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(SteamcraftItems.enhancementSpeedy)),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
    }
  }
  if (Config.enableRL) {
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(SteamcraftItems.rocketLauncher)),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
    if (Config.enableEnhancementFastRockets) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(SteamcraftItems.enhancementFastRockets)),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    }
    if (Config.enableEnhancementAmmo) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(SteamcraftItems.enhancementAmmo)),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
    }
    if (Config.enableEnhancementAirStrike) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(SteamcraftItems.enhancementAirStrike)),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
    }
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str");
    if (Config.enableRocket) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(SteamcraftItems.rocket)),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
    }
    if (Config.enableRocketConcussive) {
      if (Config.enableRocket) {
        SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(SteamcraftItems.rocketConcussive)),new BookPageCrafting("String_Node_Str","String_Node_Str"));
      }
 else {
        SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(SteamcraftItems.rocketConcussive)),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
      }
    }
    if (Config.enableRocketMining) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(SteamcraftItems.rocketMiner)),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    }
  }
}

Fixed version (ground truth):
public static void registerFirearms(){
  if (Config.enableFirearms || Config.enableRL) {
    SteamcraftRegistry.addCategory("String_Node_Str");
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",BLUNDERBUSS_BARREL.createItemStack(),FLINTLOCK.createItemStack(),GUN_STOCK.createItemStack(),IRON_BARREL.createItemStack()),new BookPageCrafting("String_Node_Str","String_Node_Str"),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
  }
  if (Config.enableFirearms) {
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(MUSKET.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    if (Config.enableSpyglass) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(SPYGLASS.getItem())));
    }
    if (Config.enableEnhancementAblaze) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(BLAZE_BARREL.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    }
    if (Config.enableEnhancementSpeedloader) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(BOLT_ACTION.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
    }
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(BLUNDERBUSS.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    if (Config.enableEnhancementAblaze) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(BLAZE_BARREL.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    }
    if (Config.enableEnhancementSpeedloader) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(BOLT_ACTION.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
    }
    if (Config.enableEnhancementRecoil) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(RECOIL_PAD.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    }
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(PISTOL.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    if (Config.enableEnhancementRevolver) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(REVOLVER_CHAMBER.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
    }
    if (Config.enableEnhancementSilencer) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(MAKESHIFT_SUPPRESSOR.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    }
    if (Config.enableEnhancementSpeedy) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(BREECH.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
    }
  }
  if (Config.enableRL) {
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(ROCKET_LAUNCHER.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
    if (Config.enableEnhancementFastRockets) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(STREAMLINED_BARREL.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    }
    if (Config.enableEnhancementAmmo) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(EXTENDED_MAGAZINE.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
    }
    if (Config.enableEnhancementAirStrike) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(AIR_STRIKE_CONVERSION_KIT.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
    }
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str");
    if (Config.enableRocket) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(ROCKET.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
    }
    if (Config.enableRocketConcussive) {
      if (Config.enableRocket) {
        SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(CONCUSSIVE_ROCKET.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str"));
      }
 else {
        SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(CONCUSSIVE_ROCKET.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
      }
    }
    if (Config.enableRocketMining) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",true,new ItemStack(MINING_ROCKET.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    }
  }
}