Program: 86056
Project: 86056
Buggy source:
public void leavePlayerRaw(final String playername,boolean fullLeave){
  if (!this.containsPlayer(playername)) {
    return;
  }
  this.players.remove(playername);
  pli.global_players.remove(playername);
  if (fullLeave) {
    plugin.getConfig().set("String_Node_Str" + playername + "String_Node_Str",playername);
    plugin.getConfig().set("String_Node_Str" + playername + "String_Node_Str",plugin.getName());
    for (    ItemStack i : pinv.get(playername)) {
      if (i != null) {
        plugin.getConfig().set("String_Node_Str" + playername + "String_Node_Str"+ Integer.toString((int)Math.round(Math.random() * 10000))+ i.getType().toString(),i);
      }
    }
    plugin.saveConfig();
    try {
      Player p=Bukkit.getPlayer(playername);
      if (pli.global_players.containsKey(playername)) {
        pli.global_players.remove(playername);
      }
      if (pli.global_lost.containsKey(playername)) {
        pli.global_lost.remove(playername);
      }
      if (pli.global_arcade_spectator.containsKey(playername)) {
        pli.global_arcade_spectator.remove(playername);
      }
      if (p != null) {
        p.removePotionEffect(PotionEffectType.JUMP);
        Util.teleportPlayerFixed(p,this.mainlobby);
        p.setFireTicks(0);
        p.setFlying(false);
        if (!p.isOp()) {
          p.setAllowFlight(false);
        }
        if (pgamemode.containsKey(p.getName())) {
          p.setGameMode(pgamemode.get(p.getName()));
        }
        if (pxplvl.containsKey(p.getName())) {
          p.setLevel(0);
          p.setLevel(pxplvl.get(p.getName()));
        }
        p.getInventory().setContents(pinv.get(playername));
        p.getInventory().setArmorContents(pinv_armor.get(playername));
        p.updateInventory();
        p.setWalkSpeed(0.2F);
        p.setFoodLevel(20);
        p.setHealth(20D);
        p.removePotionEffect(PotionEffectType.JUMP);
        pli.getSpectatorManager().setSpectate(p,false);
      }
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str" + e.getMessage());
    }
    return;
  }
  final Player p=Bukkit.getPlayer(playername);
  Util.clearInv(p);
  p.setWalkSpeed(0.2F);
  p.setFoodLevel(20);
  p.setHealth(20D);
  p.setFireTicks(0);
  p.removePotionEffect(PotionEffectType.JUMP);
  pli.getSpectatorManager().setSpectate(p,false);
  for (  PotionEffect effect : p.getActivePotionEffects()) {
    if (effect != null) {
      p.removePotionEffect(effect.getType());
    }
  }
  for (  Entity e : p.getNearbyEntities(50D,50D,50D)) {
    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();
    }
  }
  pli.global_players.remove(playername);
  if (pli.global_lost.containsKey(playername)) {
    pli.global_lost.remove(playername);
  }
  if (pli.global_arcade_spectator.containsKey(playername)) {
    pli.global_arcade_spectator.remove(playername);
  }
  Util.updateSign(plugin,this);
  final String arenaname=this.getInternalName();
  final Arena a=this;
  final boolean started_=started;
  Bukkit.getScheduler().runTaskLater(plugin,new Runnable(){
    public void run(){
      if (p != null) {
        if (ai == null || a.isArcadeMain()) {
          if (a.mainlobby != null) {
            Util.teleportPlayerFixed(p,a.mainlobby);
          }
 else           if (a.waitinglobby != null) {
            Util.teleportPlayerFixed(p,a.waitinglobby);
          }
        }
        p.setFireTicks(0);
        p.setFlying(false);
        if (!p.isOp()) {
          p.setAllowFlight(false);
        }
        if (pgamemode.containsKey(p.getName())) {
          p.setGameMode(pgamemode.get(p.getName()));
        }
        if (pxplvl.containsKey(p.getName())) {
          p.setLevel(0);
          p.setLevel(pxplvl.get(p.getName()));
        }
        p.getInventory().setContents(pinv.get(playername));
        p.getInventory().setArmorContents(pinv_armor.get(playername));
        p.updateInventory();
        if (started_) {
          if (!pnoreward.contains(playername)) {
            pli.getRewardsInstance().giveWinReward(playername,a,global_coin_multiplier);
          }
 else {
            pnoreward.remove(playername);
          }
        }
        try {
          pli.scoreboardManager.removeScoreboard(arenaname,p);
        }
 catch (        Exception e) {
        }
      }
    }
  }
,5L);
  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(){
        BungeeUtil.connectToServer(MinigamesAPI.getAPI(),p.getName(),server);
      }
    }
,30L);
    return;
  }
}

Fixed version (ground truth):
public void leavePlayerRaw(final String playername,boolean fullLeave){
  if (!this.containsPlayer(playername)) {
    return;
  }
  this.players.remove(playername);
  pli.global_players.remove(playername);
  if (fullLeave) {
    plugin.getConfig().set("String_Node_Str" + playername + "String_Node_Str",playername);
    plugin.getConfig().set("String_Node_Str" + playername + "String_Node_Str",plugin.getName());
    for (    ItemStack i : pinv.get(playername)) {
      if (i != null) {
        plugin.getConfig().set("String_Node_Str" + playername + "String_Node_Str"+ Integer.toString((int)Math.round(Math.random() * 10000))+ i.getType().toString(),i);
      }
    }
    plugin.saveConfig();
    try {
      Player p=Bukkit.getPlayer(playername);
      if (pli.global_players.containsKey(playername)) {
        pli.global_players.remove(playername);
      }
      if (pli.global_lost.containsKey(playername)) {
        pli.global_lost.remove(playername);
      }
      if (pli.global_arcade_spectator.containsKey(playername)) {
        pli.global_arcade_spectator.remove(playername);
      }
      if (p != null) {
        p.removePotionEffect(PotionEffectType.JUMP);
        Util.teleportPlayerFixed(p,this.mainlobby);
        p.setFireTicks(0);
        p.setFlying(false);
        if (!p.isOp()) {
          p.setAllowFlight(false);
        }
        if (pgamemode.containsKey(p.getName())) {
          p.setGameMode(pgamemode.get(p.getName()));
        }
        if (pxplvl.containsKey(p.getName())) {
          p.setLevel(0);
          p.setLevel(pxplvl.get(p.getName()));
        }
        p.getInventory().setContents(pinv.get(playername));
        p.getInventory().setArmorContents(pinv_armor.get(playername));
        p.updateInventory();
        p.setWalkSpeed(0.2F);
        p.setFoodLevel(20);
        p.setHealth(20D);
        p.removePotionEffect(PotionEffectType.JUMP);
        pli.getSpectatorManager().setSpectate(p,false);
      }
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str" + e.getMessage());
    }
    return;
  }
  final Player p=Bukkit.getPlayer(playername);
  Util.clearInv(p);
  p.setWalkSpeed(0.2F);
  p.setFoodLevel(20);
  p.setHealth(20D);
  p.setFireTicks(0);
  p.removePotionEffect(PotionEffectType.JUMP);
  pli.getSpectatorManager().setSpectate(p,false);
  for (  PotionEffect effect : p.getActivePotionEffects()) {
    if (effect != null) {
      p.removePotionEffect(effect.getType());
    }
  }
  for (  Entity e : p.getNearbyEntities(50D,50D,50D)) {
    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();
    }
  }
  pli.global_players.remove(playername);
  if (pli.global_arcade_spectator.containsKey(playername)) {
    pli.global_arcade_spectator.remove(playername);
  }
  Util.updateSign(plugin,this);
  final String arenaname=this.getInternalName();
  final Arena a=this;
  final boolean started_=started;
  Bukkit.getScheduler().runTaskLater(plugin,new Runnable(){
    public void run(){
      if (p != null) {
        if (ai == null || a.isArcadeMain()) {
          if (a.mainlobby != null) {
            Util.teleportPlayerFixed(p,a.mainlobby);
          }
 else           if (a.waitinglobby != null) {
            Util.teleportPlayerFixed(p,a.waitinglobby);
          }
        }
        p.setFireTicks(0);
        p.setFlying(false);
        if (!p.isOp()) {
          p.setAllowFlight(false);
        }
        if (pgamemode.containsKey(p.getName())) {
          p.setGameMode(pgamemode.get(p.getName()));
        }
        if (pxplvl.containsKey(p.getName())) {
          p.setLevel(0);
          p.setLevel(pxplvl.get(p.getName()));
        }
        p.getInventory().setContents(pinv.get(playername));
        p.getInventory().setArmorContents(pinv_armor.get(playername));
        p.updateInventory();
        if (started_) {
          if (!pnoreward.contains(playername)) {
            pli.getRewardsInstance().giveWinReward(playername,a,global_coin_multiplier);
          }
 else {
            pnoreward.remove(playername);
          }
        }
        if (pli.global_lost.containsKey(playername)) {
          pli.global_lost.remove(playername);
        }
        try {
          pli.scoreboardManager.removeScoreboard(arenaname,p);
        }
 catch (        Exception e) {
        }
      }
    }
  }
,5L);
  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(){
        BungeeUtil.connectToServer(MinigamesAPI.getAPI(),p.getName(),server);
      }
    }
,30L);
    return;
  }
}