Program: 42027
Project: 42027
Buggy source:
public boolean execute(ICommandSender sender,String[] args) throws Exception {
  if (args.length > 1) {
    throw new BadUsageException(getUsage());
  }
  IPlayer player=(IPlayer)sender;
  IWorld world=player.getWorld();
  if (manager.isPlotWorld(world)) {
    if (manager.isEconomyEnabled(world)) {
      if (player.hasPermission(PermissionNames.USER_BUY)) {
        Plot plot=manager.getPlot(player.getLocation());
        if (plot != null) {
          if (plot.isForSale()) {
            String buyer=player.getName();
            if (player.getUniqueId().equals(plot.getOwnerId())) {
              player.sendMessage(C("String_Node_Str"));
            }
 else {
              int plotLimit=getPlotLimit(player);
              int plotsOwned=manager.getOwnedPlotCount(player.getUniqueId(),world.getName());
              if (plotLimit != -1 && plotsOwned >= plotLimit) {
                player.sendMessage(C("String_Node_Str") + "String_Node_Str" + plotsOwned+ "String_Node_Str"+ getPlotLimit(player)+ "String_Node_Str"+ C("String_Node_Str")+ "String_Node_Str"+ C("String_Node_Str"));
              }
 else {
                double cost=plot.getPrice();
                if (serverBridge.has(player,cost)) {
                  player.sendMessage(C("String_Node_Str"));
                }
 else {
                  PlotBuyEvent event=new PlotBuyEvent(world,plot,player,cost);
                  plugin.getEventBus().post(event);
                  if (!event.isCancelled()) {
                    EconomyResponse er=serverBridge.withdrawPlayer(player,cost);
                    if (er.transactionSuccess()) {
                      String oldOwner=plot.getOwner();
                      IOfflinePlayer currBuyer=serverBridge.getOfflinePlayer(plot.getOwnerId());
                      if (currBuyer != null) {
                        EconomyResponse er2=serverBridge.depositPlayer(currBuyer,cost);
                        if (er2.transactionSuccess()) {
                          for (                          IPlayer onlinePlayers : serverBridge.getOnlinePlayers()) {
                            if (onlinePlayers.getName().equals(oldOwner)) {
                              onlinePlayers.sendMessage(C("String_Node_Str") + "String_Node_Str" + plot.getId()+ "String_Node_Str"+ C("String_Node_Str")+ "String_Node_Str"+ buyer+ "String_Node_Str"+ serverBridge.getEconomy().get().format(cost));
                              break;
                            }
                          }
                        }
 else {
                          player.sendMessage(er2.errorMessage);
                          serverBridge.getLogger().warning(er2.errorMessage);
                        }
                      }
                      plot.setOwner(buyer);
                      plot.setOwnerId(player.getUniqueId());
                      plot.setPrice(0.0);
                      plot.setForSale(false);
                      plot.updateField("String_Node_Str",buyer);
                      plot.updateField("String_Node_Str",player.getUniqueId());
                      plot.updateField("String_Node_Str",0);
                      plot.updateField("String_Node_Str",false);
                      manager.adjustWall(plot,world,true);
                      manager.removeSellSign(plot,world);
                      manager.setOwnerSign(world,plot);
                      player.sendMessage(C("String_Node_Str") + "String_Node_Str" + serverBridge.getEconomy().get().format(cost));
                      if (isAdvancedLogging()) {
                        plugin.getLogger().info(buyer + "String_Node_Str" + C("String_Node_Str")+ "String_Node_Str"+ plot.getId().toString()+ "String_Node_Str"+ C("String_Node_Str")+ "String_Node_Str"+ cost);
                      }
                    }
 else {
                      player.sendMessage(er.errorMessage);
                      serverBridge.getLogger().warning(er.errorMessage);
                    }
                  }
                }
              }
            }
          }
 else {
            player.sendMessage(C("String_Node_Str"));
          }
        }
 else {
          player.sendMessage("String_Node_Str");
        }
      }
 else {
        return false;
      }
    }
 else {
      player.sendMessage(C("String_Node_Str"));
    }
  }
  return true;
}

Fixed version (ground truth):
public boolean execute(ICommandSender sender,String[] args) throws Exception {
  if (args.length > 1) {
    throw new BadUsageException(getUsage());
  }
  IPlayer player=(IPlayer)sender;
  IWorld world=player.getWorld();
  if (manager.isPlotWorld(world)) {
    if (manager.isEconomyEnabled(world)) {
      if (player.hasPermission(PermissionNames.USER_BUY)) {
        Plot plot=manager.getPlot(player.getLocation());
        if (plot != null) {
          if (plot.isForSale()) {
            String buyer=player.getName();
            if (player.getUniqueId().equals(plot.getOwnerId())) {
              player.sendMessage(C("String_Node_Str"));
            }
 else {
              int plotLimit=getPlotLimit(player);
              int plotsOwned=manager.getOwnedPlotCount(player.getUniqueId(),world);
              if (plotLimit != -1 && plotsOwned >= plotLimit) {
                player.sendMessage(C("String_Node_Str") + "String_Node_Str" + plotsOwned+ "String_Node_Str"+ getPlotLimit(player)+ "String_Node_Str"+ C("String_Node_Str")+ "String_Node_Str"+ C("String_Node_Str"));
              }
 else {
                double cost=plot.getPrice();
                if (serverBridge.has(player,cost)) {
                  player.sendMessage(C("String_Node_Str"));
                }
 else {
                  PlotBuyEvent event=new PlotBuyEvent(world,plot,player,cost);
                  plugin.getEventBus().post(event);
                  if (!event.isCancelled()) {
                    EconomyResponse er=serverBridge.withdrawPlayer(player,cost);
                    if (er.transactionSuccess()) {
                      String oldOwner=plot.getOwner();
                      IOfflinePlayer currBuyer=serverBridge.getOfflinePlayer(plot.getOwnerId());
                      if (currBuyer != null) {
                        EconomyResponse er2=serverBridge.depositPlayer(currBuyer,cost);
                        if (er2.transactionSuccess()) {
                          for (                          IPlayer onlinePlayers : serverBridge.getOnlinePlayers()) {
                            if (onlinePlayers.getName().equals(oldOwner)) {
                              onlinePlayers.sendMessage(C("String_Node_Str") + "String_Node_Str" + plot.getId()+ "String_Node_Str"+ C("String_Node_Str")+ "String_Node_Str"+ buyer+ "String_Node_Str"+ serverBridge.getEconomy().get().format(cost));
                              break;
                            }
                          }
                        }
 else {
                          player.sendMessage(er2.errorMessage);
                          serverBridge.getLogger().warning(er2.errorMessage);
                        }
                      }
                      plot.setOwner(buyer);
                      plot.setOwnerId(player.getUniqueId());
                      plot.setPrice(0.0);
                      plot.setForSale(false);
                      plot.updateField("String_Node_Str",buyer);
                      plot.updateField("String_Node_Str",player.getUniqueId());
                      plot.updateField("String_Node_Str",0);
                      plot.updateField("String_Node_Str",false);
                      manager.adjustWall(plot,world,true);
                      manager.removeSellSign(plot,world);
                      manager.setOwnerSign(world,plot);
                      player.sendMessage(C("String_Node_Str") + "String_Node_Str" + serverBridge.getEconomy().get().format(cost));
                      if (isAdvancedLogging()) {
                        plugin.getLogger().info(buyer + "String_Node_Str" + C("String_Node_Str")+ "String_Node_Str"+ plot.getId().toString()+ "String_Node_Str"+ C("String_Node_Str")+ "String_Node_Str"+ cost);
                      }
                    }
 else {
                      player.sendMessage(er.errorMessage);
                      serverBridge.getLogger().warning(er.errorMessage);
                    }
                  }
                }
              }
            }
          }
 else {
            player.sendMessage(C("String_Node_Str"));
          }
        }
 else {
          player.sendMessage("String_Node_Str");
        }
      }
 else {
        return false;
      }
    }
 else {
      player.sendMessage(C("String_Node_Str"));
    }
  }
  return true;
}