Program: 101821
Project: 101821
Buggy source:
@EventHandler(ignoreCancelled=true) public void onEntityDamage(EntityDamageEvent event){
  boolean noHack=true;
  if (event instanceof EntityDamageByEntityEvent) {
    EntityDamageByEntityEvent e=(EntityDamageByEntityEvent)event;
    if (event.getEntity() instanceof Player) {
      Player player=(Player)event.getEntity();
      if (e.getDamager() instanceof Player) {
        Player p=(Player)e.getDamager();
        backend.logDamage(p);
        backend.logDamage(player);
        if (checkManager.willCheck(p,CheckType.LONG_REACH)) {
          Distance distance=new Distance(player.getLocation(),p.getLocation());
          if (backend.checkLongReachDamage(distance.getXDifference(),distance.getYDifference(),distance.getZDifference())) {
            event.setCancelled(!config.silentMode());
            log("String_Node_Str",p,CheckType.LONG_REACH);
            noHack=false;
          }
        }
      }
 else {
        backend.logDamage(player);
      }
    }
    if (e.getDamager() instanceof Player) {
      Player player=(Player)e.getDamager();
      if (checkManager.willCheck(player,CheckType.FORCEFIELD)) {
        if (backend.justSprinted(player)) {
          event.setCancelled(!config.silentMode());
          log("String_Node_Str",player,CheckType.FORCEFIELD);
          noHack=false;
        }
      }
      if (checkManager.willCheck(player,CheckType.NO_SWING)) {
        if (!backend.justAnimated(player)) {
          event.setCancelled(!config.silentMode());
          log("String_Node_Str",player,CheckType.NO_SWING);
          noHack=false;
        }
      }
      if (noHack) {
        decrease(player);
      }
    }
  }
}

Fixed version (ground truth):
@EventHandler(ignoreCancelled=true) public void onEntityDamage(EntityDamageEvent event){
  boolean noHack=true;
  if (event instanceof EntityDamageByEntityEvent) {
    EntityDamageByEntityEvent e=(EntityDamageByEntityEvent)event;
    if (event.getEntity() instanceof Player) {
      Player player=(Player)event.getEntity();
      if (e.getDamager() instanceof Player) {
        Player p=(Player)e.getDamager();
        backend.logDamage(p,1);
        int value=p.getInventory().getItemInHand().containsEnchantment(Enchantment.KNOCKBACK) ? 2 : 1;
        backend.logDamage(player,value);
        if (checkManager.willCheck(p,CheckType.LONG_REACH)) {
          Distance distance=new Distance(player.getLocation(),p.getLocation());
          if (backend.checkLongReachDamage(distance.getXDifference(),distance.getYDifference(),distance.getZDifference())) {
            event.setCancelled(!config.silentMode());
            log("String_Node_Str",p,CheckType.LONG_REACH);
            noHack=false;
          }
        }
      }
 else {
        if (e.getDamager() instanceof TNTPrimed || e.getDamager() instanceof Creeper) {
          backend.logDamage(player,3);
        }
 else {
          backend.logDamage(player,1);
        }
      }
    }
    if (e.getDamager() instanceof Player) {
      Player player=(Player)e.getDamager();
      if (checkManager.willCheck(player,CheckType.FORCEFIELD)) {
        if (backend.justSprinted(player)) {
          event.setCancelled(!config.silentMode());
          log("String_Node_Str",player,CheckType.FORCEFIELD);
          noHack=false;
        }
      }
      if (checkManager.willCheck(player,CheckType.NO_SWING)) {
        if (!backend.justAnimated(player)) {
          event.setCancelled(!config.silentMode());
          log("String_Node_Str",player,CheckType.NO_SWING);
          noHack=false;
        }
      }
      if (noHack) {
        decrease(player);
      }
    }
  }
}