Program: 157045
Project: 157045
Buggy source:
/** 
 * TODO Finish JavaDoc
 * @param recipe
 * @return
 */
public static Set<WrappedStack> getRecipeInputs(IRecipe recipe){
  List<WrappedStack> recipeInputs=new ArrayList<>();
  if (recipe instanceof ShapedRecipes) {
    recipeInputs.addAll(Arrays.asList(((ShapedRecipes)recipe).recipeItems).stream().map(itemStack -> WrappedStack.build(itemStack,1)).collect(Collectors.toList()));
  }
 else   if (recipe instanceof ShapelessRecipes) {
    recipeInputs.addAll(((ShapelessRecipes)recipe).recipeItems.stream().filter(itemStack -> itemStack != null).map(itemStack -> WrappedStack.build(itemStack,1)).collect(Collectors.toList()));
  }
 else   if (recipe instanceof ShapedOreRecipe) {
    ShapedOreRecipe shapedOreRecipe=(ShapedOreRecipe)recipe;
    if (validateOreDictionaryRecipe(Arrays.asList(shapedOreRecipe.getInput()))) {
      for (int i=0; i < shapedOreRecipe.getInput().length; i++) {
        Object recipeInput=shapedOreRecipe.getInput()[i];
        if (recipeInput instanceof Collection) {
          WrappedStack oreStack=WrappedStack.build(recipeInput,1);
          if (oreStack != null) {
            recipeInputs.add(oreStack);
          }
        }
 else         if (recipeInput instanceof ItemStack) {
          recipeInputs.add(WrappedStack.build(recipeInput,1));
        }
      }
    }
  }
 else   if (recipe instanceof ShapelessOreRecipe) {
    ShapelessOreRecipe shapelessOreRecipe=((ShapelessOreRecipe)recipe);
    if (validateOreDictionaryRecipe(shapelessOreRecipe.getInput())) {
      recipeInputs.addAll(shapelessOreRecipe.getInput().stream().filter(recipeInput -> recipeInput instanceof ItemStack || recipeInput instanceof Collection).map(recipeInput -> WrappedStack.build(recipeInput,1)).collect(Collectors.toList()));
    }
  }
  return collateStacks(recipeInputs);
}

Fixed version (ground truth):
/** 
 * TODO Finish JavaDoc
 * @param recipe
 * @return
 */
public static Set<WrappedStack> getRecipeInputs(IRecipe recipe){
  List<WrappedStack> recipeInputs=new ArrayList<>();
  if (recipe instanceof ShapedRecipes) {
    recipeInputs.addAll(Arrays.asList(((ShapedRecipes)recipe).recipeItems).stream().filter(itemStack -> itemStack != null && !itemStack.isEmpty()).map(itemStack -> WrappedStack.build(itemStack,1)).collect(Collectors.toList()));
  }
 else   if (recipe instanceof ShapelessRecipes) {
    recipeInputs.addAll(((ShapelessRecipes)recipe).recipeItems.stream().filter(itemStack -> itemStack != null && !itemStack.isEmpty()).map(itemStack -> WrappedStack.build(itemStack,1)).collect(Collectors.toList()));
  }
 else   if (recipe instanceof ShapedOreRecipe) {
    ShapedOreRecipe shapedOreRecipe=(ShapedOreRecipe)recipe;
    if (validateOreDictionaryRecipe(Arrays.asList(shapedOreRecipe.getInput()))) {
      for (int i=0; i < shapedOreRecipe.getInput().length; i++) {
        Object recipeInput=shapedOreRecipe.getInput()[i];
        if (recipeInput instanceof Collection) {
          WrappedStack oreStack=WrappedStack.build(recipeInput,1);
          if (oreStack != null) {
            recipeInputs.add(oreStack);
          }
        }
 else         if (recipeInput instanceof ItemStack) {
          recipeInputs.add(WrappedStack.build(recipeInput,1));
        }
      }
    }
  }
 else   if (recipe instanceof ShapelessOreRecipe) {
    ShapelessOreRecipe shapelessOreRecipe=((ShapelessOreRecipe)recipe);
    if (validateOreDictionaryRecipe(shapelessOreRecipe.getInput())) {
      recipeInputs.addAll(shapelessOreRecipe.getInput().stream().filter(recipeInput -> recipeInput instanceof ItemStack || recipeInput instanceof Collection).map(recipeInput -> WrappedStack.build(recipeInput,1)).collect(Collectors.toList()));
    }
  }
  return collateStacks(recipeInputs);
}