Program: 22189
Project: 22189
Buggy source:
@Override public void onUpdate(){
  IBlockState state=world.getBlockState(getPosition());
  Block block=world.getBlockState(getPosition()).getBlock();
  if (!world.isRemote && (shootingEntity != null && shootingEntity.isDead || (block.isAir(state,world,getPosition())))) {
    setDead();
  }
 else {
    super.onUpdate();
    if (inGround) {
      if (world.getBlockState(new BlockPos(x,y,z)) == blockInside) {
        ++ticksAlive;
        if (ticksAlive == 200) {
          setDead();
        }
        return;
      }
      ++ticksAlive;
      if (ticksAlive >= 200) {
        setDead();
      }
      motionX=0;
      motionY=0;
      motionZ=0;
      ticksAlive=0;
      ticksInAir=0;
    }
 else {
      ++ticksInAir;
    }
    Vec3d vec3=new Vec3d(posX,posY,posZ);
    Vec3d vec31=new Vec3d(posX + motionX,posY + motionY,posZ + motionY);
    RayTraceResult trace=this.world.rayTraceBlocks(vec3,vec31,false,true,false);
    vec3=new Vec3d(posX,posY,posZ);
    vec31=new Vec3d(posX + motionX,posY + motionY,posZ + motionZ);
    if (trace != null) {
      vec31=trace.hitVec;
    }
    Entity entity=null;
    List<Entity> list=world.getEntitiesWithinAABBExcludingEntity(this,getEntityBoundingBox().grow(motionX,motionY,motionZ).expand(0.5D,0.5D,0.5D));
    double d0=0.0D;
    for (    Entity entity1 : list) {
      if (entity1.canBeCollidedWith() && (!entity1.isEntityEqual(shootingEntity) || this.ticksInAir >= 25)) {
        float f=0.3F;
        AxisAlignedBB axisalignedbb=entity1.getEntityBoundingBox().expand((double)f,(double)f,(double)f);
        RayTraceResult trace1=axisalignedbb.calculateIntercept(vec3,vec31);
        if (trace1 != null) {
          double d1=vec3.distanceTo(trace1.hitVec);
          if (d1 < d0 || d0 == 0.0D) {
            entity=entity1;
            d0=d1;
          }
        }
      }
    }
    if (entity != null) {
      trace=new RayTraceResult(entity);
    }
    if (trace != null) {
      this.onImpact();
    }
    posX+=motionX;
    posY+=motionY;
    posZ+=motionZ;
    rotationYaw=(float)(Math.atan2(motionZ,motionX) * 180.0D / Math.PI) + 90.0F;
    while (rotationPitch - prevRotationPitch >= 180.0F) {
      prevRotationPitch+=360.0F;
    }
    while (rotationYaw - prevRotationYaw < -180.0F) {
      prevRotationYaw-=360.0F;
    }
    while (rotationYaw - prevRotationYaw >= 180.0F) {
      prevRotationYaw+=360.0F;
    }
    rotationPitch=prevRotationPitch + (rotationPitch - prevRotationPitch) * 0.2F;
    rotationYaw=prevRotationYaw + (rotationYaw - prevRotationYaw) * 0.2F;
    if (isInWater()) {
      for (int j=0; j < 4; ++j) {
        double f3=0.25D;
        world.spawnParticle(EnumParticleTypes.WATER_BUBBLE,posX - motionX * f3,posY - motionY * f3,posZ - motionZ * f3,motionX,motionY,motionZ);
      }
    }
    world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,posX - motionX * 3F,posY - motionY * 3F,posZ - motionZ * 3F,0D,0D,0D);
    world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,posX - motionX * 1.5F,posY - motionY * 1.5F,posZ - motionZ * 1.5F,0D,0D,0D);
    setPosition(posX,posY,posZ);
  }
}

Fixed version (ground truth):
@Override public void onUpdate(){
  IBlockState state=world.getBlockState(getPosition());
  Block block=world.getBlockState(getPosition()).getBlock();
  if (!world.isRemote && (shootingEntity != null && shootingEntity.isDead || (block.isAir(state,world,getPosition())))) {
    setDead();
  }
 else {
    super.onUpdate();
    if (inGround) {
      if (world.getBlockState(new BlockPos(x,y,z)) == blockInside) {
        ++ticksAlive;
        if (ticksAlive == 200) {
          setDead();
        }
        return;
      }
      ++ticksAlive;
      if (ticksAlive >= 200) {
        setDead();
      }
      motionX=0;
      motionY=0;
      motionZ=0;
      ticksAlive=0;
      ticksInAir=0;
    }
 else {
      ++ticksInAir;
    }
    Vec3d vec3=new Vec3d(posX,posY,posZ);
    Vec3d vec31=new Vec3d(posX + motionX,posY + motionY,posZ + motionY);
    RayTraceResult trace=world.rayTraceBlocks(vec3,vec31,false,true,false);
    vec3=new Vec3d(posX,posY,posZ);
    vec31=new Vec3d(posX + motionX,posY + motionY,posZ + motionZ);
    if (trace != null) {
      vec31=trace.hitVec;
    }
    Entity entity=null;
    List<Entity> list=world.getEntitiesWithinAABBExcludingEntity(this,getEntityBoundingBox().grow(motionX,motionY,motionZ).expand(0.5D,0.5D,0.5D));
    double d0=0.0D;
    for (    Entity entity1 : list) {
      if (entity1.canBeCollidedWith() && (!entity1.isEntityEqual(shootingEntity) || ticksInAir >= 25)) {
        float f=0.3F;
        AxisAlignedBB axisalignedbb=entity1.getEntityBoundingBox().expand(f,f,f);
        RayTraceResult trace1=axisalignedbb.calculateIntercept(vec3,vec31);
        if (trace1 != null) {
          double d1=vec3.distanceTo(trace1.hitVec);
          if (d1 < d0 || d0 == 0.0D) {
            entity=entity1;
            d0=d1;
          }
        }
      }
    }
    if (entity != null) {
      trace=new RayTraceResult(entity);
    }
    if (trace != null) {
      onImpact();
    }
    posX+=motionX;
    posY+=motionY;
    posZ+=motionZ;
    rotationYaw=(float)(Math.atan2(motionZ,motionX) * 180.0D / Math.PI) + 90.0F;
    while (rotationPitch - prevRotationPitch >= 180.0F) {
      prevRotationPitch+=360.0F;
    }
    while (rotationYaw - prevRotationYaw < -180.0F) {
      prevRotationYaw-=360.0F;
    }
    while (rotationYaw - prevRotationYaw >= 180.0F) {
      prevRotationYaw+=360.0F;
    }
    rotationPitch=prevRotationPitch + (rotationPitch - prevRotationPitch) * 0.2F;
    rotationYaw=prevRotationYaw + (rotationYaw - prevRotationYaw) * 0.2F;
    if (isInWater()) {
      for (int j=0; j < 4; ++j) {
        double f3=0.25D;
        world.spawnParticle(EnumParticleTypes.WATER_BUBBLE,posX - motionX * f3,posY - motionY * f3,posZ - motionZ * f3,motionX,motionY,motionZ);
      }
    }
    world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,posX - motionX * 3F,posY - motionY * 3F,posZ - motionZ * 3F,0D,0D,0D);
    world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL,posX - motionX * 1.5F,posY - motionY * 1.5F,posZ - motionZ * 1.5F,0D,0D,0D);
    setPosition(posX,posY,posZ);
  }
}