Program: 34749
Project: 34749
Buggy source:
@Override protected void genDecorations(BiomeGenBase biome){
  if (currentWorld.provider.dimensionId != 1) {
    super.genDecorations(biome);
    return;
  }
  DragonSavefile file=WorldDataHandler.get(DragonSavefile.class);
  randomGenerator.nextInt(1 + file.getDragonDeathAmount());
  generateOres();
  double distFromCenter=Math.sqrt(MathUtil.square(chunk_X >> 4) + MathUtil.square(chunk_Z >> 4)) * 16D;
  if (distFromCenter < 120D && randomGenerator.nextInt(5) == 0) {
    int xx=randX(), zz=randZ();
    spikeGen.generate(currentWorld,randomGenerator,xx,currentWorld.getTopSolidOrLiquidBlock(xx,zz),zz);
  }
  if (distFromCenter > 102D && Math.abs(randomGenerator.nextGaussian()) < 0.285D) {
    Stopwatch.timeAverage("String_Node_Str",64);
    blobGen.prepare(chunk_X + 8,chunk_Z + 8);
    blobGen.generate(currentWorld,randomGenerator,chunk_X + randomGenerator.nextInt(10) + 11,32 + randomGenerator.nextInt(60),chunk_Z + randomGenerator.nextInt(10) + 11);
    Stopwatch.finish("String_Node_Str");
  }
  if (distFromCenter > 1280D && randomGenerator.nextFloat() * randomGenerator.nextFloat() > 0.666F && randomGenerator.nextFloat() < 0.1F + (distFromCenter / 15000D)) {
    Stopwatch.timeAverage("String_Node_Str",64);
    for (int attempt=0; attempt < randomGenerator.nextInt(3); attempt++) {
      meteoroidGen.generate(currentWorld,randomGenerator,randX(),8 + randomGenerator.nextInt(112),randZ());
    }
    Stopwatch.finish("String_Node_Str");
  }
  if (distFromCenter > 500D && randomGenerator.nextInt(1 + randomGenerator.nextInt(3) + (int)Math.floor(Math.max((11500D - distFromCenter) / 1000D,0))) <= randomGenerator.nextInt(4)) {
    Stopwatch.timeAverage("String_Node_Str",64);
    for (int attempt=0, max=1 + randomGenerator.nextInt(1 + Math.min(9,(int)Math.floor((distFromCenter - 1700D) / 2100D))); attempt < 440; attempt++) {
      if (endiumOreGen.generate(currentWorld,randomGenerator,randX(),10 + randomGenerator.nextInt(100),randZ()) && --max <= 0)       break;
    }
    Stopwatch.finish("String_Node_Str");
  }
  Stopwatch.timeAverage("String_Node_Str",64);
  for (int attempt=0, placed=0, xx, yy, zz; attempt < 22 && placed < 4 + randomGenerator.nextInt(5); attempt++) {
    xx=randX();
    yy=35 + randomGenerator.nextInt(92);
    zz=randZ();
    if (currentWorld.getBlock(xx,yy,zz) == Blocks.end_stone && endPowderOreGen.generate(currentWorld,randomGenerator,xx,yy,zz)) {
      ++placed;
    }
  }
  Stopwatch.finish("String_Node_Str");
  if (chunk_X == 0 && chunk_Z == 0) {
    EntityBossDragon dragon=new EntityBossDragon(currentWorld);
    dragon.setLocationAndAngles(0D,128D,0D,randomGenerator.nextFloat() * 360F,0F);
    currentWorld.spawnEntityInWorld(dragon);
    file.setDragonExists();
  }
}

Fixed version (ground truth):
@Override protected void genDecorations(BiomeGenBase biome){
  if (currentWorld.provider.dimensionId != 1) {
    super.genDecorations(biome);
    return;
  }
  DragonSavefile file=WorldDataHandler.get(DragonSavefile.class);
  randomGenerator.nextInt(1 + file.getDragonDeathAmount());
  generateOres();
  double distFromCenter=Math.sqrt(MathUtil.square(chunk_X >> 4) + MathUtil.square(chunk_Z >> 4)) * 16D;
  if (distFromCenter < 120D && randomGenerator.nextInt(5) == 0) {
    int xx=randX(), zz=randZ();
    spikeGen.generate(currentWorld,randomGenerator,xx,currentWorld.getTopSolidOrLiquidBlock(xx,zz),zz);
  }
  if (distFromCenter > 102D && Math.abs(randomGenerator.nextGaussian()) < 0.285D) {
    Stopwatch.timeAverage("String_Node_Str",64);
    blobGen.prepare(chunk_X + 8,chunk_Z + 8);
    blobGen.generate(currentWorld,randomGenerator,chunk_X + randomGenerator.nextInt(10) + 11,32 + randomGenerator.nextInt(60),chunk_Z + randomGenerator.nextInt(10) + 11);
    Stopwatch.finish("String_Node_Str");
  }
  if (distFromCenter > 1280D && randomGenerator.nextFloat() * randomGenerator.nextFloat() > 0.666F && randomGenerator.nextFloat() < 0.1F + (distFromCenter / 15000D)) {
    Stopwatch.timeAverage("String_Node_Str",64);
    for (int attempt=0; attempt < randomGenerator.nextInt(3); attempt++) {
      meteoroidGen.generate(currentWorld,randomGenerator,randX(),8 + randomGenerator.nextInt(112),randZ());
    }
    Stopwatch.finish("String_Node_Str");
  }
  if (distFromCenter > 500D && randomGenerator.nextInt(1 + randomGenerator.nextInt(3) + (int)Math.floor(Math.max((11500D - distFromCenter) / 1000D,0))) <= randomGenerator.nextInt(4)) {
    Stopwatch.timeAverage("String_Node_Str",64);
    for (int attempt=0, max=1 + randomGenerator.nextInt(1 + Math.min(9,(int)Math.floor((Math.max(0,distFromCenter - 1700D)) / 2100D))); attempt < 440; attempt++) {
      if (endiumOreGen.generate(currentWorld,randomGenerator,randX(),10 + randomGenerator.nextInt(100),randZ()) && --max <= 0)       break;
    }
    Stopwatch.finish("String_Node_Str");
  }
  Stopwatch.timeAverage("String_Node_Str",64);
  for (int attempt=0, placed=0, xx, yy, zz; attempt < 22 && placed < 4 + randomGenerator.nextInt(5); attempt++) {
    xx=randX();
    yy=35 + randomGenerator.nextInt(92);
    zz=randZ();
    if (currentWorld.getBlock(xx,yy,zz) == Blocks.end_stone && endPowderOreGen.generate(currentWorld,randomGenerator,xx,yy,zz)) {
      ++placed;
    }
  }
  Stopwatch.finish("String_Node_Str");
  if (chunk_X == 0 && chunk_Z == 0) {
    EntityBossDragon dragon=new EntityBossDragon(currentWorld);
    dragon.setLocationAndAngles(0D,128D,0D,randomGenerator.nextFloat() * 360F,0F);
    currentWorld.spawnEntityInWorld(dragon);
    file.setDragonExists();
  }
}