Program: 22142
Project: 22142
Buggy source:
public BookPageCrafting(String name,IRecipe... recipes){
  super(name);
  output=recipes[0].getRecipeOutput();
  for (  IRecipe recipe : recipes) {
    if (recipe instanceof ShapedOreRecipe) {
      for (int i=0; i < 9; i++) {
        Collection<Object> newList=new ArrayList<>();
        if (inputs[i] != null) {
          if (inputs[i] instanceof Collection) {
            newList.addAll((Collection)inputs[i]);
          }
 else {
            newList.add(inputs[i]);
          }
        }
        if (((ShapedOreRecipe)recipe).getInput().length > i && ((ShapedOreRecipe)recipe).getInput()[i] != null) {
          if (((ShapedOreRecipe)recipe).getInput()[i] instanceof Collection) {
            newList.addAll((Collection)((ShapedOreRecipe)recipe).getInput()[i]);
          }
 else {
            newList.add(((ShapedOreRecipe)recipe).getInput()[i]);
          }
        }
        inputs[i]=newList;
      }
    }
 else     if (recipe instanceof ShapedRecipes) {
      for (int i=0; i < 10; i++) {
        Collection<Object> newList=new ArrayList<>();
        if (inputs[i] != null) {
          if (inputs[i] instanceof Collection) {
            newList.addAll((Collection)inputs[i]);
          }
 else {
            newList.add(inputs[i]);
          }
        }
        if (((ShapedRecipes)recipe).recipeItems.length > i && ((ShapedRecipes)recipe).recipeItems[i] != null) {
          newList.add(((ShapedRecipes)recipe).recipeItems[i]);
        }
        inputs[i]=newList;
      }
    }
 else     if (recipe instanceof ShapelessRecipes) {
      shapeless=true;
      inputs=ArrayUtils.addAll(inputs,((ShapelessRecipes)recipe).recipeItems.toArray(new Object[((ShapelessRecipes)recipe).recipeItems.size()]));
    }
 else     if (recipe instanceof ShapelessOreRecipe) {
      shapeless=true;
      ShapelessOreRecipe shapelessOreRecipe=(ShapelessOreRecipe)recipe;
      NonNullList<Object> recipeInputs=shapelessOreRecipe.getInput();
      for (int i=0; i < 9; i++) {
        Collection<Object> newList=new ArrayList<>();
        if (inputs[i] != null) {
          if (inputs[i] instanceof Collection) {
            newList.addAll((Collection)inputs[i]);
          }
 else {
            newList.add(inputs[i]);
          }
        }
        if (recipeInputs.size() > i) {
          Object inputAtIndex=recipeInputs.get(i);
          if (inputAtIndex instanceof Collection) {
            newList.addAll((Collection)inputAtIndex);
          }
 else {
            newList.add(inputAtIndex);
          }
        }
        inputs[i]=newList;
      }
    }
  }
  recipe=recipes;
}

Fixed version (ground truth):
public BookPageCrafting(String name,IRecipe... recipes){
  super(name);
  output=recipes[0].getRecipeOutput();
  for (  IRecipe recipe : recipes) {
    if (recipe instanceof ShapedRecipeFactory.ShapedRecipe) {
      for (int i=0; i < 9; i++) {
        Collection<Object> newList=new ArrayList<>();
        if (inputs[i] != null) {
          if (inputs[i] instanceof Collection) {
            newList.addAll((Collection)inputs[i]);
          }
 else {
            newList.add(inputs[i]);
          }
        }
        if (recipe.getIngredients().size() > i && recipe.getIngredients().get(i) != Ingredient.EMPTY) {
          newList.addAll(Arrays.asList(recipe.getIngredients().get(i).getMatchingStacks()));
        }
        inputs[i]=newList;
      }
    }
 else     if (recipe instanceof ShapelessRecipeFactory.ShapelessRecipe) {
      NonNullList<Ingredient> recipeInputs=recipe.getIngredients();
      for (int i=0; i < 9; i++) {
        Collection<Object> newList=new ArrayList<>();
        if (inputs[i] != null) {
          if (inputs[i] instanceof Collection) {
            newList.addAll((Collection)inputs[i]);
          }
 else {
            newList.add(inputs[i]);
          }
        }
        if (recipeInputs.size() > i) {
          newList.addAll(Arrays.asList(recipeInputs.get(i).getMatchingStacks()));
        }
        inputs[i]=newList;
      }
    }
  }
  recipe=recipes;
}