Program: 86060
Project: 86060
Buggy source:
/** 
 * Stops the arena and teleports all players to the mainlobby
 */
public void stop(){
  final Arena a=this;
  if (!temp_delay_stopped) {
    if (plugin.getConfig().getBoolean("String_Node_Str")) {
      Bukkit.getScheduler().runTaskLater(plugin,new Runnable(){
        public void run(){
          temp_delay_stopped=true;
          a.stop();
        }
      }
,plugin.getConfig().getInt("String_Node_Str") * 20L);
      this.setArenaState(ArenaState.RESTARTING);
      Util.updateSign(plugin,this);
      if (plugin.getConfig().getBoolean("String_Node_Str")) {
        if (this.getAllPlayers().size() > 0) {
          Util.spawnFirework(Bukkit.getPlayer(this.getAllPlayers().get(0)));
        }
      }
      return;
    }
  }
  temp_delay_stopped=false;
  try {
    Bukkit.getScheduler().cancelTask(currenttaskid);
  }
 catch (  Exception e) {
  }
  this.setArenaState(ArenaState.RESTARTING);
  final ArrayList<String> temp=new ArrayList<String>(this.getAllPlayers());
  for (  final String p_ : temp) {
    try {
      Bukkit.getScheduler().runTaskLater(plugin,new Runnable(){
        public void run(){
          if (Validator.isPlayerOnline(p_)) {
            for (            Entity e : Bukkit.getPlayer(p_).getNearbyEntities(50,50,50)) {
              if (e.getType() == EntityType.DROPPED_ITEM || e.getType() == EntityType.SLIME || e.getType() == EntityType.ZOMBIE || e.getType() == EntityType.SKELETON || e.getType() == EntityType.SPIDER || e.getType() == EntityType.CREEPER) {
                e.remove();
              }
            }
          }
        }
      }
,10L);
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str");
    }
    leavePlayer(p_,false,true);
  }
  if (a.getArenaType() == ArenaType.REGENERATION) {
    reset();
  }
 else {
    a.setArenaState(ArenaState.JOIN);
    Util.updateSign(plugin,a);
  }
  Bukkit.getScheduler().runTaskLater(plugin,new Runnable(){
    public void run(){
      players.clear();
      pinv.clear();
      pinv_armor.clear();
      pnoreward.clear();
      for (      IconMenu im : pli.getClassesHandler().lasticonm.values()) {
        im.destroy();
      }
      pli.getClassesHandler().lasticonm.clear();
    }
  }
,10L);
  started=false;
  startedIngameCountdown=false;
  temp_countdown=true;
  skip_join_lobby=false;
  currentspawn=0;
  pli.scoreboardManager.clearScoreboard(this.getName());
  pli.scoreboardLobbyManager.clearScoreboard(this.getName());
  if (plugin.getConfig().getBoolean("String_Node_Str")) {
    String[] cmds=plugin.getConfig().getString("String_Node_Str").split("String_Node_Str");
    for (    String cmd : cmds) {
      Bukkit.dispatchCommand(Bukkit.getConsoleSender(),cmd);
    }
  }
  if (plugin.getConfig().getBoolean("String_Node_Str")) {
    final String server=plugin.getConfig().getString("String_Node_Str");
    Bukkit.getScheduler().runTaskLater(plugin,new Runnable(){
      public void run(){
        for (        Player p : Bukkit.getOnlinePlayers()) {
          BungeeUtil.connectToServer(MinigamesAPI.getAPI(),p.getName(),server);
        }
      }
    }
,30L);
    return;
  }
  if (plugin.getConfig().getBoolean("String_Node_Str")) {
    Bukkit.setWhitelist(false);
  }
  if (ai != null) {
    Bukkit.getScheduler().runTaskLater(plugin,new Runnable(){
      public void run(){
        if (ai != null) {
          ai.nextMinigame();
          ai=null;
        }
      }
    }
,10L);
  }
 else {
    if (temp.size() < 2) {
      return;
    }
    if (plugin.getConfig().getBoolean("String_Node_Str")) {
      Bukkit.getScheduler().runTaskLater(plugin,new Runnable(){
        public void run(){
          a.nextArenaOnMapRotation(temp);
        }
      }
,35L);
    }
  }
}

Fixed version (ground truth):
/** 
 * Stops the arena and teleports all players to the mainlobby
 */
public void stop(){
  final Arena a=this;
  if (spectator_task != null) {
    spectator_task.cancel();
  }
  if (!temp_delay_stopped) {
    if (plugin.getConfig().getBoolean("String_Node_Str")) {
      Bukkit.getScheduler().runTaskLater(plugin,new Runnable(){
        public void run(){
          temp_delay_stopped=true;
          a.stop();
        }
      }
,plugin.getConfig().getInt("String_Node_Str") * 20L);
      this.setArenaState(ArenaState.RESTARTING);
      Util.updateSign(plugin,this);
      if (plugin.getConfig().getBoolean("String_Node_Str")) {
        if (this.getAllPlayers().size() > 0) {
          Util.spawnFirework(Bukkit.getPlayer(this.getAllPlayers().get(0)));
        }
      }
      return;
    }
  }
  temp_delay_stopped=false;
  try {
    Bukkit.getScheduler().cancelTask(currenttaskid);
  }
 catch (  Exception e) {
  }
  this.setArenaState(ArenaState.RESTARTING);
  final ArrayList<String> temp=new ArrayList<String>(this.getAllPlayers());
  for (  final String p_ : temp) {
    try {
      Bukkit.getScheduler().runTaskLater(plugin,new Runnable(){
        public void run(){
          if (Validator.isPlayerOnline(p_)) {
            for (            Entity e : Bukkit.getPlayer(p_).getNearbyEntities(50,50,50)) {
              if (e.getType() == EntityType.DROPPED_ITEM || e.getType() == EntityType.SLIME || e.getType() == EntityType.ZOMBIE || e.getType() == EntityType.SKELETON || e.getType() == EntityType.SPIDER || e.getType() == EntityType.CREEPER) {
                e.remove();
              }
            }
          }
        }
      }
,10L);
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str");
    }
    leavePlayer(p_,false,true);
  }
  if (a.getArenaType() == ArenaType.REGENERATION) {
    reset();
  }
 else {
    a.setArenaState(ArenaState.JOIN);
    Util.updateSign(plugin,a);
  }
  Bukkit.getScheduler().runTaskLater(plugin,new Runnable(){
    public void run(){
      players.clear();
      pinv.clear();
      pinv_armor.clear();
      pnoreward.clear();
      for (      IconMenu im : pli.getClassesHandler().lasticonm.values()) {
        im.destroy();
      }
      pli.getClassesHandler().lasticonm.clear();
    }
  }
,10L);
  started=false;
  startedIngameCountdown=false;
  temp_countdown=true;
  skip_join_lobby=false;
  currentspawn=0;
  pli.scoreboardManager.clearScoreboard(this.getName());
  pli.scoreboardLobbyManager.clearScoreboard(this.getName());
  if (plugin.getConfig().getBoolean("String_Node_Str")) {
    String[] cmds=plugin.getConfig().getString("String_Node_Str").split("String_Node_Str");
    for (    String cmd : cmds) {
      Bukkit.dispatchCommand(Bukkit.getConsoleSender(),cmd);
    }
  }
  if (plugin.getConfig().getBoolean("String_Node_Str")) {
    final String server=plugin.getConfig().getString("String_Node_Str");
    Bukkit.getScheduler().runTaskLater(plugin,new Runnable(){
      public void run(){
        for (        Player p : Bukkit.getOnlinePlayers()) {
          BungeeUtil.connectToServer(MinigamesAPI.getAPI(),p.getName(),server);
        }
      }
    }
,30L);
    return;
  }
  if (plugin.getConfig().getBoolean("String_Node_Str")) {
    Bukkit.setWhitelist(false);
  }
  if (ai != null) {
    Bukkit.getScheduler().runTaskLater(plugin,new Runnable(){
      public void run(){
        if (ai != null) {
          ai.nextMinigame();
          ai=null;
        }
      }
    }
,10L);
  }
 else {
    if (temp.size() < 2) {
      return;
    }
    if (plugin.getConfig().getBoolean("String_Node_Str")) {
      Bukkit.getScheduler().runTaskLater(plugin,new Runnable(){
        public void run(){
          a.nextArenaOnMapRotation(temp);
        }
      }
,35L);
    }
  }
}