Program: 172838
Project: 172838
Buggy source:
@Listener public void onEntityDamage(DamageEntityEvent event){
  if (event.getCause().root() instanceof EntityDamageSource) {
    EntityDamageSource source=(EntityDamageSource)event.getCause().root();
    if (source.getSource() instanceof Player) {
      Player player=(Player)source.getSource();
      if (event.getTargetEntity().getType() == EntityTypes.PLAYER) {
        Player attackedPlayer=(Player)event.getTargetEntity();
        if (FactionLogic.getFactionNameByChunk(attackedPlayer.getLocation().getChunkPosition()).equals("String_Node_Str") || FactionLogic.getFactionNameByChunk(player.getLocation().getChunkPosition()).equals("String_Node_Str")) {
          event.setBaseDamage(0);
          event.setCancelled(true);
        }
 else {
          if (FactionLogic.getFactionName(player.getUniqueId()) != null) {
            if (FactionLogic.getFactionName(player.getUniqueId()) == FactionLogic.getFactionName(attackedPlayer.getUniqueId())) {
              if (!FactionLogic.getFactionFriendlyFire(FactionLogic.getFactionName(player.getUniqueId()))) {
                event.setBaseDamage(0);
                event.setCancelled(true);
              }
 else               return;
            }
 else             if (FactionLogic.getAlliances(FactionLogic.getFactionName(player.getUniqueId())).contains(FactionLogic.getFactionName(attackedPlayer.getUniqueId())) && !MainLogic.getAllianceFriendlyFire()) {
              event.setBaseDamage(0);
              event.setCancelled(true);
            }
 else {
              if (event.willCauseDeath()) {
                PowerService.addPower(player.getUniqueId(),true);
              }
            }
          }
 else {
            if (event.willCauseDeath()) {
              PowerService.addPower(player.getUniqueId(),true);
            }
            return;
          }
        }
      }
    }
  }
  return;
}

Fixed version (ground truth):
@Listener public void onEntityDamage(DamageEntityEvent event){
  if (event.getCause().root() instanceof EntityDamageSource) {
    EntityDamageSource source=(EntityDamageSource)event.getCause().root();
    if (source.getSource() instanceof Player) {
      Player player=(Player)source.getSource();
      if (event.getTargetEntity().getType() == EntityTypes.PLAYER) {
        Player attackedPlayer=(Player)event.getTargetEntity();
        if (FactionLogic.getFactionNameByChunk(attackedPlayer.getLocation().getChunkPosition()).equals("String_Node_Str") || FactionLogic.getFactionNameByChunk(player.getLocation().getChunkPosition()).equals("String_Node_Str")) {
          event.setBaseDamage(0);
          event.setCancelled(true);
        }
 else {
          if (FactionLogic.getFactionName(player.getUniqueId()) != null) {
            EagleFactions.getEagleFactions().getLogger().info("String_Node_Str");
            if (FactionLogic.getFactionName(player.getUniqueId()) == FactionLogic.getFactionName(attackedPlayer.getUniqueId())) {
              if (!FactionLogic.getFactionFriendlyFire(FactionLogic.getFactionName(player.getUniqueId()))) {
                event.setBaseDamage(0);
                event.setCancelled(true);
              }
 else               return;
            }
 else             if (FactionLogic.getAlliances(FactionLogic.getFactionName(player.getUniqueId())).contains(FactionLogic.getFactionName(attackedPlayer.getUniqueId())) && !MainLogic.getAllianceFriendlyFire()) {
              event.setBaseDamage(0);
              event.setCancelled(true);
            }
 else {
              if (event.willCauseDeath()) {
                PowerService.addPower(player.getUniqueId(),true);
              }
            }
          }
 else {
            if (event.willCauseDeath()) {
              PowerService.addPower(player.getUniqueId(),true);
            }
 else             return;
          }
        }
      }
    }
  }
  return;
}