Program: 34736
Project: 34736
Buggy source:
@Override public void onUpdate(ItemStack is,World world,Entity owner,int slot,boolean isHeld){
  if (!world.isRemote) {
    if (is.stackTagCompound == null)     is.stackTagCompound=new NBTTagCompound();
    byte timer=is.stackTagCompound.getByte("String_Node_Str");
    if (++timer > 8) {
      timer=0;
      if (owner instanceof EntityPlayer) {
        Class<?> cls;
        for (        Object o : world.getEntitiesWithinAABB(EntityMob.class,owner.boundingBox.expand(2.75D,1.5D,2.75D))) {
          cls=o.getClass();
          if (cls == EntityEnderman.class || cls == EntityMobAngryEnderman.class) {
            EntityMob mob=(EntityMob)o;
            if (mob.getEntityToAttack() != owner)             continue;
            EntityWeatherEffect bolt=new EntityWeatherLightningBoltDemon(world,mob.posX,mob.posY,mob.posZ,null,false);
            world.addWeatherEffect(bolt);
            PacketPipeline.sendToAllAround(bolt,512D,new C05CustomWeather(bolt,(byte)0));
            EntityMobParalyzedEnderman paralyzed=new EntityMobParalyzedEnderman(world);
            paralyzed.copyLocationAndAnglesFrom(mob);
            if (mob.getLastAttacker() != owner && world.rand.nextInt(3) == 0) {
              List<EntityLiving> otherEntities=world.getEntitiesWithinAABB(EntityLiving.class,paralyzed.boundingBox.expand(8D,4D,8D));
              if (!otherEntities.isEmpty()) {
                EntityLiving target=otherEntities.get(world.rand.nextInt(otherEntities.size()));
                if (!paralyzed.canEntityBeSeen(target))                 target=null;
                paralyzed.setTarget(target);
              }
            }
            world.removeEntity(mob);
            world.spawnEntityInWorld(paralyzed);
            is.damageItem(1,(EntityPlayer)owner);
            break;
          }
        }
      }
    }
    is.stackTagCompound.setByte("String_Node_Str",timer);
  }
}

Fixed version (ground truth):
@Override public void onUpdate(ItemStack is,World world,Entity owner,int slot,boolean isHeld){
  if (!world.isRemote) {
    if (is.stackTagCompound == null)     is.stackTagCompound=new NBTTagCompound();
    byte timer=is.stackTagCompound.getByte("String_Node_Str");
    if (++timer > 8) {
      timer=0;
      if (owner instanceof EntityPlayer) {
        Class<?> cls;
        for (        Object o : world.getEntitiesWithinAABB(EntityMob.class,owner.boundingBox.expand(2.75D,1.5D,2.75D))) {
          cls=o.getClass();
          if (cls == EntityEnderman.class || cls == EntityMobAngryEnderman.class) {
            EntityMob mob=(EntityMob)o;
            if (mob.getEntityToAttack() != owner)             continue;
            EntityWeatherEffect bolt=new EntityWeatherLightningBoltDemon(world,mob.posX,mob.posY,mob.posZ,null,false);
            world.addWeatherEffect(bolt);
            PacketPipeline.sendToAllAround(bolt,512D,new C05CustomWeather(bolt,(byte)0));
            EntityMobParalyzedEnderman paralyzed=new EntityMobParalyzedEnderman(world);
            paralyzed.copyLocationAndAnglesFrom(mob);
            if (mob.getLastAttacker() != owner && world.rand.nextInt(3) == 0) {
              List<EntityLiving> otherEntities=world.getEntitiesWithinAABB(EntityLiving.class,paralyzed.boundingBox.expand(8D,4D,8D));
              if (!otherEntities.isEmpty()) {
                EntityLiving target=otherEntities.get(world.rand.nextInt(otherEntities.size()));
                if (!paralyzed.canEntityBeSeen(target))                 target=null;
                paralyzed.setTarget(target);
              }
            }
            world.removeEntity(mob);
            world.spawnEntityInWorld(paralyzed);
            is.damageItem(getEnergyPerUse(is),(EntityPlayer)owner);
            break;
          }
        }
      }
    }
    is.stackTagCompound.setByte("String_Node_Str",timer);
  }
}