Program: 79951
Project: 79951
Buggy source:
public ElectricSmeltery(Category category,ItemStack item,String name,RecipeType recipeType,ItemStack[] recipe){
  super(category,item,name,recipeType,recipe);
  new BlockMenuPreset(name,getInventoryTitle()){
    @Override public void init(){
      constructMenu(this);
    }
    @Override public void newInstance(    BlockMenu menu,    Block b){
    }
    @Override public boolean canOpen(    Block b,    Player p){
      return p.hasPermission("String_Node_Str") || CSCoreLib.getLib().getProtectionManager().canAccessChest(p.getUniqueId(),b,true);
    }
    @Override public int[] getSlotsAccessedByItemTransport(    ItemTransportFlow flow){
      return new int[0];
    }
    @Override public int[] getSlotsAccessedByItemTransport(    BlockMenu menu,    ItemTransportFlow flow,    ItemStack item){
      if (flow.equals(ItemTransportFlow.WITHDRAW))       return getOutputSlots();
      List<Integer> slots=new ArrayList<Integer>();
      for (      int slot : getInputSlots()) {
        if (SlimefunManager.isItemSimiliar(menu.getItemInSlot(slot),item,true)) {
          slots.add(slot);
        }
      }
      if (slots.isEmpty()) {
        return getInputSlots();
      }
 else {
        Collections.sort(slots,new RecipeSorter(menu));
        return ArrayUtils.toPrimitive(slots.toArray(new Integer[slots.size()]));
      }
    }
  }
;
  registerBlockHandler(name,new SlimefunBlockHandler(){
    @Override public void onPlace(    Player p,    Block b,    SlimefunItem item){
    }
    @Override public boolean onBreak(    Player p,    Block b,    SlimefunItem item,    UnregisterReason reason){
      BlockMenu inv=BlockStorage.getInventory(b);
      if (inv != null) {
        for (        int slot : getInputSlots()) {
          if (inv.getItemInSlot(slot) != null)           b.getWorld().dropItemNaturally(b.getLocation(),inv.getItemInSlot(slot));
        }
        for (        int slot : getOutputSlots()) {
          if (inv.getItemInSlot(slot) != null)           b.getWorld().dropItemNaturally(b.getLocation(),inv.getItemInSlot(slot));
        }
      }
      progress.remove(b.getLocation());
      processing.remove(b.getLocation());
      return true;
    }
  }
);
  this.registerDefaultRecipes();
}

Fixed version (ground truth):
public ElectricSmeltery(Category category,ItemStack item,String name,RecipeType recipeType,ItemStack[] recipe){
  super(category,item,name,recipeType,recipe);
  new BlockMenuPreset(name,getInventoryTitle()){
    @Override public void init(){
      constructMenu(this);
    }
    @Override public void newInstance(    BlockMenu menu,    Block b){
    }
    @Override public boolean canOpen(    Block b,    Player p){
      return p.hasPermission("String_Node_Str") || CSCoreLib.getLib().getProtectionManager().canAccessChest(p.getUniqueId(),b,true);
    }
    @Override public int[] getSlotsAccessedByItemTransport(    ItemTransportFlow flow){
      return new int[0];
    }
    @Override public int[] getSlotsAccessedByItemTransport(    BlockMenu menu,    ItemTransportFlow flow,    ItemStack item){
      if (flow.equals(ItemTransportFlow.WITHDRAW))       return getOutputSlots();
      List<Integer> slots=new ArrayList<Integer>();
      for (      int slot : getInputSlots()) {
        if (SlimefunManager.isItemSimiliar(menu.getItemInSlot(slot),item,true)) {
          slots.add(slot);
        }
      }
      if (slots.isEmpty()) {
        return getInputSlots();
      }
 else {
        Collections.sort(slots,new RecipeSorter(menu));
        return ArrayUtils.toPrimitive(slots.toArray(new Integer[slots.size()]));
      }
    }
  }
;
  registerBlockHandler(name,new SlimefunBlockHandler(){
    @Override public void onPlace(    Player p,    Block b,    SlimefunItem item){
    }
    @Override public boolean onBreak(    Player p,    Block b,    SlimefunItem item,    UnregisterReason reason){
      BlockMenu inv=BlockStorage.getInventory(b);
      if (inv != null) {
        for (        int slot : getInputSlots()) {
          if (inv.getItemInSlot(slot) != null) {
            b.getWorld().dropItemNaturally(b.getLocation(),inv.getItemInSlot(slot));
            inv.replaceExistingItem(slot,null);
          }
        }
        for (        int slot : getOutputSlots()) {
          if (inv.getItemInSlot(slot) != null) {
            b.getWorld().dropItemNaturally(b.getLocation(),inv.getItemInSlot(slot));
            inv.replaceExistingItem(slot,null);
          }
        }
      }
      progress.remove(b.getLocation());
      processing.remove(b.getLocation());
      return true;
    }
  }
);
  this.registerDefaultRecipes();
}