Program: 46724
Project: 46724
Buggy source:
@Command(aliases={"String_Node_Str","String_Node_Str"},desc="String_Node_Str",flags="String_Node_Str",max=0) @CommandPermissions({"String_Node_Str"}) public static void claimSelection(final CommandContext args,final MyResidence plugin,final Nation nation,final Player player,final Session session) throws IncompleteRegionException, MyResidenceException {
  ChunkManager chunkManager=nation.getChunkManager();
  final Town selectedTown=session.getSelectedTown();
  final World selectedWorld=plugin.getWorldEdit().getSelection(player).getWorld();
  final Region selectedRegion=plugin.getWorldEdit().getSelection(player).getRegionSelector().getRegion();
  if (!session.hasMajorRights(selectedTown)) {
    throw new PermissionsDeniedException("String_Node_Str");
  }
  if (args.hasFlag('i') && !session.hasPermission("String_Node_Str")) {
    throw new PermissionsDeniedException("String_Node_Str");
  }
  int numberOfChunksToBought=0;
  for (  final Vector2D chunk : selectedRegion.getChunks()) {
    Town chunkOwner=chunkManager.getChunkOwner(selectedWorld,chunk);
    if (chunkOwner == null) {
      numberOfChunksToBought++;
    }
 else     if (chunkOwner != selectedTown && args.hasFlag('i')) {
      throw new MyResidenceException("String_Node_Str");
    }
  }
  double chunkCost=plugin.getConfiguration(player.getWorld()).getChunkCost();
  double cost=chunkCost * numberOfChunksToBought;
  if (selectedTown.getMoney() < cost) {
    throw new NotEnoughMoneyException(chunkCost * numberOfChunksToBought);
  }
  chunkManager.addChunks(selectedTown,selectedWorld,selectedRegion.getChunks());
  selectedTown.subtractMoney(cost);
  nation.save(selectedTown);
  player.sendMessage(ChatColor.DARK_GREEN + "String_Node_Str" + ChatColor.GREEN+ numberOfChunksToBought+ ChatColor.DARK_GREEN+ "String_Node_Str"+ ChatColor.GREEN+ plugin.format(cost)+ ChatColor.DARK_GREEN+ "String_Node_Str");
}

Fixed version (ground truth):
@Command(aliases={"String_Node_Str","String_Node_Str"},desc="String_Node_Str",flags="String_Node_Str",max=0) @CommandPermissions({"String_Node_Str"}) public static void claimSelection(final CommandContext args,final MyResidence plugin,final Nation nation,final Player player,final Session session) throws IncompleteRegionException, MyResidenceException {
  ChunkManager chunkManager=nation.getChunkManager();
  final Town selectedTown=session.getSelectedTown();
  final World selectedWorld=plugin.getWorldEdit().getSelection(player).getWorld();
  final Region selectedRegion=plugin.getWorldEdit().getSelection(player).getRegionSelector().getRegion();
  if (!session.hasMajorRights(selectedTown)) {
    throw new PermissionsDeniedException("String_Node_Str");
  }
  if (args.hasFlag('i') && !nation.getPermissionsResolver().isAdmin(player)) {
    throw new PermissionsDeniedException("String_Node_Str");
  }
  int numberOfChunksToBought=0;
  for (  final Vector2D chunk : selectedRegion.getChunks()) {
    Town chunkOwner=chunkManager.getChunkOwner(selectedWorld,chunk);
    if (chunkOwner == null) {
      numberOfChunksToBought++;
    }
 else     if (chunkOwner != selectedTown && args.hasFlag('i')) {
      throw new MyResidenceException("String_Node_Str");
    }
  }
  double chunkCost=plugin.getConfiguration(player.getWorld()).getChunkCost();
  double cost=chunkCost * numberOfChunksToBought;
  if (selectedTown.getMoney() < cost) {
    throw new NotEnoughMoneyException(chunkCost * numberOfChunksToBought);
  }
  chunkManager.addChunks(selectedTown,selectedWorld,selectedRegion.getChunks());
  selectedTown.subtractMoney(cost);
  nation.save(selectedTown);
  player.sendMessage(ChatColor.DARK_GREEN + "String_Node_Str" + ChatColor.GREEN+ numberOfChunksToBought+ ChatColor.DARK_GREEN+ "String_Node_Str"+ ChatColor.GREEN+ plugin.format(cost)+ ChatColor.DARK_GREEN+ "String_Node_Str");
}