Program: 33917
Project: 33917
Buggy source:
/** 
 * Presents a GUI for toggling or viewing settings
 * @param player
 * @return
 */
public Inventory islandGuardPanel(Player player){
  UUID uuid=player.getUniqueId();
  Island island=plugin.getGrid().getProtectedIslandAt(player.getLocation());
  List<IPItem> ip=new ArrayList<IPItem>();
  Inventory newPanel=null;
  if (island == null) {
    ip.add(new IPItem(Material.MAP,plugin.myLocale(uuid).igsSettingsGeneralTitle,plugin.myLocale(uuid).igsSettingsGeneralDesc));
    for (    SettingsFlag flag : SettingsFlag.values()) {
      if (flag.equals(SettingsFlag.ACID_DAMAGE) && Settings.acidDamage == 0)       continue;
      if (Settings.defaultWorldSettings.containsKey(flag) && lookup.inverse().containsKey(flag) && plugin.myLocale(uuid).igs.containsKey(flag)) {
        ip.add(new IPItem(Settings.defaultWorldSettings.get(flag),lookup.inverse().get(flag),plugin.myLocale(uuid).igs.get(flag)));
      }
    }
    ip.add(new IPItem(Settings.allowChestDamage,Material.CHEST,plugin.myLocale(uuid).igsChestDamage));
    ip.add(new IPItem(Settings.allowCreeperDamage,Material.SKULL_ITEM,4,plugin.myLocale(uuid).igsCreeperDamage));
    ip.add(new IPItem(Settings.allowCreeperGriefing,Material.SKULL_ITEM,4,plugin.myLocale(uuid).igsCreeperGriefing));
    ip.add(new IPItem(!Settings.restrictWither,Material.SKULL_ITEM,1,plugin.myLocale(uuid).igsWitherDamage));
    ip.add(new IPItem(Settings.allowTNTDamage,Material.TNT,plugin.myLocale(uuid).igsTNT));
    ip.add(new IPItem(Settings.allowVisitorKeepInvOnDeath,Material.IRON_CHESTPLATE,plugin.myLocale(uuid).igsVisitorKeep));
  }
 else   if (island.isSpawn()) {
    ip.add(new IPItem(Material.MAP,plugin.myLocale(uuid).igsSettingsSpawnTitle,plugin.myLocale(uuid).igsSettingsSpawnDesc));
    for (    SettingsFlag flag : Settings.defaultSpawnSettings.keySet()) {
      if (flag.equals(SettingsFlag.ACID_DAMAGE) && Settings.acidDamage == 0)       continue;
      if (lookup.inverse().containsKey(flag) && plugin.myLocale(uuid).igs.containsKey(flag)) {
        ip.add(new IPItem(island.getIgsFlag(flag),lookup.inverse().get(flag),plugin.myLocale(uuid).igs.get(flag)));
      }
    }
  }
 else {
    ip.add(new IPItem(Material.MAP,plugin.myLocale(uuid).igsSettingsIslandTitle,plugin.myLocale(uuid).igsSettingsIslandDesc));
    for (    SettingsFlag flag : Settings.visitorSettings.keySet()) {
      if (flag.equals(SettingsFlag.ACID_DAMAGE) && Settings.acidDamage == 0)       continue;
      if (plugin.myLocale(uuid).igs.containsKey(flag)) {
        ip.add(new IPItem(island.getIgsFlag(flag),lookup.inverse().get(flag),plugin.myLocale(uuid).igs.get(flag)));
      }
    }
  }
  if (ip.size() > 0) {
    int size=ip.size() + 8;
    size-=(size % 9);
    String title=plugin.myLocale(uuid).igsTitle;
    if (title.length() > 32) {
      title=title.substring(0,31);
    }
    newPanel=Bukkit.createInventory(null,size,title);
    int slot=0;
    for (    IPItem i : ip) {
      i.setSlot(slot);
      newPanel.addItem(i.getItem());
    }
  }
  return newPanel;
}

Fixed version (ground truth):
/** 
 * Presents a GUI for toggling or viewing settings
 * @param player
 * @return
 */
public Inventory islandGuardPanel(Player player){
  UUID uuid=player.getUniqueId();
  Island island=plugin.getGrid().getProtectedIslandAt(player.getLocation());
  List<IPItem> ip=new ArrayList<IPItem>();
  Inventory newPanel=null;
  if (island == null) {
    ip.add(new IPItem(Material.MAP,plugin.myLocale(uuid).igsSettingsGeneralTitle,plugin.myLocale(uuid).igsSettingsGeneralDesc));
    for (    SettingsFlag flag : SettingsFlag.values()) {
      if (flag.equals(SettingsFlag.ACID_DAMAGE) && Settings.acidDamage == 0)       continue;
      if (Settings.defaultWorldSettings.containsKey(flag) && lookup.inverse().containsKey(flag) && plugin.myLocale(uuid).igs.containsKey(flag)) {
        ip.add(new IPItem(Settings.defaultWorldSettings.get(flag),lookup.inverse().get(flag),plugin.myLocale(uuid).igs.get(flag),uuid));
      }
    }
    ip.add(new IPItem(Settings.allowChestDamage,Material.CHEST,plugin.myLocale(uuid).igsChestDamage,uuid));
    ip.add(new IPItem(Settings.allowCreeperDamage,Material.SKULL_ITEM,4,plugin.myLocale(uuid).igsCreeperDamage,uuid));
    ip.add(new IPItem(Settings.allowCreeperGriefing,Material.SKULL_ITEM,4,plugin.myLocale(uuid).igsCreeperGriefing,uuid));
    ip.add(new IPItem(!Settings.restrictWither,Material.SKULL_ITEM,1,plugin.myLocale(uuid).igsWitherDamage,uuid));
    ip.add(new IPItem(Settings.allowTNTDamage,Material.TNT,plugin.myLocale(uuid).igsTNT,uuid));
    ip.add(new IPItem(Settings.allowVisitorKeepInvOnDeath,Material.IRON_CHESTPLATE,plugin.myLocale(uuid).igsVisitorKeep,uuid));
  }
 else   if (island.isSpawn()) {
    ip.add(new IPItem(Material.MAP,plugin.myLocale(uuid).igsSettingsSpawnTitle,plugin.myLocale(uuid).igsSettingsSpawnDesc));
    for (    SettingsFlag flag : Settings.defaultSpawnSettings.keySet()) {
      if (flag.equals(SettingsFlag.ACID_DAMAGE) && Settings.acidDamage == 0)       continue;
      if (lookup.inverse().containsKey(flag) && plugin.myLocale(uuid).igs.containsKey(flag)) {
        ip.add(new IPItem(island.getIgsFlag(flag),lookup.inverse().get(flag),plugin.myLocale(uuid).igs.get(flag),uuid));
      }
    }
  }
 else {
    ip.add(new IPItem(Material.MAP,plugin.myLocale(uuid).igsSettingsIslandTitle,plugin.myLocale(uuid).igsSettingsIslandDesc));
    for (    SettingsFlag flag : Settings.visitorSettings.keySet()) {
      if (flag.equals(SettingsFlag.ACID_DAMAGE) && Settings.acidDamage == 0)       continue;
      if (lookup.inverse().get(flag) == null) {
        plugin.getLogger().severe(flag + "String_Node_Str");
      }
 else {
        if (plugin.myLocale(uuid).igs.containsKey(flag)) {
          ip.add(new IPItem(island.getIgsFlag(flag),lookup.inverse().get(flag),plugin.myLocale(uuid).igs.get(flag),uuid));
        }
      }
    }
  }
  if (ip.size() > 0) {
    int size=ip.size() + 8;
    size-=(size % 9);
    String title=plugin.myLocale(uuid).igsTitle;
    if (title.length() > 32) {
      title=title.substring(0,31);
    }
    newPanel=Bukkit.createInventory(null,size,title);
    int slot=0;
    for (    IPItem i : ip) {
      i.setSlot(slot);
      newPanel.addItem(i.getItem());
    }
  }
  return newPanel;
}