Program: 187514
Project: 187514
Buggy source:
@SuppressWarnings("String_Node_Str") @EventHandler public void onEntityDeath(final EntityDeathEvent event){
  if (Configuration.USE_LEVEL_SYSTEM) {
    LivingEntity deadEntity=event.getEntity();
    if (deadEntity instanceof CraftMyPet) {
      return;
    }
    if (!Experience.GAIN_EXP_FROM_MONSTER_SPAWNER_MOBS && event.getEntity().hasMetadata("String_Node_Str")) {
      for (      MetadataValue value : event.getEntity().getMetadata("String_Node_Str")) {
        if (value.getOwningPlugin().getName().equals(MyPetPlugin.getPlugin().getName())) {
          if (value.asBoolean()) {
            return;
          }
          break;
        }
      }
    }
    if (Experience.DAMAGE_WEIGHTED_EXPERIENCE_DISTRIBUTION) {
      Map<Entity,Double> damagePercentMap=Experience.getDamageToEntityPercent(deadEntity);
      for (      Entity entity : damagePercentMap.keySet()) {
        if (entity instanceof CraftMyPet) {
          MyPet myPet=((CraftMyPet)entity).getMyPet();
          if (Configuration.PREVENT_LEVELLING_WITHOUT_SKILLTREE && myPet.getSkillTree() == null) {
            if (!myPet.autoAssignSkilltree()) {
              continue;
            }
          }
          if (myPet.getSkillTree() == null || myPet.getExperience().getLevel() < myPet.getSkillTree().getMaxLevel()) {
            double randomExp=MonsterExperience.getMonsterExperience(deadEntity.getType()).getRandomExp();
            myPet.getExperience().addExp(damagePercentMap.get(entity) * randomExp);
          }
        }
 else         if (entity instanceof Player) {
          Player owner=(Player)entity;
          if (MyPetList.hasMyPet(owner)) {
            MyPet myPet=MyPetList.getMyPet(owner);
            if (Configuration.PREVENT_LEVELLING_WITHOUT_SKILLTREE && myPet.getSkillTree() == null) {
              if (!myPet.autoAssignSkilltree()) {
                continue;
              }
            }
            if (myPet.isPassiv()) {
              if (myPet.getStatus() == PetState.Here) {
                if (myPet.getSkillTree() == null || myPet.getExperience().getLevel() < myPet.getSkillTree().getMaxLevel()) {
                  double randomExp=MonsterExperience.getMonsterExperience(deadEntity.getType()).getRandomExp();
                  myPet.getExperience().addExp(damagePercentMap.get(entity) * randomExp);
                }
              }
            }
          }
        }
      }
    }
 else     if (deadEntity.getLastDamageCause() instanceof EntityDamageByEntityEvent) {
      EntityDamageByEntityEvent edbee=(EntityDamageByEntityEvent)deadEntity.getLastDamageCause();
      Entity damager=edbee.getDamager();
      if (damager instanceof Projectile) {
        damager=((Projectile)damager).getShooter();
      }
      if (damager instanceof CraftMyPet) {
        MyPet myPet=((CraftMyPet)damager).getMyPet();
        if (myPet.getSkillTree() == null && Configuration.PREVENT_LEVELLING_WITHOUT_SKILLTREE) {
          if (!myPet.autoAssignSkilltree()) {
            return;
          }
        }
        myPet.getExperience().addExp(edbee.getEntity().getType());
      }
 else       if (damager instanceof Player) {
        Player owner=(Player)damager;
        if (MyPetList.hasMyPet(owner)) {
          MyPet myPet=MyPetList.getMyPet(owner);
          if (Configuration.PREVENT_LEVELLING_WITHOUT_SKILLTREE && myPet.getSkillTree() == null) {
            if (!myPet.autoAssignSkilltree()) {
              return;
            }
          }
          if (myPet.isPassiv()) {
            if (myPet.getStatus() == PetState.Here) {
              if (myPet.getSkillTree() == null || myPet.getExperience().getLevel() < myPet.getSkillTree().getMaxLevel()) {
                myPet.getExperience().addExp(deadEntity.getType(),Configuration.PASSIVE_PERCENT_PER_MONSTER);
              }
            }
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @EventHandler public void onEntityDeath(final EntityDeathEvent event){
  if (Configuration.USE_LEVEL_SYSTEM) {
    LivingEntity deadEntity=event.getEntity();
    if (deadEntity instanceof CraftMyPet) {
      return;
    }
    if (!Experience.GAIN_EXP_FROM_MONSTER_SPAWNER_MOBS && event.getEntity().hasMetadata("String_Node_Str")) {
      for (      MetadataValue value : event.getEntity().getMetadata("String_Node_Str")) {
        if (value.getOwningPlugin().getName().equals(MyPetPlugin.getPlugin().getName())) {
          if (value.asBoolean()) {
            return;
          }
          break;
        }
      }
    }
    if (Experience.DAMAGE_WEIGHTED_EXPERIENCE_DISTRIBUTION) {
      Map<Entity,Double> damagePercentMap=Experience.getDamageToEntityPercent(deadEntity);
      for (      Entity entity : damagePercentMap.keySet()) {
        if (entity instanceof CraftMyPet) {
          MyPet myPet=((CraftMyPet)entity).getMyPet();
          if (Configuration.PREVENT_LEVELLING_WITHOUT_SKILLTREE && myPet.getSkillTree() == null) {
            if (!myPet.autoAssignSkilltree()) {
              continue;
            }
          }
          if (myPet.getSkillTree() == null || myPet.getSkillTree().getMaxLevel() <= 1 || myPet.getExperience().getLevel() < myPet.getSkillTree().getMaxLevel()) {
            double randomExp=MonsterExperience.getMonsterExperience(deadEntity.getType()).getRandomExp();
            myPet.getExperience().addExp(damagePercentMap.get(entity) * randomExp);
          }
        }
 else         if (entity instanceof Player) {
          Player owner=(Player)entity;
          if (MyPetList.hasMyPet(owner)) {
            MyPet myPet=MyPetList.getMyPet(owner);
            if (Configuration.PREVENT_LEVELLING_WITHOUT_SKILLTREE && myPet.getSkillTree() == null) {
              if (!myPet.autoAssignSkilltree()) {
                continue;
              }
            }
            if (myPet.isPassiv()) {
              if (myPet.getStatus() == PetState.Here) {
                if (myPet.getSkillTree() == null || myPet.getSkillTree().getMaxLevel() <= 1 || myPet.getExperience().getLevel() < myPet.getSkillTree().getMaxLevel()) {
                  double randomExp=MonsterExperience.getMonsterExperience(deadEntity.getType()).getRandomExp();
                  myPet.getExperience().addExp(damagePercentMap.get(entity) * randomExp);
                }
              }
            }
          }
        }
      }
    }
 else     if (deadEntity.getLastDamageCause() instanceof EntityDamageByEntityEvent) {
      EntityDamageByEntityEvent edbee=(EntityDamageByEntityEvent)deadEntity.getLastDamageCause();
      Entity damager=edbee.getDamager();
      if (damager instanceof Projectile) {
        damager=((Projectile)damager).getShooter();
      }
      if (damager instanceof CraftMyPet) {
        MyPet myPet=((CraftMyPet)damager).getMyPet();
        if (myPet.getSkillTree() == null && Configuration.PREVENT_LEVELLING_WITHOUT_SKILLTREE) {
          if (!myPet.autoAssignSkilltree()) {
            return;
          }
        }
        myPet.getExperience().addExp(edbee.getEntity().getType());
      }
 else       if (damager instanceof Player) {
        Player owner=(Player)damager;
        if (MyPetList.hasMyPet(owner)) {
          MyPet myPet=MyPetList.getMyPet(owner);
          if (Configuration.PREVENT_LEVELLING_WITHOUT_SKILLTREE && myPet.getSkillTree() == null) {
            if (!myPet.autoAssignSkilltree()) {
              return;
            }
          }
          if (myPet.isPassiv()) {
            if (myPet.getStatus() == PetState.Here) {
              if (myPet.getSkillTree() == null || myPet.getSkillTree().getMaxLevel() <= 1 || myPet.getExperience().getLevel() < myPet.getSkillTree().getMaxLevel()) {
                myPet.getExperience().addExp(deadEntity.getType(),Configuration.PASSIVE_PERCENT_PER_MONSTER);
              }
            }
          }
        }
      }
    }
  }
}