Program: 12729
Project: 12729
Buggy source:
/** 
 * Called every LivingEntityUpdate, returns immediately if level =0;
 */
public void onUpdate(){
  if (this.sleepingCoffin && player.isPlayerSleeping()) {
    if (!player.worldObj.isRemote)     player.motionY=0;
 else     if (player.posY > Math.floor(player.posY) + 0.2)     player.motionY=-0.05;
 else     player.motionY=0;
  }
  if (getLevel() <= 0) {
    PotionEffect sang=player.getActivePotionEffect(ModPotion.sanguinare);
    if (sang != null) {
      if (sang.getDuration() == 1) {
        this.levelUp();
        player.addPotionEffect(new PotionEffect(ModPotion.saturation.id,300,2));
        player.addPotionEffect(new PotionEffect(Potion.resistance.id,300));
      }
    }
    return;
  }
  this.bloodStats.onUpdate();
  this.minionHandler.checkMinions();
  if (!player.worldObj.isRemote) {
    if (gettingSundamage()) {
      handleSunDamage();
    }
 else {
      if (ticksInSun > 0) {
        ticksInSun--;
      }
    }
    if (player.isPotionActive(ModPotion.sanguinare.id)) {
      player.removePotionEffect(ModPotion.sanguinare.id);
    }
    if (sleepingCoffin && !this.player.worldObj.isDaytime()) {
      this.wakeUpPlayer(true,false,true,true);
    }
  }
 else {
    if (gettingSundamage()) {
      if (ticksInSun < 101) {
        ticksInSun++;
      }
    }
 else {
      if (ticksInSun > 0) {
        ticksInSun--;
      }
    }
  }
  for (int i=0; i < skillTimer.length; i++) {
    int t=skillTimer[i];
    if (t != 0) {
      if (t < 0) {
        skillTimer[i]=++t;
      }
 else {
        skillTimer[i]=--t;
        ILastingSkill s=(ILastingSkill)Skills.getSkill(i);
        if (t == 0) {
          skillTimer[i]=-s.getCooldown();
          if (!isRemote()) {
            s.onDeactivated(this,player);
            dirty=true;
          }
        }
 else {
          if (s.onUpdate(this,player)) {
            skillTimer[i]=1;
          }
        }
      }
    }
  }
  if (!player.worldObj.isRemote && vampireLord) {
    if (getLevel() < REFERENCE.HIGHEST_REACHABLE_LEVEL) {
      VampireLordData.get(player.worldObj).makeNoLord(player,"String_Node_Str");
    }
  }
  if (batTransformed != this.isSkillActive(Skills.batMode)) {
    batTransformed=!batTransformed;
    VampirismMod.proxy.setPlayerBat(player,batTransformed);
  }
  if (minionTarget != null && !minionTarget.isEntityAlive()) {
    minionTarget=null;
  }
  if (dirty && !player.worldObj.isRemote) {
    this.sync(true);
    dirty=false;
  }
}

Fixed version (ground truth):
/** 
 * Called every LivingEntityUpdate, returns immediately if level =0;
 */
public void onUpdate(){
  if (this.sleepingCoffin && player.isPlayerSleeping()) {
    if (!player.worldObj.isRemote)     player.motionY=0;
 else     if (player.posY > Math.floor(player.posY) + 0.2)     player.motionY=-0.05;
 else     player.motionY=0;
  }
  if (getLevel() <= 0) {
    PotionEffect sang=player.getActivePotionEffect(ModPotion.sanguinare);
    if (sang != null) {
      if (sang.getDuration() == 1) {
        this.levelUp();
        player.addPotionEffect(new PotionEffect(ModPotion.saturation.id,300,2));
        player.addPotionEffect(new PotionEffect(Potion.resistance.id,300));
      }
    }
    return;
  }
  this.bloodStats.onUpdate();
  this.minionHandler.checkMinions();
  if (!player.worldObj.isRemote) {
    if (gettingSundamage()) {
      handleSunDamage();
    }
 else {
      if (ticksInSun > 0) {
        ticksInSun--;
      }
    }
    if (biteCooldown > 0)     biteCooldown--;
    if (player.isPotionActive(ModPotion.sanguinare.id)) {
      player.removePotionEffect(ModPotion.sanguinare.id);
    }
    if (sleepingCoffin && !this.player.worldObj.isDaytime()) {
      this.wakeUpPlayer(true,false,true,true);
    }
  }
 else {
    if (gettingSundamage()) {
      if (ticksInSun < 101) {
        ticksInSun++;
      }
    }
 else {
      if (ticksInSun > 0) {
        ticksInSun--;
      }
    }
  }
  for (int i=0; i < skillTimer.length; i++) {
    int t=skillTimer[i];
    if (t != 0) {
      if (t < 0) {
        skillTimer[i]=++t;
      }
 else {
        skillTimer[i]=--t;
        ILastingSkill s=(ILastingSkill)Skills.getSkill(i);
        if (t == 0) {
          skillTimer[i]=-s.getCooldown();
          if (!isRemote()) {
            s.onDeactivated(this,player);
            dirty=true;
          }
        }
 else {
          if (s.onUpdate(this,player)) {
            skillTimer[i]=1;
          }
        }
      }
    }
  }
  if (!player.worldObj.isRemote && vampireLord) {
    if (getLevel() < REFERENCE.HIGHEST_REACHABLE_LEVEL) {
      VampireLordData.get(player.worldObj).makeNoLord(player,"String_Node_Str");
    }
  }
  if (batTransformed != this.isSkillActive(Skills.batMode)) {
    batTransformed=!batTransformed;
    VampirismMod.proxy.setPlayerBat(player,batTransformed);
  }
  if (minionTarget != null && !minionTarget.isEntityAlive()) {
    minionTarget=null;
  }
  if (dirty && !player.worldObj.isRemote) {
    this.sync(true);
    dirty=false;
  }
}