Program: 166023
Project: 166023
Buggy source:
public DimensionInformation(String name,DimensionDescriptor descriptor,ByteBuf buf){
  this.name=name;
  this.descriptor=descriptor;
  terrainType=ByteBufTools.readEnum(buf,TerrainType.values());
  ByteBufTools.readEnumCollection(buf,featureTypes,FeatureType.values());
  ByteBufTools.readEnumCollection(buf,structureTypes,StructureType.values());
  ByteBufTools.readEnumCollection(buf,effectTypes,EffectType.values());
  biomes.clear();
  int size=buf.readInt();
  for (int i=0; i < size; i++) {
    biomes.add(BiomeGenBase.getBiome(buf.readInt()));
  }
  controllerType=ByteBufTools.readEnum(buf,ControllerType.values());
  digitString=ByteBufTools.readString(buf);
  forcedDimensionSeed=buf.readLong();
  worldVersion=buf.readInt();
  Block block=(Block)Block.blockRegistry.getObjectById(buf.readInt());
  int meta=buf.readInt();
  baseBlockForTerrain=new BlockMeta(block,meta);
  block=(Block)Block.blockRegistry.getObjectById(buf.readInt());
  meta=buf.readInt();
  tendrilBlock=new BlockMeta(block,meta);
  block=(Block)Block.blockRegistry.getObjectById(buf.readInt());
  meta=buf.readInt();
  sphereBlock=new BlockMeta(block,meta);
  block=(Block)Block.blockRegistry.getObjectById(buf.readInt());
  meta=buf.readInt();
  liquidSphereBlock=new BlockMeta(block,meta);
  liquidSphereFluid=(Block)Block.blockRegistry.getObjectById(buf.readInt());
  block=(Block)Block.blockRegistry.getObjectById(buf.readInt());
  meta=buf.readInt();
  canyonBlock=new BlockMeta(block,meta);
  fluidForTerrain=(Block)Block.blockRegistry.getObjectById(buf.readInt());
  size=buf.readInt();
  List<BlockMeta> blocksMeta=new ArrayList<BlockMeta>();
  for (int i=0; i < size; i++) {
    Block b=(Block)Block.blockRegistry.getObjectById(buf.readInt());
    int m=buf.readInt();
    blocksMeta.add(new BlockMeta(b,m));
  }
  extraOregen=blocksMeta.toArray(new BlockMeta[blocksMeta.size()]);
  List<Block> blocks=new ArrayList<Block>();
  size=buf.readInt();
  for (int i=0; i < size; i++) {
    blocks.add((Block)Block.blockRegistry.getObjectById(buf.readInt()));
  }
  fluidsForLakes=blocks.toArray(new Block[blocks.size()]);
  peaceful=buf.readBoolean();
  shelter=buf.readBoolean();
  celestialAngle=ByteBufTools.readFloat(buf);
  timeSpeed=ByteBufTools.readFloat(buf);
  probeCounter=buf.readInt();
  actualRfCost=buf.readInt();
  skyDescriptor=new SkyDescriptor.Builder().fromBytes(buf).build();
  calculateCelestialBodyDescriptors();
  extraMobs.clear();
  size=buf.readInt();
  for (int i=0; i < size; i++) {
    String className=ByteBufTools.readString(buf);
    try {
      Class<? extends EntityLiving> c=(Class<? extends EntityLiving>)Class.forName(className);
      int chance=buf.readInt();
      int minGroup=buf.readInt();
      int maxGroup=buf.readInt();
      int maxLoaded=buf.readInt();
      MobDescriptor mob=new MobDescriptor(c,chance,minGroup,maxGroup,maxLoaded);
      extraMobs.add(mob);
    }
 catch (    ClassNotFoundException e) {
      e.printStackTrace();
    }
  }
  setupBiomeMapping();
}

Fixed version (ground truth):
public DimensionInformation(String name,DimensionDescriptor descriptor,ByteBuf buf){
  this.name=name;
  this.descriptor=descriptor;
  terrainType=ByteBufTools.readEnum(buf,TerrainType.values());
  ByteBufTools.readEnumCollection(buf,featureTypes,FeatureType.values());
  ByteBufTools.readEnumCollection(buf,structureTypes,StructureType.values());
  ByteBufTools.readEnumCollection(buf,effectTypes,EffectType.values());
  biomes.clear();
  int size=buf.readInt();
  for (int i=0; i < size; i++) {
    biomes.add(BiomeGenBase.getBiome(buf.readInt()));
  }
  controllerType=ByteBufTools.readEnum(buf,ControllerType.values());
  digitString=ByteBufTools.readString(buf);
  forcedDimensionSeed=buf.readLong();
  baseSeed=buf.readLong();
  worldVersion=buf.readInt();
  Block block=(Block)Block.blockRegistry.getObjectById(buf.readInt());
  int meta=buf.readInt();
  baseBlockForTerrain=new BlockMeta(block,meta);
  block=(Block)Block.blockRegistry.getObjectById(buf.readInt());
  meta=buf.readInt();
  tendrilBlock=new BlockMeta(block,meta);
  block=(Block)Block.blockRegistry.getObjectById(buf.readInt());
  meta=buf.readInt();
  sphereBlock=new BlockMeta(block,meta);
  block=(Block)Block.blockRegistry.getObjectById(buf.readInt());
  meta=buf.readInt();
  liquidSphereBlock=new BlockMeta(block,meta);
  liquidSphereFluid=(Block)Block.blockRegistry.getObjectById(buf.readInt());
  block=(Block)Block.blockRegistry.getObjectById(buf.readInt());
  meta=buf.readInt();
  canyonBlock=new BlockMeta(block,meta);
  fluidForTerrain=(Block)Block.blockRegistry.getObjectById(buf.readInt());
  size=buf.readInt();
  List<BlockMeta> blocksMeta=new ArrayList<BlockMeta>();
  for (int i=0; i < size; i++) {
    Block b=(Block)Block.blockRegistry.getObjectById(buf.readInt());
    int m=buf.readInt();
    blocksMeta.add(new BlockMeta(b,m));
  }
  extraOregen=blocksMeta.toArray(new BlockMeta[blocksMeta.size()]);
  List<Block> blocks=new ArrayList<Block>();
  size=buf.readInt();
  for (int i=0; i < size; i++) {
    blocks.add((Block)Block.blockRegistry.getObjectById(buf.readInt()));
  }
  fluidsForLakes=blocks.toArray(new Block[blocks.size()]);
  peaceful=buf.readBoolean();
  shelter=buf.readBoolean();
  celestialAngle=ByteBufTools.readFloat(buf);
  timeSpeed=ByteBufTools.readFloat(buf);
  probeCounter=buf.readInt();
  actualRfCost=buf.readInt();
  skyDescriptor=new SkyDescriptor.Builder().fromBytes(buf).build();
  calculateCelestialBodyDescriptors();
  extraMobs.clear();
  size=buf.readInt();
  for (int i=0; i < size; i++) {
    String className=ByteBufTools.readString(buf);
    try {
      Class<? extends EntityLiving> c=(Class<? extends EntityLiving>)Class.forName(className);
      int chance=buf.readInt();
      int minGroup=buf.readInt();
      int maxGroup=buf.readInt();
      int maxLoaded=buf.readInt();
      MobDescriptor mob=new MobDescriptor(c,chance,minGroup,maxGroup,maxLoaded);
      extraMobs.add(mob);
    }
 catch (    ClassNotFoundException e) {
      e.printStackTrace();
    }
  }
  setupBiomeMapping();
}