Program: 86101
Project: 86101
Buggy source:
public void nextMinigame(long delay){
  in_a_game=false;
  if (currentindex < minigames.size() - 1) {
    currentindex++;
  }
 else {
    System.out.println(arena.getName());
    arena.stop();
    return;
  }
  final ArcadeInstance ai=this;
  Bukkit.getScheduler().runTaskLater(MinigamesAPI.getAPI(),new Runnable(){
    public void run(){
      ArrayList<String> temp=new ArrayList<String>(players);
      PluginInstance mg=minigames.get(currentindex);
      if (mg.getPlugin().getConfig().getBoolean("String_Node_Str")) {
        Arena a=null;
        if (mg.getPlugin().getConfig().getBoolean("String_Node_Str")) {
          String arenaname=mg.getPlugin().getConfig().getString("String_Node_Str");
          a=mg.getArenaByName(arenaname);
          if (a == null) {
            for (            Arena a_ : mg.getArenas()) {
              if (a_.getArenaState() == ArenaState.JOIN || a_.getArenaState() == ArenaState.STARTING) {
                a=a_;
                break;
              }
            }
          }
        }
 else {
          for (          Arena a_ : mg.getArenas()) {
            if (a_.getArenaState() == ArenaState.JOIN || a_.getArenaState() == ArenaState.STARTING) {
              a=a_;
              break;
            }
          }
        }
        if (a != null) {
          in_a_game=true;
          currentarena=a;
          for (          String p_ : temp) {
            Bukkit.getPlayer(p_).sendMessage(mg.getMessagesConfig().arcade_next_minigame.replaceAll("String_Node_Str",mg.getArenaListener().getName()));
            a.joinPlayerLobby(p_,ai,plugin.getConfig().getBoolean("String_Node_Str"),false);
          }
        }
 else {
          nextMinigame(5L);
        }
      }
 else {
        nextMinigame(5L);
      }
    }
  }
,delay);
}

Fixed version (ground truth):
public void nextMinigame(long delay){
  in_a_game=false;
  if (currentindex < minigames.size() - 1) {
    currentindex++;
  }
 else {
    System.out.println(arena.getName());
    arena.stop();
    return;
  }
  final ArcadeInstance ai=this;
  Bukkit.getScheduler().runTaskLater(MinigamesAPI.getAPI(),new Runnable(){
    public void run(){
      ArrayList<String> temp=new ArrayList<String>(players);
      PluginInstance mg=minigames.get(currentindex);
      if (mg.getPlugin().getConfig().getBoolean("String_Node_Str")) {
        Arena a=null;
        if (mg.getPlugin().getConfig().getBoolean("String_Node_Str")) {
          String arenaname=mg.getPlugin().getConfig().getString("String_Node_Str");
          a=mg.getArenaByName(arenaname);
          if (a == null) {
            for (            Arena a_ : mg.getArenas()) {
              if (a_.getArenaState() == ArenaState.JOIN || a_.getArenaState() == ArenaState.STARTING) {
                a=a_;
                break;
              }
            }
          }
        }
 else {
          for (          Arena a_ : mg.getArenas()) {
            if (a_.getArenaState() == ArenaState.JOIN || a_.getArenaState() == ArenaState.STARTING) {
              a=a_;
              break;
            }
          }
        }
        if (a != null) {
          in_a_game=true;
          currentarena=a;
          for (          String p_ : temp) {
            Bukkit.getPlayer(p_).sendMessage(mg.getMessagesConfig().arcade_next_minigame.replaceAll("String_Node_Str",mg.getArenaListener().getName()));
            a.joinPlayerLobby(p_,ai,plugin.getConfig().getBoolean("String_Node_Str"),false);
            SpectatorManager.setSpectate(Bukkit.getPlayer(p_),false);
          }
        }
 else {
          nextMinigame(5L);
        }
      }
 else {
        nextMinigame(5L);
      }
    }
  }
,delay);
}