Program: 57978
Project: 57978
Buggy source:
@EventHandler(priority=EventPriority.HIGHEST,ignoreCancelled=true) public void onEntityDamageByEntityEvent(final EntityDamageByEntityEvent e){
  final Location l=BukkitUtil.getLocation(e.getEntity());
  if (!PS.get().isPlotWorld(l.getWorld())) {
    return;
  }
  final Entity damager=e.getDamager();
  final Entity victim=e.getEntity();
  Location dloc=BukkitUtil.getLocation(damager);
  Location vloc=BukkitUtil.getLocation(victim);
  Plot dplot=MainUtil.getPlot(dloc);
  Plot vplot=MainUtil.getPlot(vloc);
  Plot plot;
  String stub;
  if (dplot == null && vplot == null) {
    if (!MainUtil.isPlotAreaAbs(dloc)) {
      return;
    }
    plot=null;
    stub="String_Node_Str";
  }
 else {
    plot=vplot == null ? dplot : ((dplot == null || !(victim instanceof Player)) ? vplot : (victim.getTicksLived() > damager.getTicksLived() ? dplot : vplot));
    stub=plot.hasOwner() ? "String_Node_Str" : "String_Node_Str";
  }
  Player player;
  if (damager instanceof Player) {
    player=(Player)damager;
  }
 else   if (damager instanceof Projectile) {
    Projectile projectile=(Projectile)damager;
    ProjectileSource shooter=projectile.getShooter();
    if (shooter instanceof Player) {
      player=(Player)shooter;
    }
 else {
      player=null;
    }
  }
 else {
    player=null;
  }
  if (player != null) {
    PlotPlayer pp=BukkitUtil.getPlayer(player);
    if (victim instanceof Hanging) {
      if (plot != null && ((FlagManager.isPlotFlagTrue(plot,"String_Node_Str") || plot.isAdded(pp.getUUID())))) {
        return;
      }
      if (!Permissions.hasPermission(pp,"String_Node_Str" + stub)) {
        e.setCancelled(true);
        MainUtil.sendMessage(pp,C.NO_PERMISSION,"String_Node_Str" + stub);
        return;
      }
    }
 else     if (victim instanceof ArmorStand) {
      if (plot != null && ((FlagManager.isPlotFlagTrue(plot,"String_Node_Str") || plot.isAdded(pp.getUUID())))) {
        return;
      }
      if (!Permissions.hasPermission(pp,"String_Node_Str" + stub)) {
        e.setCancelled(true);
        MainUtil.sendMessage(pp,C.NO_PERMISSION,"String_Node_Str" + stub);
        return;
      }
    }
 else     if (victim instanceof Monster || victim instanceof EnderDragon) {
      if (plot != null && ((FlagManager.isPlotFlagTrue(plot,"String_Node_Str") || FlagManager.isPlotFlagTrue(plot,"String_Node_Str") || plot.isAdded(pp.getUUID())))) {
        return;
      }
      if (!Permissions.hasPermission(pp,"String_Node_Str" + stub)) {
        e.setCancelled(true);
        MainUtil.sendMessage(pp,C.NO_PERMISSION,"String_Node_Str" + stub);
        return;
      }
    }
 else     if (victim instanceof Tameable) {
      if (plot != null && ((FlagManager.isPlotFlagTrue(plot,"String_Node_Str") || FlagManager.isPlotFlagTrue(plot,"String_Node_Str") || plot.isAdded(pp.getUUID())))) {
        return;
      }
      if (!Permissions.hasPermission(pp,"String_Node_Str" + stub)) {
        e.setCancelled(true);
        MainUtil.sendMessage(pp,C.NO_PERMISSION,"String_Node_Str" + stub);
        return;
      }
    }
 else     if (victim instanceof Player) {
      if (plot != null) {
        Flag pvp=FlagManager.getPlotFlag(plot,FLAG_PVP);
        if (pvp == null) {
          return;
        }
 else {
          if ((Boolean)pvp.getValue()) {
            return;
          }
        }
      }
      if (!Permissions.hasPermission(pp,"String_Node_Str" + stub)) {
        e.setCancelled(true);
        MainUtil.sendMessage(pp,C.NO_PERMISSION,"String_Node_Str" + stub);
        return;
      }
    }
 else     if (victim instanceof Creature) {
      if (plot != null && ((FlagManager.isPlotFlagTrue(plot,"String_Node_Str") || FlagManager.isPlotFlagTrue(plot,"String_Node_Str") || plot.isAdded(pp.getUUID())))) {
        return;
      }
      if (!Permissions.hasPermission(pp,"String_Node_Str" + stub)) {
        e.setCancelled(true);
        MainUtil.sendMessage(pp,C.NO_PERMISSION,"String_Node_Str" + stub);
        return;
      }
    }
 else     if (victim instanceof Vehicle) {
      return;
    }
 else {
      if (plot != null && ((FlagManager.isPlotFlagTrue(plot,"String_Node_Str") || plot.isAdded(pp.getUUID())))) {
        return;
      }
      if (!Permissions.hasPermission(pp,"String_Node_Str" + stub)) {
        e.setCancelled(true);
        MainUtil.sendMessage(pp,C.NO_PERMISSION,"String_Node_Str" + stub);
        return;
      }
    }
    return;
  }
  if ((damager instanceof Arrow) && (!(victim instanceof Creature))) {
    e.setCancelled(true);
  }
}

Fixed version (ground truth):
@EventHandler(priority=EventPriority.HIGHEST,ignoreCancelled=true) public void onEntityDamageByEntityEvent(final EntityDamageByEntityEvent e){
  final Location l=BukkitUtil.getLocation(e.getEntity());
  if (!PS.get().isPlotWorld(l.getWorld())) {
    return;
  }
  final Entity damager=e.getDamager();
  final Entity victim=e.getEntity();
  Location dloc=BukkitUtil.getLocation(damager);
  Location vloc=BukkitUtil.getLocation(victim);
  Plot dplot=MainUtil.getPlot(dloc);
  Plot vplot=MainUtil.getPlot(vloc);
  Plot plot;
  String stub;
  if (dplot == null && vplot == null) {
    if (!MainUtil.isPlotAreaAbs(dloc)) {
      return;
    }
    plot=null;
    stub="String_Node_Str";
  }
 else {
    plot=vplot == null ? dplot : ((dplot == null || !(victim instanceof Player)) ? vplot : (victim.getTicksLived() > damager.getTicksLived() ? dplot : vplot));
    stub=plot.hasOwner() ? "String_Node_Str" : "String_Node_Str";
  }
  Player player;
  if (damager instanceof Player) {
    player=(Player)damager;
  }
 else   if (damager instanceof Projectile) {
    Projectile projectile=(Projectile)damager;
    ProjectileSource shooter=projectile.getShooter();
    if (shooter instanceof Player) {
      player=(Player)shooter;
    }
 else {
      player=null;
    }
  }
 else {
    player=null;
  }
  if (player != null) {
    PlotPlayer pp=BukkitUtil.getPlayer(player);
    if (victim instanceof Hanging) {
      if (plot != null && ((FlagManager.isPlotFlagTrue(plot,"String_Node_Str") || plot.isAdded(pp.getUUID())))) {
        return;
      }
      if (!Permissions.hasPermission(pp,"String_Node_Str" + stub)) {
        e.setCancelled(true);
        MainUtil.sendMessage(pp,C.NO_PERMISSION,"String_Node_Str" + stub);
        return;
      }
    }
 else     if (victim.getEntityId() == 30) {
      if (plot != null && ((FlagManager.isPlotFlagTrue(plot,"String_Node_Str") || plot.isAdded(pp.getUUID())))) {
        return;
      }
      if (!Permissions.hasPermission(pp,"String_Node_Str" + stub)) {
        e.setCancelled(true);
        MainUtil.sendMessage(pp,C.NO_PERMISSION,"String_Node_Str" + stub);
        return;
      }
    }
 else     if (victim instanceof Monster || victim instanceof EnderDragon) {
      if (plot != null && ((FlagManager.isPlotFlagTrue(plot,"String_Node_Str") || FlagManager.isPlotFlagTrue(plot,"String_Node_Str") || plot.isAdded(pp.getUUID())))) {
        return;
      }
      if (!Permissions.hasPermission(pp,"String_Node_Str" + stub)) {
        e.setCancelled(true);
        MainUtil.sendMessage(pp,C.NO_PERMISSION,"String_Node_Str" + stub);
        return;
      }
    }
 else     if (victim instanceof Tameable) {
      if (plot != null && ((FlagManager.isPlotFlagTrue(plot,"String_Node_Str") || FlagManager.isPlotFlagTrue(plot,"String_Node_Str") || plot.isAdded(pp.getUUID())))) {
        return;
      }
      if (!Permissions.hasPermission(pp,"String_Node_Str" + stub)) {
        e.setCancelled(true);
        MainUtil.sendMessage(pp,C.NO_PERMISSION,"String_Node_Str" + stub);
        return;
      }
    }
 else     if (victim instanceof Player) {
      if (plot != null) {
        Flag pvp=FlagManager.getPlotFlag(plot,FLAG_PVP);
        if (pvp == null) {
          return;
        }
 else {
          if ((Boolean)pvp.getValue()) {
            return;
          }
        }
      }
      if (!Permissions.hasPermission(pp,"String_Node_Str" + stub)) {
        e.setCancelled(true);
        MainUtil.sendMessage(pp,C.NO_PERMISSION,"String_Node_Str" + stub);
        return;
      }
    }
 else     if (victim instanceof Creature) {
      if (plot != null && ((FlagManager.isPlotFlagTrue(plot,"String_Node_Str") || FlagManager.isPlotFlagTrue(plot,"String_Node_Str") || plot.isAdded(pp.getUUID())))) {
        return;
      }
      if (!Permissions.hasPermission(pp,"String_Node_Str" + stub)) {
        e.setCancelled(true);
        MainUtil.sendMessage(pp,C.NO_PERMISSION,"String_Node_Str" + stub);
        return;
      }
    }
 else     if (victim instanceof Vehicle) {
      return;
    }
 else {
      if (plot != null && ((FlagManager.isPlotFlagTrue(plot,"String_Node_Str") || plot.isAdded(pp.getUUID())))) {
        return;
      }
      if (!Permissions.hasPermission(pp,"String_Node_Str" + stub)) {
        e.setCancelled(true);
        MainUtil.sendMessage(pp,C.NO_PERMISSION,"String_Node_Str" + stub);
        return;
      }
    }
    return;
  }
  if ((damager instanceof Arrow) && (!(victim instanceof Creature))) {
    e.setCancelled(true);
  }
}