Program: 33852
Project: 33852
Buggy source:
/** 
 * Makes an island using schematic. No permission checks are made. They have to be decided before this method is called.
 * @param player
 * @param schematic
 */
public void newIsland(final Player player,final Schematic schematic){
  final UUID playerUUID=player.getUniqueId();
  boolean firstTime=false;
  if (!plugin.getPlayers().hasIsland(playerUUID)) {
    firstTime=true;
  }
  Location next=getNextIsland(player.getUniqueId());
  plugin.getPlayers().setHasIsland(playerUUID,true);
  plugin.getPlayers().clearHomeLocations(playerUUID);
  plugin.getPlayers().setIslandLocation(playerUUID,next);
  if (schematic.isPlayerSpawn()) {
    plugin.getPlayers().setHomeLocation(playerUUID,schematic.getPlayerSpawn(next),1);
  }
  plugin.setNewIsland(true);
  if (schematic != null) {
    if (Settings.createNether && schematic.isInNether() && Settings.newNether&& ASkyBlock.getNetherWorld() != null) {
      if (!schematic.getPartnerName().isEmpty() && schematics.containsKey(schematic.getPartnerName())) {
        pastePartner(schematics.get(schematic.getPartnerName()),next,player);
      }
      next=next.toVector().toLocation(ASkyBlock.getNetherWorld());
      plugin.getPlayers().setIslandLocation(playerUUID,next);
      schematic.pasteSchematic(next,player,true,firstTime ? PasteReason.NEW_ISLAND : PasteReason.RESET);
    }
 else {
      schematic.pasteSchematic(next,player,true,firstTime ? PasteReason.NEW_ISLAND : PasteReason.RESET);
      if (Settings.createNether && Settings.newNether && ASkyBlock.getNetherWorld() != null) {
        final Location netherLoc=next.toVector().toLocation(ASkyBlock.getNetherWorld());
        if (schematic.getPartnerName().isEmpty()) {
          pastePartner(schematic,netherLoc,player);
        }
 else {
          if (schematics.containsKey(schematic.getPartnerName())) {
            pastePartner(schematics.get(schematic.getPartnerName()),netherLoc,player);
          }
 else {
            plugin.getLogger().severe("String_Node_Str" + schematic.getPartnerName() + "String_Node_Str");
          }
        }
      }
    }
    plugin.getPlayers().setStartIslandRating(playerUUID,schematic.getRating());
  }
  plugin.setNewIsland(false);
  Island myIsland=plugin.getGrid().addIsland(next.getBlockX(),next.getBlockZ(),playerUUID);
  myIsland.setLevelHandicap(schematic.getLevelHandicap());
  plugin.getPlayers().save(playerUUID);
  if (!firstTime) {
    setResetWaitTime(player);
  }
  int range=Settings.islandProtectionRange;
  for (  PermissionAttachmentInfo perms : player.getEffectivePermissions()) {
    if (perms.getPermission().startsWith(Settings.PERMPREFIX + "String_Node_Str")) {
      if (perms.getPermission().contains(Settings.PERMPREFIX + "String_Node_Str")) {
        range=Settings.islandProtectionRange;
        break;
      }
 else {
        String[] spl=perms.getPermission().split(Settings.PERMPREFIX + "String_Node_Str");
        if (spl.length > 1) {
          if (!NumberUtils.isDigits(spl[1])) {
            plugin.getLogger().severe("String_Node_Str" + player.getName() + "String_Node_Str"+ perms.getPermission()+ "String_Node_Str");
          }
 else {
            range=Math.max(range,Integer.valueOf(spl[1]));
          }
        }
      }
    }
  }
  if (range % 2 != 0) {
    range--;
    plugin.getLogger().warning("String_Node_Str" + range + "String_Node_Str"+ player.getName());
  }
  if (range > Settings.islandDistance) {
    plugin.getLogger().warning("String_Node_Str" + Settings.PERMPREFIX + "String_Node_Str"+ range);
    range=Settings.islandDistance;
    plugin.getLogger().warning("String_Node_Str" + Settings.islandDistance + "String_Node_Str"+ range);
  }
  myIsland.setProtectionSize(range);
  plugin.getGrid().saveGrid();
  final IslandNewEvent event=new IslandNewEvent(player,schematic,myIsland);
  plugin.getServer().getPluginManager().callEvent(event);
}

Fixed version (ground truth):
/** 
 * Makes an island using schematic. No permission checks are made. They have to be decided before this method is called.
 * @param player
 * @param schematic
 */
public void newIsland(final Player player,final Schematic schematic){
  final UUID playerUUID=player.getUniqueId();
  boolean firstTime=false;
  if (!plugin.getPlayers().hasIsland(playerUUID)) {
    firstTime=true;
  }
  Location next=getNextIsland(player.getUniqueId());
  plugin.getPlayers().setHasIsland(playerUUID,true);
  plugin.getPlayers().clearHomeLocations(playerUUID);
  plugin.getPlayers().setIslandLocation(playerUUID,next);
  if (schematic.isPlayerSpawn()) {
    plugin.getPlayers().setHomeLocation(playerUUID,schematic.getPlayerSpawn(next),1);
    plugin.getPlayers().setHomeLocation(playerUUID,schematic.getPlayerSpawn(next),-1);
  }
  plugin.setNewIsland(true);
  if (schematic != null) {
    if (Settings.createNether && schematic.isInNether() && Settings.newNether&& ASkyBlock.getNetherWorld() != null) {
      if (!schematic.getPartnerName().isEmpty() && schematics.containsKey(schematic.getPartnerName())) {
        pastePartner(schematics.get(schematic.getPartnerName()),next,player);
      }
      next=next.toVector().toLocation(ASkyBlock.getNetherWorld());
      plugin.getPlayers().setIslandLocation(playerUUID,next);
      schematic.pasteSchematic(next,player,true,firstTime ? PasteReason.NEW_ISLAND : PasteReason.RESET);
    }
 else {
      schematic.pasteSchematic(next,player,true,firstTime ? PasteReason.NEW_ISLAND : PasteReason.RESET);
      if (Settings.createNether && Settings.newNether && ASkyBlock.getNetherWorld() != null) {
        final Location netherLoc=next.toVector().toLocation(ASkyBlock.getNetherWorld());
        if (schematic.getPartnerName().isEmpty()) {
          pastePartner(schematic,netherLoc,player);
        }
 else {
          if (schematics.containsKey(schematic.getPartnerName())) {
            pastePartner(schematics.get(schematic.getPartnerName()),netherLoc,player);
          }
 else {
            plugin.getLogger().severe("String_Node_Str" + schematic.getPartnerName() + "String_Node_Str");
          }
        }
      }
    }
    plugin.getPlayers().setStartIslandRating(playerUUID,schematic.getRating());
  }
  plugin.setNewIsland(false);
  Island myIsland=plugin.getGrid().addIsland(next.getBlockX(),next.getBlockZ(),playerUUID);
  myIsland.setLevelHandicap(schematic.getLevelHandicap());
  plugin.getPlayers().save(playerUUID);
  if (!firstTime) {
    setResetWaitTime(player);
  }
  int range=Settings.islandProtectionRange;
  for (  PermissionAttachmentInfo perms : player.getEffectivePermissions()) {
    if (perms.getPermission().startsWith(Settings.PERMPREFIX + "String_Node_Str")) {
      if (perms.getPermission().contains(Settings.PERMPREFIX + "String_Node_Str")) {
        range=Settings.islandProtectionRange;
        break;
      }
 else {
        String[] spl=perms.getPermission().split(Settings.PERMPREFIX + "String_Node_Str");
        if (spl.length > 1) {
          if (!NumberUtils.isDigits(spl[1])) {
            plugin.getLogger().severe("String_Node_Str" + player.getName() + "String_Node_Str"+ perms.getPermission()+ "String_Node_Str");
          }
 else {
            range=Math.max(range,Integer.valueOf(spl[1]));
          }
        }
      }
    }
  }
  if (range % 2 != 0) {
    range--;
    plugin.getLogger().warning("String_Node_Str" + range + "String_Node_Str"+ player.getName());
  }
  if (range > Settings.islandDistance) {
    plugin.getLogger().warning("String_Node_Str" + Settings.PERMPREFIX + "String_Node_Str"+ range);
    range=Settings.islandDistance;
    plugin.getLogger().warning("String_Node_Str" + Settings.islandDistance + "String_Node_Str"+ range);
  }
  myIsland.setProtectionSize(range);
  plugin.getGrid().saveGrid();
  final IslandNewEvent event=new IslandNewEvent(player,schematic,myIsland);
  plugin.getServer().getPluginManager().callEvent(event);
}