Program: 17129
Project: 17129
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);
  Account account=NameManager.getAccountFromShortName(name);
  if (account == null)   return null;
  OfflinePlayer owner=account.getUuid().version() != 4 ? Bukkit.getOfflinePlayer(account.getName()) : Bukkit.getOfflinePlayer(account.getUuid());
  if (!ChestShopSign.isAdminShop(sign) && (owner == null || owner.getName() == null || !VaultListener.getProvider().hasAccount(owner)))   return null;
  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);
  Account account=NameManager.getAccountFromShortName(name);
  if (account == null)   return null;
  boolean adminShop=ChestShopSign.isAdminShop(sign);
  OfflinePlayer owner=account.getUuid().version() != 4 || adminShop ? Bukkit.getOfflinePlayer(account.getName()) : Bukkit.getOfflinePlayer(account.getUuid());
  if (!adminShop && (owner == null || owner.getName() == null || !VaultListener.getProvider().hasAccount(owner)))   return null;
  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=(adminShop ? 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);
}