Program: 34085
Project: 34085
Buggy source:
/** 
 * Dynamically creates an inventory of challenges for the player showing the level
 * @param player
 * @param level
 * @return inventory
 */
protected Inventory challengePanel(Player player,String level){
  List<CPItem> cp=new ArrayList<CPItem>();
  if (level.isEmpty() && !challengeList.containsKey("String_Node_Str")) {
    if (!Settings.challengeLevels.isEmpty()) {
      level=Settings.challengeLevels.get(0);
    }
 else {
      plugin.getLogger().severe("String_Node_Str");
      Inventory error=Bukkit.createInventory(null,9,Locale.challengesguiTitle);
      player.sendMessage(ChatColor.RED + Locale.errorCommandNotReady);
      return error;
    }
  }
  for (  String challengeName : challengeList.get(level)) {
    ItemStack icon=null;
    String iconName=plugin.getChallengeConfig().getString("String_Node_Str" + challengeName + "String_Node_Str","String_Node_Str");
    if (!iconName.isEmpty()) {
      try {
        String[] split=iconName.split("String_Node_Str");
        if (split.length == 1) {
          if (iconName.equalsIgnoreCase("String_Node_Str")) {
            iconName="String_Node_Str";
          }
 else           if (iconName.equalsIgnoreCase("String_Node_Str")) {
            iconName="String_Node_Str";
          }
 else           if (iconName.equalsIgnoreCase("String_Node_Str")) {
            iconName="String_Node_Str";
          }
 else           if (iconName.equalsIgnoreCase("String_Node_Str")) {
            iconName="String_Node_Str";
          }
 else           if (iconName.equalsIgnoreCase("String_Node_Str") || iconName.equalsIgnoreCase("String_Node_Str")) {
            iconName="String_Node_Str";
          }
 else           if (iconName.equalsIgnoreCase("String_Node_Str") || iconName.equalsIgnoreCase("String_Node_Str")) {
            iconName="String_Node_Str";
          }
 else           if (iconName.equalsIgnoreCase("String_Node_Str")) {
            iconName="String_Node_Str";
          }
 else           if (iconName.equalsIgnoreCase("String_Node_Str")) {
            iconName="String_Node_Str";
          }
 else           if (iconName.equalsIgnoreCase("String_Node_Str")) {
            iconName="String_Node_Str";
          }
          icon=new ItemStack(Material.valueOf(iconName));
        }
 else         if (split.length == 2) {
          icon=new ItemStack(Material.valueOf(split[0]));
          icon.setDurability(Integer.valueOf(split[1]).shortValue());
        }
      }
 catch (      Exception e) {
        plugin.getLogger().warning("String_Node_Str" + challengeName + "String_Node_Str"+ iconName);
        plugin.getLogger().warning("String_Node_Str");
      }
    }
    if (icon == null) {
      icon=new ItemStack(Material.PAPER);
    }
    String description=ChatColor.GREEN + plugin.getChallengeConfig().getString("String_Node_Str" + challengeName + "String_Node_Str",challengeName.substring(0,1).toUpperCase() + challengeName.substring(1));
    boolean complete=false;
    if (Settings.addCompletedGlow && players.checkChallenge(player.getUniqueId(),challengeName)) {
      ItemMeta im=icon.getItemMeta();
      im.addEnchant(Enchantment.ARROW_DAMAGE,0,true);
      icon.setItemMeta(im);
      icon.removeEnchantment(Enchantment.ARROW_DAMAGE);
      complete=true;
    }
    boolean repeatable=false;
    if (plugin.getChallengeConfig().getBoolean("String_Node_Str" + challengeName + "String_Node_Str",false)) {
      repeatable=true;
    }
    if (!complete || ((complete && repeatable) || !Settings.removeCompleteOntimeChallenges)) {
      CPItem item=new CPItem(icon,description,Settings.CHALLENGECOMMAND + "String_Node_Str" + challengeName,null);
      List<String> lore=challengeDescription(challengeName,player);
      item.setLore(lore);
      cp.add(item);
    }
  }
  int levelDone=0;
  for (int i=0; i < Settings.challengeLevels.size(); i++) {
    if (i == 0) {
      levelDone=0;
    }
 else {
      levelDone=checkLevelCompletion(player,Settings.challengeLevels.get(i - 1));
    }
    if (!level.equalsIgnoreCase(Settings.challengeLevels.get(i))) {
      List<String> lore=new ArrayList<String>();
      if (levelDone <= 0) {
        CPItem item=new CPItem(Material.BOOK_AND_QUILL,ChatColor.GOLD + Settings.challengeLevels.get(i),null,null);
        lore=chop(ChatColor.WHITE,Locale.challengesNavigation.replace("String_Node_Str",Settings.challengeLevels.get(i)),25);
        item.setNextSection(Settings.challengeLevels.get(i));
        item.setLore(lore);
        cp.add(item);
      }
 else {
        CPItem item=new CPItem(Material.BOOK,ChatColor.GOLD + Settings.challengeLevels.get(i),null,null);
        lore=chop(ChatColor.WHITE,Locale.challengestoComplete.replace("String_Node_Str",String.valueOf(levelDone)).replace("String_Node_Str",Settings.challengeLevels.get(i - 1)),25);
        item.setLore(lore);
        cp.add(item);
      }
    }
  }
  if (cp.size() > 0) {
    int size=cp.size() + 8;
    size-=(size % 9);
    Inventory newPanel=Bukkit.createInventory(null,size,Locale.challengesguiTitle);
    playerChallengeGUI.put(player.getUniqueId(),cp);
    for (    CPItem i : cp) {
      newPanel.addItem(i.getItem());
    }
    return newPanel;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Dynamically creates an inventory of challenges for the player showing the level
 * @param player
 * @param level
 * @return inventory
 */
protected Inventory challengePanel(Player player,String level){
  List<CPItem> cp=new ArrayList<CPItem>();
  if (level.isEmpty() && !challengeList.containsKey("String_Node_Str")) {
    if (!Settings.challengeLevels.isEmpty()) {
      level=Settings.challengeLevels.get(0);
    }
 else {
      plugin.getLogger().severe("String_Node_Str");
      Inventory error=Bukkit.createInventory(null,9,Locale.challengesguiTitle);
      player.sendMessage(ChatColor.RED + Locale.errorCommandNotReady);
      return error;
    }
  }
  for (  String challengeName : challengeList.get(level)) {
    ItemStack icon=null;
    String iconName=plugin.getChallengeConfig().getString("String_Node_Str" + challengeName + "String_Node_Str","String_Node_Str");
    if (!iconName.isEmpty()) {
      try {
        String[] split=iconName.split("String_Node_Str");
        if (split.length == 1) {
          if (iconName.equalsIgnoreCase("String_Node_Str")) {
            iconName="String_Node_Str";
          }
 else           if (iconName.equalsIgnoreCase("String_Node_Str")) {
            iconName="String_Node_Str";
          }
 else           if (iconName.equalsIgnoreCase("String_Node_Str")) {
            iconName="String_Node_Str";
          }
 else           if (iconName.equalsIgnoreCase("String_Node_Str")) {
            iconName="String_Node_Str";
          }
 else           if (iconName.equalsIgnoreCase("String_Node_Str") || iconName.equalsIgnoreCase("String_Node_Str")) {
            iconName="String_Node_Str";
          }
 else           if (iconName.equalsIgnoreCase("String_Node_Str") || iconName.equalsIgnoreCase("String_Node_Str")) {
            iconName="String_Node_Str";
          }
 else           if (iconName.equalsIgnoreCase("String_Node_Str")) {
            iconName="String_Node_Str";
          }
 else           if (iconName.equalsIgnoreCase("String_Node_Str")) {
            iconName="String_Node_Str";
          }
 else           if (iconName.equalsIgnoreCase("String_Node_Str")) {
            iconName="String_Node_Str";
          }
          icon=new ItemStack(Material.valueOf(iconName));
        }
 else         if (split.length == 2) {
          icon=new ItemStack(Material.valueOf(split[0]));
          icon.setDurability(Integer.valueOf(split[1]).shortValue());
        }
      }
 catch (      Exception e) {
        plugin.getLogger().warning("String_Node_Str" + challengeName + "String_Node_Str"+ iconName);
        plugin.getLogger().warning("String_Node_Str");
      }
    }
    if (icon == null) {
      icon=new ItemStack(Material.PAPER);
    }
    String description=ChatColor.GREEN + plugin.getChallengeConfig().getString("String_Node_Str" + challengeName + "String_Node_Str",challengeName.substring(0,1).toUpperCase() + challengeName.substring(1));
    boolean complete=false;
    if (Settings.addCompletedGlow && players.checkChallenge(player.getUniqueId(),challengeName)) {
      ItemMeta im=icon.getItemMeta();
      im.addEnchant(Enchantment.ARROW_DAMAGE,0,true);
      icon.setItemMeta(im);
      icon.removeEnchantment(Enchantment.ARROW_DAMAGE);
      complete=true;
    }
    boolean repeatable=false;
    if (plugin.getChallengeConfig().getBoolean("String_Node_Str" + challengeName + "String_Node_Str",false)) {
      repeatable=true;
    }
    if (!complete || ((complete && repeatable) || !Settings.removeCompleteOntimeChallenges)) {
      CPItem item=new CPItem(icon,description,Settings.CHALLENGECOMMAND + "String_Node_Str" + challengeName,null);
      List<String> lore=challengeDescription(challengeName,player);
      item.setLore(lore);
      cp.add(item);
    }
  }
  int levelDone=0;
  for (int i=0; i < Settings.challengeLevels.size(); i++) {
    if (i == 0) {
      levelDone=0;
    }
 else {
      levelDone=checkLevelCompletion(player,Settings.challengeLevels.get(i - 1));
    }
    if (!level.equalsIgnoreCase(Settings.challengeLevels.get(i))) {
      List<String> lore=new ArrayList<String>();
      if (levelDone <= 0) {
        CPItem item=new CPItem(Material.BOOK_AND_QUILL,ChatColor.GOLD + Settings.challengeLevels.get(i),null,null);
        lore=Util.chop(ChatColor.WHITE,Locale.challengesNavigation.replace("String_Node_Str",Settings.challengeLevels.get(i)),25);
        item.setNextSection(Settings.challengeLevels.get(i));
        item.setLore(lore);
        cp.add(item);
      }
 else {
        CPItem item=new CPItem(Material.BOOK,ChatColor.GOLD + Settings.challengeLevels.get(i),null,null);
        lore=Util.chop(ChatColor.WHITE,Locale.challengestoComplete.replace("String_Node_Str",String.valueOf(levelDone)).replace("String_Node_Str",Settings.challengeLevels.get(i - 1)),25);
        item.setLore(lore);
        cp.add(item);
      }
    }
  }
  if (cp.size() > 0) {
    int size=cp.size() + 8;
    size-=(size % 9);
    Inventory newPanel=Bukkit.createInventory(null,size,Locale.challengesguiTitle);
    playerChallengeGUI.put(player.getUniqueId(),cp);
    for (    CPItem i : cp) {
      newPanel.addItem(i.getItem());
    }
    return newPanel;
  }
  return null;
}