Program: 33858
Project: 33858
Buggy source:
/** 
 * This method protects players from PVP if it is not allowed and from arrows fired by other players
 * @param e
 */
@EventHandler(priority=EventPriority.LOW,ignoreCancelled=true) public void onEntityDamage(final EntityDamageByEntityEvent e){
  if (DEBUG) {
    plugin.getLogger().info(e.getEventName());
    plugin.getLogger().info("String_Node_Str" + e.getDamager().toString());
    plugin.getLogger().info("String_Node_Str" + e.getEntityType());
    plugin.getLogger().info("String_Node_Str" + e.getEntity());
  }
  if (!inWorld(e.getEntity())) {
    return;
  }
  Island island=plugin.getGrid().getProtectedIslandAt(e.getEntity().getLocation());
  boolean inNether=false;
  if (e.getEntity().getWorld().equals(ASkyBlock.getNetherWorld())) {
    inNether=true;
  }
  if (!Settings.allowTNTDamage && (e.getDamager().getType().equals(EntityType.PRIMED_TNT) || e.getDamager().getType().equals(EntityType.FIREWORK) || e.getDamager().getType().equals(EntityType.FIREBALL))) {
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    e.setCancelled(true);
    return;
  }
  if (island != null && island.isSpawn() && e.getDamager().getType().equals(EntityType.CREEPER) && island.getIgsFlag(SettingsFlag.CREEPER_PAIN)) {
    return;
  }
  if (!Settings.allowCreeperDamage && e.getDamager().getType().equals(EntityType.CREEPER) && !(e.getEntity() instanceof Player)) {
    e.setCancelled(true);
    return;
  }
  if (!Settings.allowCreeperGriefing && e.getDamager().getType().equals(EntityType.CREEPER)) {
    Creeper creeper=(Creeper)e.getDamager();
    if (creeper.getTarget() instanceof Player) {
      Player target=(Player)creeper.getTarget();
      if (!plugin.getGrid().locationIsOnIsland(target,e.getEntity().getLocation())) {
        e.setCancelled(true);
        return;
      }
    }
    if (litCreeper.contains(creeper.getUniqueId())) {
      if (DEBUG) {
        plugin.getLogger().info("String_Node_Str");
      }
      e.setCancelled(true);
      return;
    }
  }
  if (e.getDamager() instanceof Player) {
    Player p=(Player)e.getDamager();
    if (p.isOp() || VaultHelper.checkPerm(p,Settings.PERMPREFIX + "String_Node_Str")) {
      return;
    }
  }
  boolean flamingArrow=false;
  boolean projectile=false;
  Player attacker=null;
  if (e.getDamager() instanceof Player) {
    attacker=(Player)e.getDamager();
  }
 else   if (e.getDamager() instanceof Projectile) {
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    projectile=true;
    Projectile p=(Projectile)e.getDamager();
    if (DEBUG)     plugin.getLogger().info("String_Node_Str" + p.getShooter().toString());
    if (p.getShooter() instanceof Player) {
      attacker=(Player)p.getShooter();
      if (p.getFireTicks() > 0) {
        flamingArrow=true;
      }
      if (DEBUG)       plugin.getLogger().info("String_Node_Str" + p.getFireTicks() + "String_Node_Str"+ p.getMaxFireTicks());
    }
  }
  if (attacker == null) {
    return;
  }
  if (e.getEntity() instanceof Player && attacker.equals((Player)e.getEntity())) {
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    return;
  }
  if (DEBUG)   plugin.getLogger().info("String_Node_Str");
  if (e.getEntity() instanceof ItemFrame || e.getEntityType().toString().endsWith("String_Node_Str")) {
    if (island != null && (island.getIgsFlag(SettingsFlag.BREAK_BLOCKS) || island.getMembers().contains(attacker.getUniqueId()))) {
      return;
    }
    Util.sendMessage(attacker,ChatColor.RED + plugin.myLocale(attacker.getUniqueId()).islandProtected);
    if (flamingArrow)     e.getEntity().setFireTicks(0);
    if (projectile)     e.getDamager().remove();
    e.setCancelled(true);
    return;
  }
  if (e.getEntity() instanceof Monster || e.getEntity() instanceof Slime || e.getEntity() instanceof Squid) {
    if (island != null && island.getMembers().contains(attacker.getUniqueId())) {
      return;
    }
    if (actionAllowed(attacker,e.getEntity().getLocation(),SettingsFlag.HURT_MONSTERS)) {
      if (!Settings.allowCreeperGriefing && e.getEntity() instanceof Creeper) {
        ItemStack holding=attacker.getItemInHand();
        if (holding != null && holding.getType().equals(Material.FLINT_AND_STEEL)) {
          litCreeper.add(e.getEntity().getUniqueId());
          if (DEBUG) {
            plugin.getLogger().info("String_Node_Str");
          }
        }
      }
      return;
    }
    Util.sendMessage(attacker,ChatColor.RED + plugin.myLocale(attacker.getUniqueId()).islandProtected);
    if (flamingArrow)     e.getEntity().setFireTicks(0);
    if (projectile)     e.getDamager().remove();
    e.setCancelled(true);
    return;
  }
  if (e.getEntity() instanceof Animals || e.getEntity() instanceof IronGolem || e.getEntity() instanceof Snowman|| e.getEntity() instanceof Villager) {
    if (island != null && (island.getIgsFlag(SettingsFlag.HURT_MOBS) || island.getMembers().contains(attacker.getUniqueId()))) {
      return;
    }
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    Util.sendMessage(attacker,ChatColor.RED + plugin.myLocale(attacker.getUniqueId()).islandProtected);
    if (flamingArrow)     e.getEntity().setFireTicks(0);
    if (projectile)     e.getDamager().remove();
    e.setCancelled(true);
    return;
  }
  boolean pvp=false;
  if ((inNether && island != null && island.getIgsFlag(SettingsFlag.NETHER_PVP) || (!inNether && island != null && island.getIgsFlag(SettingsFlag.PVP)))) {
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    pvp=true;
  }
  if (e.getEntity() instanceof Player) {
    if (pvp) {
      return;
    }
 else {
      Util.sendMessage(attacker,ChatColor.RED + plugin.myLocale(attacker.getUniqueId()).targetInNoPVPArea);
      if (flamingArrow)       e.getEntity().setFireTicks(0);
      if (projectile)       e.getDamager().remove();
      e.setCancelled(true);
      return;
    }
  }
}

Fixed version (ground truth):
/** 
 * This method protects players from PVP if it is not allowed and from arrows fired by other players
 * @param e
 */
@EventHandler(priority=EventPriority.LOW,ignoreCancelled=true) public void onEntityDamage(final EntityDamageByEntityEvent e){
  if (DEBUG) {
    plugin.getLogger().info(e.getEventName());
    plugin.getLogger().info("String_Node_Str" + e.getDamager().toString());
    plugin.getLogger().info("String_Node_Str" + e.getEntityType());
    plugin.getLogger().info("String_Node_Str" + e.getEntity());
  }
  if (!inWorld(e.getEntity())) {
    return;
  }
  Island island=plugin.getGrid().getProtectedIslandAt(e.getEntity().getLocation());
  boolean inNether=false;
  if (e.getEntity().getWorld().equals(ASkyBlock.getNetherWorld())) {
    inNether=true;
  }
  if (!Settings.allowTNTDamage && (e.getDamager().getType().equals(EntityType.PRIMED_TNT) || e.getDamager().getType().equals(EntityType.FIREWORK) || e.getDamager().getType().equals(EntityType.FIREBALL))) {
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    e.setCancelled(true);
    return;
  }
  if (island != null && island.isSpawn() && e.getDamager().getType().equals(EntityType.CREEPER) && island.getIgsFlag(SettingsFlag.CREEPER_PAIN)) {
    return;
  }
  if (!Settings.allowCreeperDamage && e.getDamager().getType().equals(EntityType.CREEPER) && !(e.getEntity() instanceof Player)) {
    e.setCancelled(true);
    return;
  }
  if (!Settings.allowCreeperGriefing && e.getDamager().getType().equals(EntityType.CREEPER)) {
    Creeper creeper=(Creeper)e.getDamager();
    if (creeper.getTarget() instanceof Player) {
      Player target=(Player)creeper.getTarget();
      if (!plugin.getGrid().locationIsOnIsland(target,e.getEntity().getLocation())) {
        e.setCancelled(true);
        return;
      }
    }
    if (litCreeper.contains(creeper.getUniqueId())) {
      if (DEBUG) {
        plugin.getLogger().info("String_Node_Str");
      }
      e.setCancelled(true);
      return;
    }
  }
  if (e.getDamager() instanceof Player) {
    Player p=(Player)e.getDamager();
    if (p.isOp() || VaultHelper.checkPerm(p,Settings.PERMPREFIX + "String_Node_Str")) {
      return;
    }
  }
  boolean flamingArrow=false;
  boolean projectile=false;
  Player attacker=null;
  if (e.getDamager() instanceof Player) {
    attacker=(Player)e.getDamager();
  }
 else   if (e.getDamager() instanceof Projectile) {
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    projectile=true;
    Projectile p=(Projectile)e.getDamager();
    if (DEBUG)     plugin.getLogger().info("String_Node_Str" + p.getShooter().toString());
    if (p.getShooter() instanceof Player) {
      attacker=(Player)p.getShooter();
      if (p.getFireTicks() > 0) {
        flamingArrow=true;
      }
      if (DEBUG)       plugin.getLogger().info("String_Node_Str" + p.getFireTicks() + "String_Node_Str"+ p.getMaxFireTicks());
    }
  }
  if (attacker == null) {
    return;
  }
  if (e.getEntity() instanceof Player && attacker.equals((Player)e.getEntity())) {
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    return;
  }
  if (DEBUG)   plugin.getLogger().info("String_Node_Str");
  if (e.getEntity() instanceof ItemFrame || e.getEntityType().toString().endsWith("String_Node_Str")) {
    if (island != null && (island.getIgsFlag(SettingsFlag.BREAK_BLOCKS) || island.getMembers().contains(attacker.getUniqueId()))) {
      return;
    }
    Util.sendMessage(attacker,ChatColor.RED + plugin.myLocale(attacker.getUniqueId()).islandProtected);
    if (flamingArrow)     e.getEntity().setFireTicks(0);
    if (projectile)     e.getDamager().remove();
    e.setCancelled(true);
    return;
  }
  if (e.getEntity() instanceof Monster || e.getEntity() instanceof Slime || e.getEntity() instanceof Squid) {
    if (island != null && island.getMembers().contains(attacker.getUniqueId())) {
      return;
    }
    if (actionAllowed(attacker,e.getEntity().getLocation(),SettingsFlag.HURT_MONSTERS)) {
      if (!Settings.allowCreeperGriefing && e.getEntity() instanceof Creeper) {
        for (        ItemStack holding : Util.getPlayerInHandItems(attacker)) {
          if (holding.getType().equals(Material.FLINT_AND_STEEL)) {
            litCreeper.add(e.getEntity().getUniqueId());
            if (DEBUG) {
              plugin.getLogger().info("String_Node_Str");
            }
          }
        }
      }
      return;
    }
    Util.sendMessage(attacker,ChatColor.RED + plugin.myLocale(attacker.getUniqueId()).islandProtected);
    if (flamingArrow)     e.getEntity().setFireTicks(0);
    if (projectile)     e.getDamager().remove();
    e.setCancelled(true);
    return;
  }
  if (e.getEntity() instanceof Animals || e.getEntity() instanceof IronGolem || e.getEntity() instanceof Snowman|| e.getEntity() instanceof Villager) {
    if (island != null && (island.getIgsFlag(SettingsFlag.HURT_MOBS) || island.getMembers().contains(attacker.getUniqueId()))) {
      return;
    }
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    Util.sendMessage(attacker,ChatColor.RED + plugin.myLocale(attacker.getUniqueId()).islandProtected);
    if (flamingArrow)     e.getEntity().setFireTicks(0);
    if (projectile)     e.getDamager().remove();
    e.setCancelled(true);
    return;
  }
  boolean pvp=false;
  if ((inNether && island != null && island.getIgsFlag(SettingsFlag.NETHER_PVP) || (!inNether && island != null && island.getIgsFlag(SettingsFlag.PVP)))) {
    if (DEBUG)     plugin.getLogger().info("String_Node_Str");
    pvp=true;
  }
  if (e.getEntity() instanceof Player) {
    if (pvp) {
      return;
    }
 else {
      Util.sendMessage(attacker,ChatColor.RED + plugin.myLocale(attacker.getUniqueId()).targetInNoPVPArea);
      if (flamingArrow)       e.getEntity().setFireTicks(0);
      if (projectile)       e.getDamager().remove();
      e.setCancelled(true);
      return;
    }
  }
}