Program: 19635
Project: 19635
Buggy source:
public static void moveItems(Inventory iFrom,Inventory iTo,IntMap through){
  Bukkit.getServer().broadcastMessage("String_Node_Str");
  Bukkit.getServer().broadcastMessage(through.toString());
  ItemStack[] from=iFrom.getContents();
  ItemStack[] to=iTo.getContents();
  int i1, i2;
  for (i1=0; i1 < from.length; i1++) {
    if (from[i1] == null) {
      continue;
    }
    Bukkit.getServer().broadcastMessage("String_Node_Str" + IntMap.getIntIndex(from[i1].getTypeId(),(byte)from[i1].getDurability()) + "String_Node_Str");
    int mapAmount=through.getInt(from[i1].getType(),(byte)from[i1].getDurability());
    int startAmount=from[i1].getAmount();
    if (mapAmount == 0 || mapAmount == Integer.MIN_VALUE) {
      continue;
    }
    int amountToMove=(mapAmount == Integer.MAX_VALUE ? startAmount : mapAmount);
    from[i1].setAmount(from[i1].getAmount() - amountToMove + 1);
    Bukkit.getServer().broadcastMessage("String_Node_Str" + amountToMove + "String_Node_Str");
    Bukkit.getServer().broadcastMessage("String_Node_Str" + amountToMove + "String_Node_Str");
    Bukkit.getServer().broadcastMessage("String_Node_Str" + from[i1].getAmount() + "String_Node_Str");
    for (i2=0; i2 < to.length; i2++) {
      if (to[i2] == null) {
        to[i2]=from[i1].clone();
        to[i2].setAmount(amountToMove);
        amountToMove=0;
        break;
      }
 else       if (to[i2].getTypeId() == from[i1].getTypeId() && to[i2].getDurability() == from[i1].getDurability() && to[i2].getAmount() < 64) {
        if (amountToMove + to[i2].getAmount() > 64) {
          amountToMove+=to[i2].getAmount() - 64;
          to[i2].setAmount(64);
        }
 else {
          to[i2].setAmount(amountToMove + to[i2].getAmount());
          amountToMove=0;
        }
        break;
      }
    }
    Bukkit.getServer().broadcastMessage("String_Node_Str" + amountToMove + "String_Node_Str");
    from[i1].setAmount(from[i1].getAmount() + amountToMove - 1);
    Bukkit.getServer().broadcastMessage("String_Node_Str" + from[i1].getAmount() + "String_Node_Str");
    through.setInt(from[i1].getType(),(byte)from[i1].getDurability(),amountToMove);
  }
  iTo.setContents(to);
  iFrom.setContents(from);
}

Fixed version (ground truth):
public static void moveItems(Inventory iFrom,Inventory iTo,IntMap through){
  ItemStack[] from=iFrom.getContents();
  ItemStack[] to=iTo.getContents();
  int i1, i2;
  for (i1=0; i1 < from.length; i1++) {
    if (from[i1] == null) {
      continue;
    }
    int mapAmount=through.getInt(from[i1].getType(),(byte)from[i1].getDurability());
    int startAmount=from[i1].getAmount();
    if (mapAmount == 0 || mapAmount == Integer.MIN_VALUE) {
      continue;
    }
    int amountToMove=(mapAmount == Integer.MAX_VALUE ? startAmount : mapAmount);
    from[i1].setAmount(from[i1].getAmount() - amountToMove + 1);
    for (i2=0; i2 < to.length; i2++) {
      if (to[i2] == null) {
        to[i2]=from[i1].clone();
        to[i2].setAmount(amountToMove);
        amountToMove=0;
        break;
      }
 else       if (to[i2].getTypeId() == from[i1].getTypeId() && to[i2].getDurability() == from[i1].getDurability() && to[i2].getAmount() < 64) {
        if (amountToMove + to[i2].getAmount() > 64) {
          amountToMove+=to[i2].getAmount() - 64;
          to[i2].setAmount(64);
        }
 else {
          to[i2].setAmount(amountToMove + to[i2].getAmount());
          amountToMove=0;
        }
        break;
      }
    }
    from[i1].setAmount(from[i1].getAmount() + amountToMove - 1);
    through.setInt(from[i1].getType(),(byte)from[i1].getDurability(),amountToMove);
  }
  iTo.setContents(to);
  iFrom.setContents(from);
}