Program: 17133
Project: 17133
Buggy source:
private static PreTransactionEvent preparePreTransactionEvent(Sign sign,Player player,Action action){
  String name=sign.getLine(NAME_LINE);
  String quantity=sign.getLine(QUANTITY_LINE);
  String prices=sign.getLine(PRICE_LINE);
  String material=sign.getLine(ITEM_LINE);
  String ownerName=NameManager.getFullUsername(name);
  UUID uuid=NameManager.getUUID(ownerName);
  if (uuid == null) {
    return null;
  }
  OfflinePlayer owner=Bukkit.getOfflinePlayer(uuid);
  Action buy=Properties.REVERSE_BUTTONS ? LEFT_CLICK_BLOCK : RIGHT_CLICK_BLOCK;
  double price=(action == buy ? PriceUtil.getBuyPrice(prices) : PriceUtil.getSellPrice(prices));
  Chest chest=uBlock.findConnectedChest(sign);
  Inventory ownerInventory=(ChestShopSign.isAdminShop(sign) ? new AdminInventory() : chest != null ? chest.getInventory() : null);
  ItemStack item=MaterialUtil.getItem(material);
  if (item == null || !NumberUtil.isInteger(quantity)) {
    player.sendMessage(Messages.prefix(Messages.INVALID_SHOP_DETECTED));
    return null;
  }
  int amount=Integer.parseInt(quantity);
  if (amount < 1) {
    amount=1;
  }
  if (Properties.SHIFT_SELLS_IN_STACKS && player.isSneaking() && price != PriceUtil.NO_PRICE && isAllowedForShift(action == buy)) {
    int newAmount=getStackAmount(item,ownerInventory,player,action);
    if (newAmount > 0) {
      price=(price / amount) * newAmount;
      amount=newAmount;
    }
  }
  item.setAmount(amount);
  ItemStack[] items={item};
  TransactionType transactionType=(action == buy ? BUY : SELL);
  return new PreTransactionEvent(ownerInventory,player.getInventory(),items,price,player,owner,sign,transactionType);
}

Fixed version (ground truth):
private static PreTransactionEvent preparePreTransactionEvent(Sign sign,Player player,Action action){
  String name=sign.getLine(NAME_LINE);
  String quantity=sign.getLine(QUANTITY_LINE);
  String prices=sign.getLine(PRICE_LINE);
  String material=sign.getLine(ITEM_LINE);
  String ownerName=NameManager.getFullUsername(name);
  if (ownerName == null || ownerName.isEmpty()) {
    return null;
  }
  UUID uuid=NameManager.getUUID(ownerName);
  if (uuid == null) {
    return null;
  }
  OfflinePlayer owner=Bukkit.getOfflinePlayer(uuid);
  Action buy=Properties.REVERSE_BUTTONS ? LEFT_CLICK_BLOCK : RIGHT_CLICK_BLOCK;
  double price=(action == buy ? PriceUtil.getBuyPrice(prices) : PriceUtil.getSellPrice(prices));
  Chest chest=uBlock.findConnectedChest(sign);
  Inventory ownerInventory=(ChestShopSign.isAdminShop(sign) ? new AdminInventory() : chest != null ? chest.getInventory() : null);
  ItemStack item=MaterialUtil.getItem(material);
  if (item == null || !NumberUtil.isInteger(quantity)) {
    player.sendMessage(Messages.prefix(Messages.INVALID_SHOP_DETECTED));
    return null;
  }
  int amount=Integer.parseInt(quantity);
  if (amount < 1) {
    amount=1;
  }
  if (Properties.SHIFT_SELLS_IN_STACKS && player.isSneaking() && price != PriceUtil.NO_PRICE && isAllowedForShift(action == buy)) {
    int newAmount=getStackAmount(item,ownerInventory,player,action);
    if (newAmount > 0) {
      price=(price / amount) * newAmount;
      amount=newAmount;
    }
  }
  item.setAmount(amount);
  ItemStack[] items={item};
  TransactionType transactionType=(action == buy ? BUY : SELL);
  return new PreTransactionEvent(ownerInventory,player.getInventory(),items,price,player,owner,sign,transactionType);
}