Program: 166068
Project: 166068
Buggy source:
public final void genBiomeTerrain(BiomeGenBase biomegenbase,Block[] blocks,byte[] abyte,int x,int z,double noise){
  Block baseLiquid=provider.dimensionInformation.getFluidForTerrain();
  Block baseBlock=provider.dimensionInformation.getBaseBlockForTerrain().getBlock();
  byte baseMeta=provider.dimensionInformation.getBaseBlockForTerrain().getMeta();
  Block block=biomegenbase.topBlock;
  byte blockMeta=(byte)(biomegenbase.field_150604_aj & 255);
  Block block1=biomegenbase.fillerBlock;
  byte block1Meta=(byte)(biomegenbase.field_76754_C & 255);
  int k=-1;
  int l=(int)(noise / 3.0D + 3.0D + provider.rand.nextDouble() * 0.25D);
  int cx=x & 15;
  int cz=z & 15;
  int bottomIndex=((cz * 16) + cx) * (blocks.length / 256);
  for (int height=255; height >= 0; --height) {
    int index=bottomIndex + height;
    if (height <= 2) {
      blocks[index]=Blocks.air;
    }
 else {
      Block currentBlock=blocks[index];
      if (currentBlock != null && currentBlock.getMaterial() != Material.air) {
        if (currentBlock == baseBlock) {
          if (k == -1) {
            if (l <= 0) {
              block=null;
              blockMeta=0;
              block1=baseBlock;
              block1Meta=baseMeta;
            }
 else             if (height >= 59 && height <= 64) {
              block=biomegenbase.topBlock;
              blockMeta=(byte)(biomegenbase.field_150604_aj & 255);
              block1=baseBlock;
              block1Meta=baseMeta;
            }
            if (height < 63 && (block == null || block.getMaterial() == Material.air)) {
              if (biomegenbase.getFloatTemperature(x,height,z) < 0.15F) {
                block=Blocks.ice;
                blockMeta=0;
              }
 else {
                block=baseLiquid;
                blockMeta=0;
              }
            }
            k=l;
            if (height >= 62) {
              blocks[index]=block;
              abyte[index]=blockMeta;
            }
 else             if (height < 56 - l) {
              block=null;
              block1=baseBlock;
              block1Meta=baseMeta;
              blocks[index]=biomegenbase.fillerBlock;
              abyte[index]=(byte)(biomegenbase.field_76754_C & 266);
            }
 else {
              blocks[index]=block1;
              abyte[index]=block1Meta;
            }
          }
 else           if (k > 0) {
            --k;
            blocks[index]=block1;
            abyte[index]=block1Meta;
            if (k == 0 && block1 == Blocks.sand) {
              k=provider.rand.nextInt(4) + Math.max(0,height - 63);
              block1=Blocks.sandstone;
              block1Meta=0;
            }
          }
        }
      }
 else {
        k=-1;
      }
    }
  }
}

Fixed version (ground truth):
public final void genBiomeTerrain(BiomeGenBase biomegenbase,Block[] blocks,byte[] abyte,int x,int z,double noise){
  Block baseLiquid=provider.dimensionInformation.getFluidForTerrain();
  Block baseBlock=provider.dimensionInformation.getBaseBlockForTerrain().getBlock();
  byte baseMeta=provider.dimensionInformation.getBaseBlockForTerrain().getMeta();
  Block block=biomegenbase.topBlock;
  byte blockMeta=(byte)(biomegenbase.field_150604_aj & 255);
  Block block1=biomegenbase.fillerBlock;
  byte block1Meta=(byte)(biomegenbase.field_76754_C & 255);
  int k=-1;
  int l=(int)(noise / 3.0D + 3.0D + provider.rand.nextDouble() * 0.25D);
  int cx=x & 15;
  int cz=z & 15;
  int bottomIndex=((cz * 16) + cx) * (blocks.length / 256);
  for (int height=255; height >= 0; --height) {
    int index=bottomIndex + height;
    if (height <= 2) {
      blocks[index]=Blocks.air;
    }
 else {
      Block currentBlock=blocks[index];
      if (currentBlock == Blocks.bedrock && height <= 12) {
        blocks[index]=Blocks.air;
        k=-1;
      }
 else {
        if (currentBlock != null && currentBlock.getMaterial() != Material.air) {
          if (currentBlock == baseBlock) {
            if (k == -1) {
              if (l <= 0) {
                block=null;
                blockMeta=0;
                block1=baseBlock;
                block1Meta=baseMeta;
              }
 else               if (height >= 59 && height <= 64) {
                block=biomegenbase.topBlock;
                blockMeta=(byte)(biomegenbase.field_150604_aj & 255);
                block1=baseBlock;
                block1Meta=baseMeta;
              }
              if (height < 63 && (block == null || block.getMaterial() == Material.air)) {
                if (biomegenbase.getFloatTemperature(x,height,z) < 0.15F) {
                  block=Blocks.ice;
                  blockMeta=0;
                }
 else {
                  block=baseLiquid;
                  blockMeta=0;
                }
              }
              k=l;
              if (height >= 62) {
                blocks[index]=block;
                abyte[index]=blockMeta;
              }
 else               if (height < 56 - l) {
                block=null;
                block1=baseBlock;
                block1Meta=baseMeta;
                blocks[index]=biomegenbase.fillerBlock;
                abyte[index]=(byte)(biomegenbase.field_76754_C & 266);
              }
 else {
                blocks[index]=block1;
                abyte[index]=block1Meta;
              }
            }
 else             if (k > 0) {
              --k;
              blocks[index]=block1;
              abyte[index]=block1Meta;
              if (k == 0 && block1 == Blocks.sand) {
                k=provider.rand.nextInt(4) + Math.max(0,height - 63);
                block1=Blocks.sandstone;
                block1Meta=0;
              }
            }
          }
        }
 else {
          k=-1;
        }
      }
    }
  }
}