Program: 13544
Project: 13544
Buggy source:
@Override public void setRotationAngles(float par1,float par2,float par3,float par4,float subtype,float partialTicks,Entity entity){
  double xAngleOffset=0;
  double yAngleMultiplier=1;
  if (!entity.isRiding()) {
    if (entity instanceof EntityPlayer) {
      double[] angles=getMotionAngles((EntityPlayer)entity,partialTicks);
      xAngleOffset=MathHelper.clamp_double(angles[0] / 5F,-1D,0.45D);
      yAngleMultiplier=(1 - (xAngleOffset * 2F));
    }
  }
 else {
    xAngleOffset=Math.toRadians(12F);
    yAngleMultiplier=0.25F;
  }
  float timestep=this.getAnimationTime(4000D,entity);
  setRotationRadians(tailBase,Math.toRadians(-40F) + xAngleOffset * 2F,((float)Math.cos(timestep - 1) / 5F) * yAngleMultiplier,0F);
  setRotationRadians(tail1,Math.toRadians(-8F) + xAngleOffset * 2F,((float)Math.cos(timestep - 2) / 5F) * yAngleMultiplier,0F);
  setRotationRadians(tail2,Math.toRadians(10F) - xAngleOffset / 4F,((float)Math.cos(timestep - 3) / 5F) * yAngleMultiplier,0F);
  setRotationRadians(tail3,Math.toRadians(20F) - xAngleOffset,((float)Math.cos(timestep - 4) / 5F) * yAngleMultiplier,0F);
  if (subtype == 1) {
    setRotationRadians(tailSubBase,Math.toRadians(-40F) + xAngleOffset * 2F,((float)Math.cos(timestep - 1) / 5F) * yAngleMultiplier,0F);
    setRotationRadians(tailSub1,Math.toRadians(-8F) + xAngleOffset * 2F,((float)Math.cos(timestep - 2) / 5F) * yAngleMultiplier,0F);
    setRotationRadians(tailSub2,Math.toRadians(10F) - xAngleOffset / 4F,((float)Math.cos(timestep - 3) / 5F) * yAngleMultiplier,0F);
    setRotationRadians(tailSub3,Math.toRadians(20F) - xAngleOffset,((float)Math.cos(timestep - 4) / 5F) * yAngleMultiplier,0F);
  }
}

Fixed version (ground truth):
@Override public void setRotationAngles(float par1,float par2,float par3,float par4,float subtype,float partialTicks,Entity entity){
  double xAngleOffset=0;
  double yAngleMultiplier=1;
  if (!entity.isRiding()) {
    if (entity instanceof EntityPlayer) {
      double[] angles=getMotionAngles((EntityPlayer)entity,partialTicks);
      xAngleOffset=MathHelper.clamp_double(angles[0] / 5F,-1D,0.45D);
      yAngleMultiplier=(1 - (xAngleOffset * 2F));
    }
  }
 else {
    xAngleOffset=Math.toRadians(12F);
    yAngleMultiplier=0.25F;
  }
  float timestep=getAnimationTime(4000D,entity);
  setRotationRadians(tailBase,Math.toRadians(-40F) + xAngleOffset * 2F,((float)Math.cos(timestep - 1) / 5F) * yAngleMultiplier,0F);
  setRotationRadians(tail1,Math.toRadians(-8F) + xAngleOffset * 2F,((float)Math.cos(timestep - 2) / 5F) * yAngleMultiplier,0F);
  setRotationRadians(tail2,Math.toRadians(10F) - xAngleOffset / 4F,((float)Math.cos(timestep - 3) / 5F) * yAngleMultiplier,0F);
  setRotationRadians(tail3,Math.toRadians(20F) - xAngleOffset,((float)Math.cos(timestep - 4) / 5F) * yAngleMultiplier,0F);
  if (subtype == 1) {
    setRotationRadians(tailSubBase,Math.toRadians(-40F) + xAngleOffset * 2F,((float)Math.cos(timestep - 1) / 5F) * yAngleMultiplier,0F);
    setRotationRadians(tailSub1,Math.toRadians(-8F) + xAngleOffset * 2F,((float)Math.cos(timestep - 2) / 5F) * yAngleMultiplier,0F);
    setRotationRadians(tailSub2,Math.toRadians(10F) - xAngleOffset / 4F,((float)Math.cos(timestep - 3) / 5F) * yAngleMultiplier,0F);
    setRotationRadians(tailSub3,Math.toRadians(20F) - xAngleOffset,((float)Math.cos(timestep - 4) / 5F) * yAngleMultiplier,0F);
  }
}