Program: 86037
Project: 86037
Buggy source:
public void resetSmartResetBlock(SmartArenaBlock ablock){
  final Block b_=ablock.getBlock().getWorld().getBlockAt(ablock.getBlock().getLocation());
  if (b_.getType() == Material.FURNACE) {
    ((Furnace)b_.getState()).getInventory().clear();
    ((Furnace)b_.getState()).update();
  }
  if (b_.getType() == Material.CHEST) {
    ((Chest)b_.getState()).getBlockInventory().clear();
    ((Chest)b_.getState()).update();
  }
  if (!b_.getType().toString().equalsIgnoreCase(ablock.getMaterial().toString()) || b_.getData() != ablock.getData()) {
    b_.setType(ablock.getMaterial());
    b_.setData(ablock.getData());
  }
  if (b_.getType() == Material.CHEST) {
    if (ablock.isDoubleChest()) {
      DoubleChest dc=ablock.getDoubleChest();
      HashMap<Integer,ItemStack> chestinv=ablock.getNewInventory();
      for (      Integer i : chestinv.keySet()) {
        ItemStack item=chestinv.get(i);
        if (item != null) {
          dc.getInventory().setItem(i,item);
        }
      }
      ((Chest)b_.getState()).update();
      return;
    }
    ((Chest)b_.getState()).getBlockInventory().clear();
    ((Chest)b_.getState()).update();
    HashMap<Integer,ItemStack> chestinv=ablock.getNewInventory();
    for (    Integer i : chestinv.keySet()) {
      ItemStack item=chestinv.get(i);
      if (item != null) {
        ((Chest)b_.getState()).getBlockInventory().setItem(i,item);
      }
    }
    ((Chest)b_.getState()).update();
  }
  if (b_.getType() == Material.WALL_SIGN || b_.getType() == Material.SIGN_POST) {
    Sign sign=(Sign)b_.getState();
    if (sign != null) {
      int i=0;
      for (      String line : ablock.getSignLines()) {
        sign.setLine(i,line);
        i++;
        if (i > 3) {
          break;
        }
      }
      sign.update();
    }
  }
}

Fixed version (ground truth):
public void resetSmartResetBlock(SmartArenaBlock ablock){
  final Block b_=ablock.getBlock().getWorld().getBlockAt(ablock.getBlock().getLocation());
  if (b_.getType() == Material.FURNACE) {
    ((Furnace)b_.getState()).getInventory().clear();
    ((Furnace)b_.getState()).update();
  }
  if (b_.getType() == Material.CHEST) {
    ((Chest)b_.getState()).getBlockInventory().clear();
    ((Chest)b_.getState()).update();
  }
  if (!b_.getType().toString().equalsIgnoreCase(ablock.getMaterial().toString()) || b_.getData() != ablock.getData()) {
    b_.setType(ablock.getMaterial());
    b_.setData(ablock.getData());
  }
  if (b_.getType() == Material.CHEST) {
    if (ablock.isDoubleChest()) {
      DoubleChest dc=ablock.getDoubleChest();
      HashMap<Integer,ItemStack> chestinv=ablock.getNewInventory();
      for (      Integer i : chestinv.keySet()) {
        ItemStack item=chestinv.get(i);
        if (item != null) {
          dc.getInventory().setItem(i,item);
        }
      }
      ((Chest)b_.getState()).update();
      return;
    }
    ((Chest)b_.getState()).getBlockInventory().clear();
    ((Chest)b_.getState()).update();
    HashMap<Integer,ItemStack> chestinv=ablock.getNewInventory();
    for (    Integer i : chestinv.keySet()) {
      ItemStack item=chestinv.get(i);
      if (item != null) {
        if (i < 27) {
          ((Chest)b_.getState()).getBlockInventory().setItem(i,item);
        }
      }
    }
    ((Chest)b_.getState()).update();
  }
  if (b_.getType() == Material.WALL_SIGN || b_.getType() == Material.SIGN_POST) {
    Sign sign=(Sign)b_.getState();
    if (sign != null) {
      int i=0;
      for (      String line : ablock.getSignLines()) {
        sign.setLine(i,line);
        i++;
        if (i > 3) {
          break;
        }
      }
      sign.update();
    }
  }
}