Program: 3102
Project: 3102
Buggy source:
public boolean sell(CommandSender player,String[] s){
  String currency=iConomy.getBank().getCurrency();
  int amtSold=1;
  double price=0;
  MaterialData item=new MaterialData(0);
  if (!BSutils.hasPermission(player,"String_Node_Str",true)) {
    return true;
  }
  if ((s.length > 2) || (s.length == 0)) {
    return false;
  }
 else   if (BSutils.anonymousCheck(player)) {
    return true;
  }
 else {
    try {
      item=itemDb.get(s[0]);
    }
 catch (    Exception e1) {
      BSutils.sendMessage(player,String.format(BetterShop.configfile.getString("String_Node_Str").replace("String_Node_Str","String_Node_Str"),s[0]));
      return false;
    }
    String itemname=null;
    try {
      itemname=itemDb.getName(item.getItemTypeId(),item.getData());
    }
 catch (    Exception e2) {
      e2.printStackTrace();
    }
    try {
      price=PriceList.getSellPrice(itemname);
      if (price < 1)       throw new Exception();
    }
 catch (    Exception e1) {
      BSutils.sendMessage(player,String.format(BetterShop.configfile.getString("String_Node_Str").replace("String_Node_Str","String_Node_Str"),itemname));
      return true;
    }
    ItemStack itemsToSell=item.toItemStack();
    if (s.length == 2)     try {
      amtSold=Integer.parseInt(s[1]);
    }
 catch (    Exception e) {
      BSutils.sendMessage(player,s[1] + "String_Node_Str");
    }
    if (amtSold < 0) {
      BSutils.sendMessage(player,BetterShop.configfile.getString("String_Node_Str"));
      return true;
    }
    itemsToSell.setAmount(amtSold);
    PlayerInventory inv=((Player)player).getInventory();
    int amtHas=amtSold;
    leftover.clear();
    leftover.putAll(inv.removeItem(itemsToSell));
    if (leftover.size() > 0) {
      amtHas=amtSold - leftover.get(0).getAmount();
      BSutils.sendMessage(player,String.format(BetterShop.configfile.getString("String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str"),amtHas,amtSold));
    }
    double total=amtHas * price;
    try {
      BSutils.credit(player,total);
      BSutils.sendMessage(player,String.format(BetterShop.configfile.getString("String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str"),itemDb.getName(item.getItemTypeId(),item.getData()),amtHas,price,total,currency));
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    return true;
  }
}

Fixed version (ground truth):
public boolean sell(CommandSender player,String[] s){
  String currency=iConomy.getBank().getCurrency();
  int amtSold=1;
  double price=0;
  MaterialData item=new MaterialData(0);
  if (!BSutils.hasPermission(player,"String_Node_Str",true)) {
    return true;
  }
  if ((s.length > 2) || (s.length == 0)) {
    return false;
  }
 else   if (BSutils.anonymousCheck(player)) {
    return true;
  }
 else {
    try {
      item=itemDb.get(s[0]);
    }
 catch (    Exception e1) {
      BSutils.sendMessage(player,String.format(BetterShop.configfile.getString("String_Node_Str").replace("String_Node_Str","String_Node_Str"),s[0]));
      return false;
    }
    String itemname=null;
    try {
      itemname=itemDb.getName(item.getItemTypeId(),item.getData());
    }
 catch (    Exception e2) {
      e2.printStackTrace();
    }
    try {
      price=PriceList.getSellPrice(itemname);
      if (price <= 0)       throw new Exception();
    }
 catch (    Exception e1) {
      BSutils.sendMessage(player,String.format(BetterShop.configfile.getString("String_Node_Str").replace("String_Node_Str","String_Node_Str"),itemname));
      return true;
    }
    ItemStack itemsToSell=item.toItemStack();
    if (s.length == 2)     try {
      amtSold=Integer.parseInt(s[1]);
    }
 catch (    Exception e) {
      BSutils.sendMessage(player,s[1] + "String_Node_Str");
    }
    if (amtSold < 0) {
      BSutils.sendMessage(player,BetterShop.configfile.getString("String_Node_Str"));
      return true;
    }
    itemsToSell.setAmount(amtSold);
    PlayerInventory inv=((Player)player).getInventory();
    int amtHas=amtSold;
    leftover.clear();
    leftover.putAll(inv.removeItem(itemsToSell));
    if (leftover.size() > 0) {
      amtHas=amtSold - leftover.get(0).getAmount();
      BSutils.sendMessage(player,String.format(BetterShop.configfile.getString("String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str"),amtHas,amtSold));
    }
    double total=amtHas * price;
    try {
      BSutils.credit(player,total);
      BSutils.sendMessage(player,String.format(BetterShop.configfile.getString("String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str"),itemDb.getName(item.getItemTypeId(),item.getData()),amtHas,price,total,currency));
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    return true;
  }
}