Program: 22316
Project: 22316
Buggy source:
public static void registerGadgets(){
  SteamcraftRegistry.addCategory("String_Node_Str");
  if (Config.enableWrench) {
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(SteamcraftItems.wrench)),new BookPageText("String_Node_Str","String_Node_Str"),new BookPageCrafting("String_Node_Str","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",new ItemStack(SteamcraftItems.spyglass)),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
  }
  if (Config.enableSurvivalist) {
    if (CrossMod.BAUBLES) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(SteamcraftItems.survivalist)),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",new ItemStack(SteamcraftItems.survivalist)),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    }
  }
  if (Config.enableCanister) {
    ItemStack output=new ItemStack(Items.DIAMOND_SWORD);
    output.setTagCompound(new NBTTagCompound());
    output.getTagCompound().setInteger("String_Node_Str",0);
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(SteamcraftItems.canister)),new BookPageCrafting("String_Node_Str","String_Node_Str"),new BookPageCrafting("String_Node_Str",true,output,Items.DIAMOND_SWORD,SteamcraftItems.canister));
  }
  if (Config.enableTopHat) {
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(SteamcraftItems.tophatNoEmerald)),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    if (Config.enableEmeraldHat) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(SteamcraftItems.tophat)),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    }
  }
  if (Config.enableGoggles) {
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(SteamcraftItems.goggles),new ItemStack(SteamcraftItems.monacle)),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
  }
  if (Config.enableSteamCell) {
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(SteamcraftItems.steamcellEmpty),new ItemStack(SteamcraftItems.steamcellFull)),new BookPageCrafting("String_Node_Str","String_Node_Str"));
  }
  if (Config.enableSteamCellBauble && CrossMod.BAUBLES) {
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(SteamcraftItems.steamcellBauble)),new BookPageCrafting("String_Node_Str","String_Node_Str"));
  }
}

Fixed version (ground truth):
public static void registerGadgets(){
  SteamcraftRegistry.addCategory("String_Node_Str");
  if (Config.enableWrench) {
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(WRENCH.getItem())),new BookPageText("String_Node_Str","String_Node_Str"),new BookPageCrafting("String_Node_Str","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",new ItemStack(SPYGLASS.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
  }
  if (Config.enableSurvivalist) {
    if (CrossMod.BAUBLES) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(SURVIVALIST_TOOLKIT.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",new ItemStack(SURVIVALIST_TOOLKIT.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    }
  }
  if (Config.enableCanister) {
    ItemStack output=new ItemStack(Items.DIAMOND_SWORD);
    output.setTagCompound(new NBTTagCompound());
    output.getTagCompound().setInteger("String_Node_Str",0);
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(ITEM_CANISTER.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str"),new BookPageCrafting("String_Node_Str",true,output,Items.DIAMOND_SWORD,ITEM_CANISTER.getItem()));
  }
  if (Config.enableTopHat) {
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(TOP_HAT.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    if (Config.enableEmeraldHat) {
      SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(ENTREPRENEUR_TOP_HAT.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str"));
    }
  }
  if (Config.enableGoggles) {
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(GOGGLES.getItem()),new ItemStack(MONOCLE.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"),new BookPageCrafting("String_Node_Str","String_Node_Str","String_Node_Str"));
  }
  if (Config.enableSteamCell) {
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(STEAM_CELL_EMPTY.getItem()),new ItemStack(STEAM_CELL_FULL.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str"));
  }
  if (Config.enableSteamCellBauble && CrossMod.BAUBLES) {
    SteamcraftRegistry.addResearch("String_Node_Str","String_Node_Str",new BookPageItem("String_Node_Str","String_Node_Str",new ItemStack(STEAM_CELL_FILLER.getItem())),new BookPageCrafting("String_Node_Str","String_Node_Str"));
  }
}