nus-yam/ex-repair huggingface dataset:
Program: 33875
Project: 33875
Buggy source:
/** 
 * Adds perms or fly for player at loc
 * @param player
 * @param loc
 */
private void processPerms(Player player,Location loc){
  if (DEBUG)   plugin.getLogger().info("String_Node_Str" + loc);
  if (plugin.getGrid().locationIsOnIsland(player,loc)) {
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
      if (DEBUG)       plugin.getLogger().info("String_Node_Str");
      player.setAllowFlight(true);
      player.setFlying(true);
    }
    for (    String perm : Settings.temporaryPermissions) {
      if (!VaultHelper.checkPerm(player,perm)) {
        VaultHelper.addPerm(player,perm);
        List<String> perms=new ArrayList<String>();
        if (temporaryPerms.containsKey(player.getUniqueId()))         perms=temporaryPerms.get(player.getUniqueId());
        perms.add(perm);
        temporaryPerms.put(player.getUniqueId(),perms);
        if (DEBUG)         plugin.getLogger().info("String_Node_Str" + perm);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Adds perms or fly for player at loc
 * @param player
 * @param loc
 */
private void processPerms(final Player player,final Location loc){
  if (DEBUG)   plugin.getLogger().info("String_Node_Str" + loc);
  if (plugin.getGrid().locationIsOnIsland(player,loc)) {
    if (DEBUG)     plugin.getLogger().info("String_Node_Str" + player.getName());
    if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
      if (DEBUG)       plugin.getLogger().info("String_Node_Str");
      plugin.getServer().getScheduler().runTask(plugin,new Runnable(){
        @Override public void run(){
          player.setAllowFlight(true);
          player.setFlying(true);
        }
      }
);
    }
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    for (    String perm : Settings.temporaryPermissions) {
      if (!VaultHelper.checkPerm(player,perm)) {
        VaultHelper.addPerm(player,perm);
        List<String> perms=new ArrayList<String>();
        if (temporaryPerms.containsKey(player.getUniqueId()))         perms=temporaryPerms.get(player.getUniqueId());
        perms.add(perm);
        temporaryPerms.put(player.getUniqueId(),perms);
        if (DEBUG)         plugin.getLogger().info("String_Node_Str" + perm);
      }
 else {
        if (DEBUG)         plugin.getLogger().info("String_Node_Str" + perm);
      }
    }
  }
}
Program: 33876
Project: 33876
Buggy source:
/** 
 * Removes temporary perms when the player log out
 * @param e
 */
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerLeave(PlayerQuitEvent e){
  Player player=e.getPlayer();
  if (temporaryPerms.containsKey(player.getUniqueId())) {
    for (    String perm : temporaryPerms.get(player.getUniqueId())) {
      VaultHelper.removePerm(player,perm);
    }
    temporaryPerms.remove(player.getUniqueId());
  }
  player.setAllowFlight(false);
  player.setFlying(false);
}

Fixed version (ground truth):
/** 
 * Removes temporary perms when the player log out
 * @param e
 */
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerLeave(PlayerQuitEvent e){
  if (DEBUG)   plugin.getLogger().info("String_Node_Str");
  Player player=e.getPlayer();
  if (temporaryPerms.containsKey(player.getUniqueId())) {
    for (    String perm : temporaryPerms.get(player.getUniqueId())) {
      VaultHelper.removePerm(player,perm);
    }
    temporaryPerms.remove(player.getUniqueId());
  }
  player.setAllowFlight(false);
  player.setFlying(false);
}
Program: 33877
Project: 33877
Buggy source:
/** 
 * Gives temporary perms to players who are online when the server is reloaded or the plugin reloaded.
 */
public void giveAllTempPerms(){
  if (plugin.getGrid() == null) {
    return;
  }
  for (  Player player : plugin.getServer().getOnlinePlayers()) {
    if (plugin.getGrid().playerIsOnIsland(player)) {
      if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
        player.setAllowFlight(true);
        player.setFlying(true);
      }
      for (      String perm : Settings.temporaryPermissions) {
        if (!VaultHelper.checkPerm(player,perm)) {
          VaultHelper.addPerm(player,perm);
          List<String> perms=new ArrayList<String>();
          if (temporaryPerms.containsKey(player.getUniqueId()))           perms=temporaryPerms.get(player.getUniqueId());
          perms.add(perm);
          temporaryPerms.put(player.getUniqueId(),perms);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Gives temporary perms to players who are online when the server is reloaded or the plugin reloaded.
 */
public void giveAllTempPerms(){
  if (plugin.getGrid() == null) {
    return;
  }
  if (DEBUG)   plugin.getLogger().info("String_Node_Str");
  for (  Player player : plugin.getServer().getOnlinePlayers()) {
    if (plugin.getGrid().playerIsOnIsland(player)) {
      if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
        player.setAllowFlight(true);
        player.setFlying(true);
      }
      for (      String perm : Settings.temporaryPermissions) {
        if (!VaultHelper.checkPerm(player,perm)) {
          VaultHelper.addPerm(player,perm);
          List<String> perms=new ArrayList<String>();
          if (temporaryPerms.containsKey(player.getUniqueId()))           perms=temporaryPerms.get(player.getUniqueId());
          perms.add(perm);
          temporaryPerms.put(player.getUniqueId(),perms);
        }
      }
    }
  }
}
Program: 33878
Project: 33878
Buggy source:
/** 
 * Gives temporary perms Gives flymode if player has a specific permission and is on his island
 * @param e
 */
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerEnterOnIsland(IslandEnterEvent e){
  if (DEBUG)   plugin.getLogger().info("String_Node_Str");
  Player player=plugin.getServer().getPlayer(e.getPlayer());
  processPerms(player,e.getIslandLocation());
}

Fixed version (ground truth):
/** 
 * Gives temporary perms Gives flymode if player has a specific permission and is on his island
 * @param e
 */
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerEnterOnIsland(IslandEnterEvent e){
  if (DEBUG) {
    plugin.getLogger().info("String_Node_Str");
    plugin.getLogger().info("String_Node_Str" + e.getIslandLocation());
    if (e.getIslandOwner() != null) {
      plugin.getLogger().info("String_Node_Str" + plugin.getServer().getPlayer(e.getIslandOwner()).getName());
    }
 else {
      plugin.getLogger().info("String_Node_Str");
    }
  }
  Player player=plugin.getServer().getPlayer(e.getPlayer());
  processPerms(player,e.getIslandLocation());
}
Program: 33880
Project: 33880
Buggy source:
/** 
 * Revoke temporary perms Removes flymode with a delay if player leave his island.
 * @param e
 */
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerLeaveIsland(IslandExitEvent e){
  if (DEBUG)   plugin.getLogger().info("String_Node_Str");
  final Player player=plugin.getServer().getPlayer(e.getPlayer());
  if (!plugin.getGrid().locationIsOnIsland(player,e.getLocation())) {
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && player.isFlying() && player.getGameMode().equals(GameMode.SURVIVAL)) {
      if (DEBUG)       plugin.getLogger().info("String_Node_Str" + Settings.flyTimeOutside + "String_Node_Str");
      if (Settings.flyTimeOutside == 0) {
        player.setAllowFlight(false);
        player.setFlying(false);
        if (DEBUG)         plugin.getLogger().info("String_Node_Str");
      }
 else {
        plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin,new Runnable(){
          @Override public void run(){
            if (!plugin.getGrid().playerIsOnIsland(player) && player.isFlying()) {
              player.setAllowFlight(false);
              player.setFlying(false);
              if (DEBUG)               plugin.getLogger().info("String_Node_Str");
            }
          }
        }
,20 * Settings.flyTimeOutside);
      }
    }
    for (    String perm : Settings.temporaryPermissions) {
      if (temporaryPerms.containsKey(player.getUniqueId()) && VaultHelper.checkPerm(player,perm)) {
        VaultHelper.removePerm(player,perm);
        if (DEBUG)         plugin.getLogger().info("String_Node_Str" + perm);
        List<String> perms=temporaryPerms.get(player.getUniqueId());
        perms.remove(perm);
        if (perms.isEmpty())         temporaryPerms.remove(player.getUniqueId());
 else         temporaryPerms.put(player.getUniqueId(),perms);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Revoke temporary perms Removes flymode with a delay if player leave his island.
 * @param e
 */
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerLeaveIsland(IslandExitEvent e){
  if (DEBUG)   plugin.getLogger().info("String_Node_Str");
  final Player player=plugin.getServer().getPlayer(e.getPlayer());
  if (DEBUG) {
    plugin.getLogger().info("String_Node_Str" + e.getLocation());
    plugin.getLogger().info("String_Node_Str" + player.getLocation());
  }
  removeTempPerms(player,e.getIsland(),plugin.getGrid().getIslandAt(e.getLocation()));
}
Program: 33884
Project: 33884
Buggy source:
/** 
 * Gives temporary perms to players who are online when the server is reloaded or the plugin reloaded.
 */
public void giveAllTempPerms(){
  if (plugin.getGrid() == null) {
    return;
  }
  if (DEBUG)   plugin.getLogger().info("String_Node_Str");
  for (  Player player : plugin.getServer().getOnlinePlayers()) {
    if (plugin.getGrid().playerIsOnIsland(player)) {
      if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
        player.setAllowFlight(true);
        player.setFlying(true);
      }
      for (      String perm : Settings.temporaryPermissions) {
        if (!VaultHelper.checkPerm(player,perm)) {
          VaultHelper.addPerm(player,perm);
          List<String> perms=new ArrayList<String>();
          if (temporaryPerms.containsKey(player.getUniqueId()))           perms=temporaryPerms.get(player.getUniqueId());
          perms.add(perm);
          temporaryPerms.put(player.getUniqueId(),perms);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Gives temporary perms to players who are online when the server is reloaded or the plugin reloaded.
 */
public void giveAllTempPerms(){
  if (plugin.getGrid() == null) {
    return;
  }
  if (DEBUG)   plugin.getLogger().info("String_Node_Str");
  for (  Player player : plugin.getServer().getOnlinePlayers()) {
    if (!player.hasMetadata("String_Node_Str") && plugin.getGrid().playerIsOnIsland(player)) {
      if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
        player.setAllowFlight(true);
        player.setFlying(true);
      }
      for (      String perm : Settings.temporaryPermissions) {
        if (!VaultHelper.checkPerm(player,perm)) {
          VaultHelper.addPerm(player,perm);
          List<String> perms=new ArrayList<String>();
          if (temporaryPerms.containsKey(player.getUniqueId()))           perms=temporaryPerms.get(player.getUniqueId());
          perms.add(perm);
          temporaryPerms.put(player.getUniqueId(),perms);
        }
      }
    }
  }
}
Program: 33885
Project: 33885
Buggy source:
/** 
 * Loads a YAML file and if it does not exist it is looked for in the JAR
 * @param file
 * @return
 */
public static YamlConfiguration loadYamlFile(String file){
  File dataFolder=plugin.getDataFolder();
  File yamlFile=new File(dataFolder,file);
  YamlConfiguration config=null;
  if (yamlFile.exists()) {
    try {
      config=new YamlConfiguration();
      config.load(yamlFile);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else {
    config=new YamlConfiguration();
    plugin.getLogger().info("String_Node_Str" + file + "String_Node_Str");
    try {
      if (plugin.getResource(file) != null) {
        plugin.getLogger().info("String_Node_Str");
        plugin.saveResource(file,false);
        config=new YamlConfiguration();
        config.load(yamlFile);
      }
 else {
        config.save(yamlFile);
      }
    }
 catch (    Exception e) {
      plugin.getLogger().severe("String_Node_Str" + file + "String_Node_Str");
    }
  }
  return config;
}

Fixed version (ground truth):
/** 
 * Loads a YAML file and if it does not exist it is looked for in the JAR
 * @param file
 * @return
 */
public static YamlConfiguration loadYamlFile(String file){
  File dataFolder=plugin.getDataFolder();
  File yamlFile=new File(dataFolder,file);
  YamlConfiguration config=null;
  if (yamlFile.exists()) {
    try {
      config=new YamlConfiguration();
      config.load(yamlFile);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else {
    config=new YamlConfiguration();
    if (!file.startsWith("String_Node_Str")) {
      plugin.getLogger().info("String_Node_Str" + file + "String_Node_Str");
    }
    try {
      if (plugin.getResource(file) != null) {
        plugin.getLogger().info("String_Node_Str");
        plugin.saveResource(file,false);
        config=new YamlConfiguration();
        config.load(yamlFile);
      }
 else {
        config.save(yamlFile);
      }
    }
 catch (    Exception e) {
      plugin.getLogger().severe("String_Node_Str" + file + "String_Node_Str");
    }
  }
  return config;
}
Program: 33887
Project: 33887
Buggy source:
private void createToggleableItem(boolean flagValue,Material material,int durability,String name,UUID uuid){
  this.flagValue=flagValue;
  this.slot=-1;
  this.name=name;
  this.type=Type.TOGGLE;
  description.clear();
  item=new ItemStack(material);
  item.setDurability((short)durability);
  ItemMeta meta=item.getItemMeta();
  meta.setDisplayName(ChatColor.WHITE + name);
  if (flagValue) {
    if (uuid == null)     description.add(ChatColor.GREEN + ASkyBlock.getPlugin().myLocale().igsAllowed);
 else     description.add(ChatColor.GREEN + ASkyBlock.getPlugin().myLocale(uuid).igsAllowed);
  }
 else {
    if (uuid == null)     description.add(ChatColor.RED + ASkyBlock.getPlugin().myLocale().igsDisallowed);
 else     description.add(ChatColor.RED + ASkyBlock.getPlugin().myLocale(uuid).igsDisallowed);
  }
  meta.setLore(description);
  meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);
  meta.addItemFlags(ItemFlag.HIDE_DESTROYS);
  meta.addItemFlags(ItemFlag.HIDE_PLACED_ON);
  meta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
  item.setItemMeta(meta);
}

Fixed version (ground truth):
private void createToggleableItem(boolean flagValue,Material material,int durability,String name,UUID uuid){
  this.flagValue=flagValue;
  this.slot=-1;
  this.name=name;
  this.type=Type.TOGGLE;
  description.clear();
  item=new ItemStack(material);
  item.setDurability((short)durability);
  ItemMeta meta=item.getItemMeta();
  meta.setDisplayName(ChatColor.WHITE + name);
  if (flagValue) {
    if (uuid == null)     description.add(ChatColor.GREEN + ASkyBlock.getPlugin().myLocale().igsAllowed);
 else     description.add(ChatColor.GREEN + ASkyBlock.getPlugin().myLocale(uuid).igsAllowed);
  }
 else {
    if (uuid == null)     description.add(ChatColor.RED + ASkyBlock.getPlugin().myLocale().igsDisallowed);
 else     description.add(ChatColor.RED + ASkyBlock.getPlugin().myLocale(uuid).igsDisallowed);
  }
  meta.setLore(description);
  if (!Bukkit.getServer().getVersion().contains("String_Node_Str")) {
    meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);
    meta.addItemFlags(ItemFlag.HIDE_DESTROYS);
    meta.addItemFlags(ItemFlag.HIDE_PLACED_ON);
    meta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
  }
  item.setItemMeta(meta);
}
Program: 33888
Project: 33888
Buggy source:
/** 
 * Removes temporary perms when the player log out
 * @param e
 */
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerLeave(PlayerQuitEvent e){
  if (DEBUG)   plugin.getLogger().info("String_Node_Str");
  Player player=e.getPlayer();
  if (temporaryPerms.containsKey(player.getUniqueId())) {
    for (    String perm : temporaryPerms.get(player.getUniqueId())) {
      VaultHelper.removePerm(player,perm);
    }
    temporaryPerms.remove(player.getUniqueId());
  }
  player.setAllowFlight(false);
  player.setFlying(false);
}

Fixed version (ground truth):
/** 
 * Removes temporary perms when the player log out
 * @param e
 */
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerLeave(PlayerQuitEvent e){
  if (DEBUG)   plugin.getLogger().info("String_Node_Str");
  Player player=e.getPlayer();
  if (temporaryPerms.containsKey(player.getUniqueId())) {
    for (    String perm : temporaryPerms.get(player.getUniqueId())) {
      VaultHelper.removePerm(player,perm);
    }
    temporaryPerms.remove(player.getUniqueId());
  }
  if (player.getGameMode().equals(GameMode.SURVIVAL)) {
    player.setAllowFlight(false);
    player.setFlying(false);
  }
}
Program: 33889
Project: 33889
Buggy source:
@Override public void run(){
  if (!plugin.getGrid().playerIsOnIsland(player) && player.isFlying()) {
    player.setAllowFlight(false);
    player.setFlying(false);
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (!plugin.getGrid().playerIsOnIsland(player) && player.isFlying()) {
    if (player.getGameMode().equals(GameMode.SURVIVAL)) {
      player.setAllowFlight(false);
      player.setFlying(false);
      if (DEBUG)       plugin.getLogger().info("String_Node_Str");
    }
  }
}
Program: 33891
Project: 33891
Buggy source:
/** 
 * Display message to player in action bar (1.11+ or chat)
 * @param player
 * @param message
 */
private void sendEnterExit(Player player,String message){
  if (Settings.showInActionBar) {
    plugin.getServer().dispatchCommand(plugin.getServer().getConsoleSender(),"String_Node_Str" + player.getName() + "String_Node_Str"+ ChatColor.stripColor(message)+ "String_Node_Str");
  }
 else {
    Util.sendMessage(player,message);
  }
}

Fixed version (ground truth):
/** 
 * Display message to player in action bar (1.11+ or chat)
 * @param player
 * @param message
 */
private void sendEnterExit(Player player,String message){
  if (!Settings.showInActionBar || plugin.getServer().getVersion().contains("String_Node_Str") || plugin.getServer().getVersion().contains("String_Node_Str")|| plugin.getServer().getVersion().contains("String_Node_Str")|| plugin.getServer().getVersion().contains("String_Node_Str")) {
    Util.sendMessage(player,message);
  }
  plugin.getServer().dispatchCommand(plugin.getServer().getConsoleSender(),"String_Node_Str" + player.getName() + "String_Node_Str"+ ChatColor.stripColor(message)+ "String_Node_Str");
}
Program: 33894
Project: 33894
Buggy source:
/** 
 * Location of where the player exited the island
 * @return the location
 */
public Location getLocation(){
  return location;
}

Fixed version (ground truth):
/** 
 * Location of where the player exited the island's protected area
 * @return the location
 */
public Location getLocation(){
  return location;
}
Program: 33895
Project: 33895
Buggy source:
/** 
 * Display message to player in action bar (1.11+ or chat)
 * @param player
 * @param message
 */
private void sendEnterExit(Player player,String message){
  if (!Settings.showInActionBar || plugin.getServer().getVersion().contains("String_Node_Str") || plugin.getServer().getVersion().contains("String_Node_Str")|| plugin.getServer().getVersion().contains("String_Node_Str")|| plugin.getServer().getVersion().contains("String_Node_Str")) {
    Util.sendMessage(player,message);
  }
  plugin.getServer().dispatchCommand(plugin.getServer().getConsoleSender(),"String_Node_Str" + player.getName() + "String_Node_Str"+ ChatColor.stripColor(message)+ "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Display message to player in action bar (1.11+ or chat)
 * @param player
 * @param message
 */
private void sendEnterExit(Player player,String message){
  if (!Settings.showInActionBar || plugin.getServer().getVersion().contains("String_Node_Str") || plugin.getServer().getVersion().contains("String_Node_Str")|| plugin.getServer().getVersion().contains("String_Node_Str")|| plugin.getServer().getVersion().contains("String_Node_Str")) {
    Util.sendMessage(player,message);
    return;
  }
  plugin.getServer().dispatchCommand(plugin.getServer().getConsoleSender(),"String_Node_Str" + player.getName() + "String_Node_Str"+ ChatColor.stripColor(message)+ "String_Node_Str");
}
Program: 33897
Project: 33897
Buggy source:
private void processPerms(Player player){
  if (plugin.getGrid().playerIsOnIsland(player)) {
    if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
      player.setAllowFlight(true);
    }
    for (    String perm : Settings.temporaryPermissions) {
      if (!VaultHelper.checkPerm(player,perm)) {
        VaultHelper.addPerm(player,perm);
        List<String> perms=new ArrayList<String>();
        if (temporaryPerms.containsKey(player.getUniqueId()))         perms=temporaryPerms.get(player.getUniqueId());
        perms.add(perm);
        temporaryPerms.put(player.getUniqueId(),perms);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Adds perms or fly for player at loc
 * @param player
 * @param loc
 */
private void processPerms(Player player,Location loc){
  if (DEBUG)   plugin.getLogger().info("String_Node_Str" + loc);
  if (plugin.getGrid().locationIsOnIsland(player,loc)) {
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
      if (DEBUG)       plugin.getLogger().info("String_Node_Str");
      player.setAllowFlight(true);
      player.setFlying(true);
    }
    for (    String perm : Settings.temporaryPermissions) {
      if (!VaultHelper.checkPerm(player,perm)) {
        VaultHelper.addPerm(player,perm);
        List<String> perms=new ArrayList<String>();
        if (temporaryPerms.containsKey(player.getUniqueId()))         perms=temporaryPerms.get(player.getUniqueId());
        perms.add(perm);
        temporaryPerms.put(player.getUniqueId(),perms);
        if (DEBUG)         plugin.getLogger().info("String_Node_Str" + perm);
      }
    }
  }
}
Program: 33898
Project: 33898
Buggy source:
@Override public void run(){
  if (!plugin.getGrid().playerIsOnIsland(player) && player.isFlying()) {
    player.setAllowFlight(false);
    player.setFlying(false);
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (!plugin.getGrid().playerIsOnIsland(player) && player.isFlying()) {
    player.setAllowFlight(false);
    player.setFlying(false);
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
  }
}
Program: 33899
Project: 33899
Buggy source:
/** 
 * Gives temporary perms Gives flymode if player has a specific permission and is on his island
 * @param e
 */
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerEnterOnIsland(IslandEnterEvent e){
  Player player=plugin.getServer().getPlayer(e.getPlayer());
  processPerms(player);
}

Fixed version (ground truth):
/** 
 * Gives temporary perms Gives flymode if player has a specific permission and is on his island
 * @param e
 */
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerEnterOnIsland(IslandEnterEvent e){
  if (DEBUG)   plugin.getLogger().info("String_Node_Str");
  Player player=plugin.getServer().getPlayer(e.getPlayer());
  processPerms(player,e.getIslandLocation());
}
Program: 33900
Project: 33900
Buggy source:
/** 
 * Handle player joining
 * @param event
 */
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerJoin(final PlayerJoinEvent event){
  processPerms(event.getPlayer());
}

Fixed version (ground truth):
/** 
 * Handle player joining
 * @param event
 */
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerJoin(final PlayerJoinEvent event){
  processPerms(event.getPlayer(),event.getPlayer().getLocation());
}
Program: 33903
Project: 33903
Buggy source:
@EventHandler(priority=EventPriority.LOWEST,ignoreCancelled=true) public void onPlayerLeashHitch(final HangingPlaceEvent e){
  if (DEBUG) {
    plugin.getLogger().info(e.getEventName());
    plugin.getLogger().info("String_Node_Str" + e.getBlock().getType());
    plugin.getLogger().info("String_Node_Str" + e.getEntity().getType());
  }
  if (Settings.allowAutoActivator && e.getPlayer().getName().equals("String_Node_Str")) {
    return;
  }
  if (inWorld(e.getPlayer())) {
    if (e.getEntity() != null && e.getEntity().getType().equals(EntityType.LEASH_HITCH)) {
      if (actionAllowed(e.getPlayer(),e.getBlock().getLocation(),SettingsFlag.LEASH)) {
        Util.sendMessage(e.getPlayer(),ChatColor.RED + plugin.myLocale(e.getPlayer().getUniqueId()).islandProtected);
        e.setCancelled(true);
        return;
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.LOWEST,ignoreCancelled=true) public void onPlayerLeashHitch(final HangingPlaceEvent e){
  if (DEBUG) {
    plugin.getLogger().info(e.getEventName());
    plugin.getLogger().info("String_Node_Str" + e.getBlock().getType());
    plugin.getLogger().info("String_Node_Str" + e.getEntity().getType());
  }
  if (Settings.allowAutoActivator && e.getPlayer().getName().equals("String_Node_Str")) {
    return;
  }
  if (inWorld(e.getPlayer())) {
    if (e.getEntity() != null && e.getEntity().getType().equals(EntityType.LEASH_HITCH)) {
      if (!actionAllowed(e.getPlayer(),e.getBlock().getLocation(),SettingsFlag.LEASH)) {
        Util.sendMessage(e.getPlayer(),ChatColor.RED + plugin.myLocale(e.getPlayer().getUniqueId()).islandProtected);
        e.setCancelled(true);
        return;
      }
    }
  }
}
Program: 33905
Project: 33905
Buggy source:
public void run(){
  try {
    islandYaml.save(islandFile);
  }
 catch (  Exception e) {
    plugin.getLogger().severe("String_Node_Str" + ISLANDS_FILENAME + "String_Node_Str");
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void run(){
  try {
    islandYaml.save(islandFile);
  }
 catch (  Exception e) {
    plugin.getLogger().severe("String_Node_Str" + ISLANDS_FILENAME + "String_Node_Str");
  }
}
Program: 33909
Project: 33909
Buggy source:
/** 
 * Sets the settings for the island. If the island is spawn, then default spawn settings will be used
 * @param settings
 * @param settingsKey
 */
public void setSettings(String settings,List<String> settingsKey){
  if (isSpawn) {
    setSpawnDefaults();
  }
 else {
    setIgsDefaults();
  }
  if (settings == null || settings.isEmpty())   return;
  if (settingsKey.isEmpty() && settings.length() == LegacySettingsFlag.values().length) {
    int index=0;
    for (    LegacySettingsFlag f : LegacySettingsFlag.values()) {
      if (settings.length() == index) {
        break;
      }
      SettingsFlag flag=SettingsFlag.valueOf(f.name());
      if (Settings.visitorSettings.containsKey(flag)) {
        this.igs.put(flag,settings.charAt(index++) == '1' ? true : false);
      }
    }
  }
 else {
    if (!settingsKey.isEmpty()) {
      int index=0;
      for (      String f : settingsKey) {
        try {
          SettingsFlag flag=SettingsFlag.valueOf(f);
          if (Settings.visitorSettings.containsKey(flag)) {
            this.igs.put(flag,settings.charAt(index++) == '1' ? true : false);
          }
        }
 catch (        Exception e) {
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Sets the settings for the island.
 * @param settings
 * @param settingsKey
 */
public void setSettings(String settings,List<String> settingsKey){
  if (isSpawn) {
    setSpawnDefaults();
  }
 else {
    setIgsDefaults();
  }
  if (settings == null || settings.isEmpty())   return;
  if (settingsKey.size() != settings.length()) {
    plugin.getLogger().severe("String_Node_Str");
    return;
  }
  for (int i=0; i < settingsKey.size(); i++) {
    if (settings.charAt(i) == '0') {
      this.setIgsFlag(SettingsFlag.valueOf(settingsKey.get(i)),false);
    }
 else {
      this.setIgsFlag(SettingsFlag.valueOf(settingsKey.get(i)),true);
    }
  }
}
Program: 33911
Project: 33911
Buggy source:
/** 
 * Removes temporary perms when the player log out
 * @param e
 */
@EventHandler public void onPlayerLeave(PlayerQuitEvent e){
  Player player=e.getPlayer();
  if (temporaryPerms.containsKey(player.getUniqueId())) {
    for (    String perm : temporaryPerms.get(player.getUniqueId())) {
      VaultHelper.removePerm(player,perm);
    }
    temporaryPerms.remove(player.getUniqueId());
  }
}

Fixed version (ground truth):
/** 
 * Removes temporary perms when the player log out
 * @param e
 */
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerLeave(PlayerQuitEvent e){
  Player player=e.getPlayer();
  if (temporaryPerms.containsKey(player.getUniqueId())) {
    for (    String perm : temporaryPerms.get(player.getUniqueId())) {
      VaultHelper.removePerm(player,perm);
    }
    temporaryPerms.remove(player.getUniqueId());
  }
  player.setAllowFlight(false);
  player.setFlying(false);
}
Program: 33912
Project: 33912
Buggy source:
/** 
 * Gives temporary perms Gives flymode if player has a specific permission and is on his island
 * @param e
 */
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerEnterOnIsland(IslandEnterEvent e){
  Player player=plugin.getServer().getPlayer(e.getPlayer());
  if (plugin.getGrid().playerIsOnIsland(player)) {
    if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str")) {
      player.setAllowFlight(true);
      player.setFlying(true);
    }
    for (    String perm : Settings.temporaryPermissions) {
      if (!VaultHelper.checkPerm(player,perm)) {
        VaultHelper.addPerm(player,perm);
        List<String> perms=new ArrayList<String>();
        if (temporaryPerms.containsKey(player.getUniqueId()))         perms=temporaryPerms.get(player.getUniqueId());
        perms.add(perm);
        temporaryPerms.put(player.getUniqueId(),perms);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Gives temporary perms Gives flymode if player has a specific permission and is on his island
 * @param e
 */
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerEnterOnIsland(IslandEnterEvent e){
  Player player=plugin.getServer().getPlayer(e.getPlayer());
  processPerms(player);
}
Program: 33914
Project: 33914
Buggy source:
/** 
 * Reloads the challenge config file
 */
public void reloadChallengeConfig(){
  if (challengeConfigFile == null) {
    challengeConfigFile=new File(plugin.getDataFolder(),"String_Node_Str");
  }
  challengeFile=YamlConfiguration.loadConfiguration(challengeConfigFile);
  Settings.challengeList=getChallengeConfig().getConfigurationSection("String_Node_Str").getKeys(false);
  Settings.challengeLevels=Arrays.asList(getChallengeConfig().getString("String_Node_Str","String_Node_Str").split("String_Node_Str"));
  Settings.freeLevels=Arrays.asList(getChallengeConfig().getString("String_Node_Str","String_Node_Str").split("String_Node_Str"));
  Settings.waiverAmount=getChallengeConfig().getInt("String_Node_Str",1);
  if (Settings.waiverAmount < 0) {
    Settings.waiverAmount=0;
  }
  populateChallengeList();
}

Fixed version (ground truth):
/** 
 * Reloads the challenge config file
 */
public void reloadChallengeConfig(){
  if (challengeConfigFile == null) {
    challengeConfigFile=new File(plugin.getDataFolder(),"String_Node_Str");
  }
  challengeFile=YamlConfiguration.loadConfiguration(challengeConfigFile);
  Settings.challengeList=getChallengeConfig().getConfigurationSection("String_Node_Str").getKeys(false);
  if (getChallengeConfig().getString("String_Node_Str","String_Node_Str").isEmpty()) {
    Settings.challengeLevels=new ArrayList<String>();
  }
 else {
    Settings.challengeLevels=Arrays.asList(getChallengeConfig().getString("String_Node_Str","String_Node_Str").split("String_Node_Str"));
  }
  Settings.freeLevels=Arrays.asList(getChallengeConfig().getString("String_Node_Str","String_Node_Str").split("String_Node_Str"));
  Settings.waiverAmount=getChallengeConfig().getInt("String_Node_Str",1);
  if (Settings.waiverAmount < 0) {
    Settings.waiverAmount=0;
  }
  populateChallengeList();
}
Program: 33915
Project: 33915
Buggy source:
/** 
 * @param flagValue
 * @param material
 * @param durability
 * @param name
 */
public IPItem(boolean flagValue,Material material,int durability,String name){
  createToggleableItem(flagValue,material,durability,name);
}

Fixed version (ground truth):
public IPItem(Boolean boolean1,Material material,String name,UUID uuid){
  createToggleableItem(flagValue,material,0,name,uuid);
}
Program: 33916
Project: 33916
Buggy source:
private void createToggleableItem(boolean flagValue,Material material,int durability,String name){
  this.flagValue=flagValue;
  this.slot=-1;
  this.name=name;
  this.type=Type.TOGGLE;
  description.clear();
  item=new ItemStack(material);
  item.setDurability((short)durability);
  ItemMeta meta=item.getItemMeta();
  meta.setDisplayName(ChatColor.WHITE + name);
  if (flagValue) {
    description.add(ChatColor.GREEN + ASkyBlock.getPlugin().myLocale().igsAllowed);
  }
 else {
    description.add(ChatColor.RED + ASkyBlock.getPlugin().myLocale().igsDisallowed);
  }
  meta.setLore(description);
  item.setItemMeta(meta);
}

Fixed version (ground truth):
private void createToggleableItem(boolean flagValue,Material material,int durability,String name,UUID uuid){
  this.flagValue=flagValue;
  this.slot=-1;
  this.name=name;
  this.type=Type.TOGGLE;
  description.clear();
  item=new ItemStack(material);
  item.setDurability((short)durability);
  ItemMeta meta=item.getItemMeta();
  meta.setDisplayName(ChatColor.WHITE + name);
  if (flagValue) {
    if (uuid == null)     description.add(ChatColor.GREEN + ASkyBlock.getPlugin().myLocale().igsAllowed);
 else     description.add(ChatColor.GREEN + ASkyBlock.getPlugin().myLocale(uuid).igsAllowed);
  }
 else {
    if (uuid == null)     description.add(ChatColor.RED + ASkyBlock.getPlugin().myLocale().igsDisallowed);
 else     description.add(ChatColor.RED + ASkyBlock.getPlugin().myLocale(uuid).igsDisallowed);
  }
  meta.setLore(description);
  item.setItemMeta(meta);
}
Program: 33919
Project: 33919
Buggy source:
/** 
 * Calculates the island level. Only the fast calc is supported. The island calculation runs async and fires an IslandLevelEvent when completed or use getIslandLevel(playerUUID). See https://gist.github.com/tastybento/e81d2403c03f2fe26642 for example code.
 * @param playerUUID
 * @return true if player has an island, false if not
 */
public boolean calculateIslandLevel(UUID playerUUID){
  if (plugin.getPlayers().inTeam(playerUUID) && !plugin.getPlayers().hasIsland(playerUUID)) {
    new LevelCalcByChunk(plugin,playerUUID,null,false);
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Calculates the island level. Only the fast calc is supported. The island calculation runs async and fires an IslandLevelEvent when completed or use getIslandLevel(playerUUID). See https://gist.github.com/tastybento/e81d2403c03f2fe26642 for example code.
 * @param playerUUID
 * @return true if player has an island, false if not
 */
public boolean calculateIslandLevel(UUID playerUUID){
  if (plugin.getPlayers().hasIsland(playerUUID) || plugin.getPlayers().inTeam(playerUUID)) {
    new LevelCalcByChunk(plugin,playerUUID,null,false);
    return true;
  }
  return false;
}
Program: 33925
Project: 33925
Buggy source:
private boolean checkModPerms(Player player2,String[] split){
  if (player2.isOp()) {
    return true;
  }
  String check=split[0];
  if (check.contains("String_Node_Str".toLowerCase())) {
    check="String_Node_Str";
  }
  if (VaultHelper.checkPerm(player2,Settings.PERMPREFIX + "String_Node_Str" + split[0].toLowerCase())) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean checkModPerms(Player player2,String[] split){
  if (player2.isOp()) {
    return true;
  }
  String check=split[0];
  if (check.contains("String_Node_Str".toLowerCase())) {
    check="String_Node_Str";
  }
  if (VaultHelper.checkPerm(player2,Settings.PERMPREFIX + "String_Node_Str" + check.toLowerCase())) {
    return true;
  }
  return false;
}
Program: 33926
Project: 33926
Buggy source:
private boolean checkAdminPerms(Player player2,String[] split){
  if (player2.isOp()) {
    return true;
  }
  String check=split[0];
  if (check.equalsIgnoreCase("String_Node_Str"))   check="String_Node_Str";
  if (VaultHelper.checkPerm(player2,Settings.PERMPREFIX + "String_Node_Str" + split[0].toLowerCase())) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean checkAdminPerms(Player player2,String[] split){
  if (player2.isOp()) {
    return true;
  }
  String check=split[0];
  if (check.equalsIgnoreCase("String_Node_Str"))   check="String_Node_Str";
  if (VaultHelper.checkPerm(player2,Settings.PERMPREFIX + "String_Node_Str" + check.toLowerCase())) {
    return true;
  }
  return false;
}
Program: 33930
Project: 33930
Buggy source:
@Override public boolean accept(File dir,String name){
  String lowercaseName=name.toLowerCase();
  if (lowercaseName.endsWith("String_Node_Str")) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean accept(File dir,String name){
  String lowercaseName=name.toLowerCase();
  if (lowercaseName.endsWith("String_Node_Str") && name.length() == 9 && name.substring(2,3).equals("String_Node_Str")) {
    return true;
  }
 else {
    if (lowercaseName.endsWith("String_Node_Str") && !lowercaseName.equals("String_Node_Str")) {
      plugin.getLogger().severe("String_Node_Str" + name + "String_Node_Str");
    }
    return false;
  }
}
Program: 33931
Project: 33931
Buggy source:
/** 
 * Resets the island protection settings to their default as set in config.yml
 */
public void setDefaults(){
  for (  Flags flag : Flags.values()) {
    this.igs.put(flag,Settings.defaultIslandSettings.get(flag));
  }
}

Fixed version (ground truth):
/** 
 * Resets the island protection settings to their default as set in config.yml
 */
public void setDefaults(){
  for (  Flags flag : Flags.values()) {
    if (Settings.defaultIslandSettings.get(flag) == null) {
      this.igs.put(flag,false);
    }
 else {
      this.igs.put(flag,Settings.defaultIslandSettings.get(flag));
    }
  }
}
Program: 33935
Project: 33935
Buggy source:
/** 
 * Prevents visitors from using commands on islands, like /spawner
 * @param e
 */
@EventHandler(priority=EventPriority.HIGHEST,ignoreCancelled=false) public void onVisitorCommand(final PlayerCommandPreprocessEvent e){
  if (DEBUG) {
    plugin.getLogger().info("String_Node_Str" + e.getEventName() + "String_Node_Str"+ e.getMessage());
  }
  if (!IslandGuard.inWorld(e.getPlayer()) || e.getPlayer().isOp() || VaultHelper.checkPerm(e.getPlayer(),Settings.PERMPREFIX + "String_Node_Str")|| plugin.getGrid().locationIsOnIsland(e.getPlayer(),e.getPlayer().getLocation())) {
    return;
  }
  String[] args=e.getMessage().substring(1).toLowerCase().split("String_Node_Str");
  if (Settings.visitorCommandBlockList.contains(args[0])) {
    e.getPlayer().sendMessage(ChatColor.RED + plugin.myLocale(e.getPlayer().getUniqueId()).islandProtected);
    e.setCancelled(true);
  }
}

Fixed version (ground truth):
/** 
 * Prevents visitors from using commands on islands, like /spawner
 * @param e
 */
@EventHandler(priority=EventPriority.HIGHEST,ignoreCancelled=true) public void onVisitorCommand(final PlayerCommandPreprocessEvent e){
  if (DEBUG) {
    plugin.getLogger().info("String_Node_Str" + e.getEventName() + "String_Node_Str"+ e.getMessage());
  }
  if (!IslandGuard.inWorld(e.getPlayer()) || e.getPlayer().isOp() || VaultHelper.checkPerm(e.getPlayer(),Settings.PERMPREFIX + "String_Node_Str")|| plugin.getGrid().locationIsOnIsland(e.getPlayer(),e.getPlayer().getLocation())) {
    return;
  }
  String[] args=e.getMessage().substring(1).toLowerCase().split("String_Node_Str");
  if (Settings.visitorCommandBlockList.contains(args[0])) {
    e.getPlayer().sendMessage(ChatColor.RED + plugin.myLocale(e.getPlayer().getUniqueId()).islandProtected);
    e.setCancelled(true);
  }
}
Program: 33936
Project: 33936
Buggy source:
/** 
 * Prevents visitors from getting damage if invinciblevisitors option is set to TRUE
 * @param e
 */
@EventHandler(priority=EventPriority.HIGHEST,ignoreCancelled=false) public void onVisitorGetDamage(EntityDamageEvent e){
  if (!Settings.invincibleVisitors)   return;
  if (!(e.getEntity() instanceof Player))   return;
  Player p=(Player)e.getEntity();
  if (!IslandGuard.inWorld(p) || plugin.getGrid().locationIsOnIsland(p,p.getLocation()))   return;
  if (Settings.visitorDamagePrevention.contains(e.getCause()))   e.setCancelled(true);
 else   if (e.getCause().equals(DamageCause.VOID)) {
    if (plugin.getPlayers().hasIsland(p.getUniqueId())) {
      Location safePlace=plugin.getGrid().getSafeHomeLocation(p.getUniqueId(),1);
      if (safePlace != null) {
        p.teleport(safePlace);
        p.setFallDistance(0);
        e.setCancelled(true);
        return;
      }
    }
    if (plugin.getGrid().getSpawnPoint() != null) {
      p.teleport(plugin.getGrid().getSpawnPoint());
      p.setFallDistance(0);
      e.setCancelled(true);
      return;
    }
    if (!p.performCommand("String_Node_Str")) {
      return;
    }
    p.setFallDistance(0);
    e.setCancelled(true);
  }
}

Fixed version (ground truth):
/** 
 * Prevents visitors from getting damage if invinciblevisitors option is set to TRUE
 * @param e
 */
@EventHandler(priority=EventPriority.HIGHEST,ignoreCancelled=true) public void onVisitorGetDamage(EntityDamageEvent e){
  if (!Settings.invincibleVisitors)   return;
  if (!(e.getEntity() instanceof Player))   return;
  Player p=(Player)e.getEntity();
  if (!IslandGuard.inWorld(p) || plugin.getGrid().locationIsOnIsland(p,p.getLocation()))   return;
  if (Settings.visitorDamagePrevention.contains(e.getCause()))   e.setCancelled(true);
 else   if (e.getCause().equals(DamageCause.VOID)) {
    if (plugin.getPlayers().hasIsland(p.getUniqueId())) {
      Location safePlace=plugin.getGrid().getSafeHomeLocation(p.getUniqueId(),1);
      if (safePlace != null) {
        p.teleport(safePlace);
        p.setFallDistance(0);
        e.setCancelled(true);
        return;
      }
    }
    if (plugin.getGrid().getSpawnPoint() != null) {
      p.teleport(plugin.getGrid().getSpawnPoint());
      p.setFallDistance(0);
      e.setCancelled(true);
      return;
    }
    if (!p.performCommand("String_Node_Str")) {
      return;
    }
    p.setFallDistance(0);
    e.setCancelled(true);
  }
}
Program: 33937
Project: 33937
Buggy source:
@Override public void run(){
  if (!plugin.getGrid().playerIsOnIsland(p) && p.isFlying()) {
    p.setAllowFlight(false);
    p.setFlying(false);
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (!plugin.getGrid().playerIsOnIsland(player) && player.isFlying()) {
    player.setAllowFlight(false);
    player.setFlying(false);
  }
}
Program: 33938
Project: 33938
Buggy source:
/** 
 * Gives flymode if player has a specific permission and is on his island
 * @param e
 */
@EventHandler public void onPlayerEnterOnIsland(IslandEnterEvent e){
  Player p=Bukkit.getServer().getPlayer(e.getPlayer());
  if (p.hasPermission("String_Node_Str") && plugin.getGrid().playerIsOnIsland(p)) {
    p.setAllowFlight(true);
    p.setFlying(true);
  }
}

Fixed version (ground truth):
/** 
 * Gives flymode if player has a specific permission and is on his island
 * @param e
 */
@EventHandler(priority=EventPriority.NORMAL,ignoreCancelled=true) public void onPlayerEnterOnIsland(IslandEnterEvent e){
  Player player=plugin.getServer().getPlayer(e.getPlayer());
  if (VaultHelper.checkPerm(player,Settings.PERMPREFIX + "String_Node_Str") && plugin.getGrid().playerIsOnIsland(player)) {
    player.setAllowFlight(true);
    player.setFlying(true);
  }
}
Program: 33939
Project: 33939
Buggy source:
/** 
 * Places player back on their island if the setting is true
 * @param e
 */
@EventHandler(priority=EventPriority.HIGHEST,ignoreCancelled=false) public void onPlayerRespawn(final PlayerRespawnEvent e){
  if (DEBUG) {
    plugin.getLogger().info(e.getEventName());
  }
  if (!Settings.respawnOnIsland) {
    return;
  }
  if (respawn.contains(e.getPlayer().getUniqueId())) {
    respawn.remove(e.getPlayer().getUniqueId());
    Location respawnLocation=plugin.getGrid().getSafeHomeLocation(e.getPlayer().getUniqueId(),1);
    if (respawnLocation != null) {
      e.setRespawnLocation(respawnLocation);
    }
  }
}

Fixed version (ground truth):
/** 
 * Places player back on their island if the setting is true
 * @param e
 */
@EventHandler(priority=EventPriority.HIGHEST,ignoreCancelled=true) public void onPlayerRespawn(final PlayerRespawnEvent e){
  if (DEBUG) {
    plugin.getLogger().info(e.getEventName());
  }
  if (!Settings.respawnOnIsland) {
    return;
  }
  if (respawn.contains(e.getPlayer().getUniqueId())) {
    respawn.remove(e.getPlayer().getUniqueId());
    Location respawnLocation=plugin.getGrid().getSafeHomeLocation(e.getPlayer().getUniqueId(),1);
    if (respawnLocation != null) {
      e.setRespawnLocation(respawnLocation);
    }
  }
}
Program: 33940
Project: 33940
Buggy source:
/** 
 * Registers death of player. Places the player on the island respawn list if set
 * @param e
 */
@EventHandler(priority=EventPriority.LOW,ignoreCancelled=false) public void onPlayerDeath(final PlayerDeathEvent e){
  if (DEBUG) {
    plugin.getLogger().info(e.getEventName());
  }
  if (!IslandGuard.inWorld(e.getEntity())) {
    return;
  }
  UUID playerUUID=e.getEntity().getUniqueId();
  if (plugin.getPlayers().hasIsland(playerUUID) || plugin.getPlayers().inTeam(playerUUID)) {
    if (Settings.respawnOnIsland) {
      respawn.add(playerUUID);
    }
    plugin.getPlayers().addDeath(playerUUID);
    if (Settings.deathpenalty != 0) {
      if (plugin.getPlayers().inTeam(playerUUID)) {
        plugin.getMessages().tellOfflineTeam(playerUUID,ChatColor.GREEN + "String_Node_Str" + String.valueOf(plugin.getPlayers().getDeaths(playerUUID))+ "String_Node_Str"+ plugin.myLocale(playerUUID).deathsDied+ "String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Registers death of player. Places the player on the island respawn list if set
 * @param e
 */
@EventHandler(priority=EventPriority.LOW,ignoreCancelled=true) public void onPlayerDeath(final PlayerDeathEvent e){
  if (DEBUG) {
    plugin.getLogger().info(e.getEventName());
  }
  if (!IslandGuard.inWorld(e.getEntity())) {
    return;
  }
  UUID playerUUID=e.getEntity().getUniqueId();
  if (plugin.getPlayers().hasIsland(playerUUID) || plugin.getPlayers().inTeam(playerUUID)) {
    if (Settings.respawnOnIsland) {
      respawn.add(playerUUID);
    }
    plugin.getPlayers().addDeath(playerUUID);
    if (Settings.deathpenalty != 0) {
      if (plugin.getPlayers().inTeam(playerUUID)) {
        plugin.getMessages().tellOfflineTeam(playerUUID,ChatColor.GREEN + "String_Node_Str" + String.valueOf(plugin.getPlayers().getDeaths(playerUUID))+ "String_Node_Str"+ plugin.myLocale(playerUUID).deathsDied+ "String_Node_Str");
      }
    }
  }
}