Program: 86082
Project: 86082
Buggy source:
public void joinArcade(String playername){
  PluginInstance pli=MinigamesAPI.getAPI().pinstances.get(plugin);
  if (!players.contains(playername)) {
    players.add(playername);
    arena.addPlayer(playername);
  }
  if (players.size() >= plugin.getConfig().getInt("String_Node_Str")) {
    boolean msg=true;
    if (!started) {
      startArcade();
    }
 else {
      if (currentindex < minigames.size()) {
        if (in_a_game) {
          if (currentarena != null) {
            Player p=Bukkit.getPlayer(playername);
            if (p != null) {
              PluginInstance pli_=minigames.get(currentindex);
              System.out.println(pli_.getPlugin().getName() + "String_Node_Str" + currentarena.getName()+ "String_Node_Str"+ p.getName());
              if (currentarena.getArenaState() != ArenaState.INGAME) {
                currentarena.joinPlayerLobby(playername,this,false,true);
              }
 else {
                msg=false;
                currentarena.spectateArcade(playername);
              }
              pli_.scoreboardManager.updateScoreboard(pli_.getPlugin(),currentarena);
            }
          }
        }
      }
    }
    if (msg) {
      Bukkit.getPlayer(playername).sendMessage(MinigamesAPI.getAPI().pinstances.get(plugin).getMessagesConfig().arcade_joined_waiting.replaceAll("String_Node_Str","String_Node_Str"));
    }
 else {
      Bukkit.getPlayer(playername).sendMessage(MinigamesAPI.getAPI().pinstances.get(plugin).getMessagesConfig().arcade_joined_spectator);
    }
  }
 else {
    Bukkit.getPlayer(playername).sendMessage(MinigamesAPI.getAPI().pinstances.get(plugin).getMessagesConfig().arcade_joined_waiting.replaceAll("String_Node_Str",Integer.toString(plugin.getConfig().getInt("String_Node_Str") - players.size())));
  }
}

Fixed version (ground truth):
public void joinArcade(String playername){
  PluginInstance pli=MinigamesAPI.getAPI().pinstances.get(plugin);
  if (!players.contains(playername)) {
    players.add(playername);
    arena.addPlayer(playername);
  }
  if (players.size() >= plugin.getConfig().getInt("String_Node_Str")) {
    boolean msg=true;
    if (!started) {
      startArcade();
    }
 else {
      if (currentindex < minigames.size()) {
        if (in_a_game) {
          if (currentarena != null) {
            Player p=Bukkit.getPlayer(playername);
            if (p != null) {
              PluginInstance pli_=minigames.get(currentindex);
              System.out.println(pli_.getPlugin().getName() + "String_Node_Str" + currentarena.getName()+ "String_Node_Str"+ p.getName());
              if (currentarena.getArenaState() != ArenaState.INGAME && currentarena.getArenaState() != ArenaState.RESTARTING) {
                currentarena.joinPlayerLobby(playername,this,false,true);
              }
 else {
                msg=false;
                currentarena.spectateArcade(playername);
              }
              pli_.scoreboardManager.updateScoreboard(pli_.getPlugin(),currentarena);
            }
          }
        }
      }
    }
    if (msg) {
      Bukkit.getPlayer(playername).sendMessage(MinigamesAPI.getAPI().pinstances.get(plugin).getMessagesConfig().arcade_joined_waiting.replaceAll("String_Node_Str","String_Node_Str"));
    }
 else {
      Bukkit.getPlayer(playername).sendMessage(MinigamesAPI.getAPI().pinstances.get(plugin).getMessagesConfig().arcade_joined_spectator);
    }
  }
 else {
    Bukkit.getPlayer(playername).sendMessage(MinigamesAPI.getAPI().pinstances.get(plugin).getMessagesConfig().arcade_joined_waiting.replaceAll("String_Node_Str",Integer.toString(plugin.getConfig().getInt("String_Node_Str") - players.size())));
  }
}