Program: 34789
Project: 34789
Buggy source:
@Override protected boolean generate(Random rand){
  islandCenterX=ComponentScatteredFeatureIsland.halfSize;
  islandCenterZ=ComponentScatteredFeatureIsland.halfSize;
  int y=25;
  while (++y < 80) {
    if (world.getBlock(islandCenterX,y,islandCenterZ) == surface())     break;
  }
  if (y >= 80)   return false;
  TimeMeasurement.start("String_Node_Str");
  RavagedDungeonGenerator gen=new RavagedDungeonGenerator(dungW,dungH,3);
  int xx, zz, yy, worldX, worldZ, th=hallHeight + 1, layer, visibility;
  for (xx=0; xx < dungW; xx++) {
    for (zz=0; zz < dungH; zz++) {
      worldX=islandCenterX - dungHalfW * scale + xx * scale + scaleHalf;
      worldZ=islandCenterZ - dungHalfH * scale + zz * scale + scaleHalf;
      yy=y - maxEntranceHeight;
      for (layer=0; layer < 3; layer++) {
        visibility=0;
        if (world.getBlock(worldX - scaleHalf - 1,yy - 1,worldZ) != Blocks.end_stone)         ++visibility;
        if (world.getBlock(worldX + scaleHalf + 1,yy - 1,worldZ) != Blocks.end_stone)         ++visibility;
        if (world.getBlock(worldX - scaleHalf - 1,yy + th + 1,worldZ) != Blocks.end_stone)         ++visibility;
        if (world.getBlock(worldX + scaleHalf + 1,yy + th + 1,worldZ) != Blocks.end_stone)         ++visibility;
        if (world.getBlock(worldX,yy - 1,worldZ - scaleHalf - 1) != Blocks.end_stone)         ++visibility;
        if (world.getBlock(worldX,yy - 1,worldZ + scaleHalf + 1) != Blocks.end_stone)         ++visibility;
        if (world.getBlock(worldX,yy + th + 1,worldZ - scaleHalf - 1) != Blocks.end_stone)         ++visibility;
        if (world.getBlock(worldX,yy + th + 1,worldZ + scaleHalf + 1) != Blocks.end_stone)         ++visibility;
        if (world.getBlock(worldX,yy + (hallHeight >> 1),worldZ) != Blocks.end_stone)         ++visibility;
        if (visibility > 3)         gen.blockLocation(layer,xx,zz);
        yy-=hallHeight + 2;
      }
    }
  }
  if (!gen.generate()) {
    System.out.println("String_Node_Str");
    return false;
  }
  TimeMeasurement.finish("String_Node_Str");
  TimeMeasurement.start("String_Node_Str");
  for (int a=0; a < gen.layers.length; a++) {
    DungeonElementList elements=gen.layers[a].getElements();
    if (a == 0)     y=generateEntrance(rand,elements,elements.getAll(DungeonElementType.ENTRANCE).get(0),y);
    if (a < gen.layers.length - 1)     generateDescendRoom(rand,elements,elements.getAll(DungeonElementType.DESCEND).get(0),y);
 else     if (a == gen.layers.length - 1)     generateEnd(rand,elements,elements.getAll(DungeonElementType.END),y);
    if (a > 0)     generateConnections(elements,elements.getAll(DungeonElementType.DESCENDBOTTOM).get(0),y);
    for (    DungeonElement hallway : elements.getAll(DungeonElementType.HALLWAY))     generateHallway(rand,elements,hallway,y);
    for (    DungeonElement room : elements.getAll(DungeonElementType.ROOM))     generateRoom(rand,elements,room,y);
    y-=hallHeight + 2;
  }
  TimeMeasurement.finish("String_Node_Str");
  return true;
}

Fixed version (ground truth):
@Override protected boolean generate(Random rand){
  islandCenterX=ComponentScatteredFeatureIsland.halfSize;
  islandCenterZ=ComponentScatteredFeatureIsland.halfSize;
  int y=25;
  while (++y < 80) {
    if (world.getBlock(islandCenterX,y,islandCenterZ) == surface())     break;
  }
  if (y >= 80)   return false;
  TimeMeasurement.start("String_Node_Str");
  RavagedDungeonGenerator gen=new RavagedDungeonGenerator(dungW,dungH,3);
  int xx, zz, yy, worldX, worldZ, th=hallHeight + 1, layer, visibility;
  for (xx=0; xx < dungW; xx++) {
    for (zz=0; zz < dungH; zz++) {
      worldX=islandCenterX - dungHalfW * scale + xx * scale + scaleHalf;
      worldZ=islandCenterZ - dungHalfH * scale + zz * scale + scaleHalf;
      yy=y - maxEntranceHeight;
      for (layer=0; layer < 3; layer++) {
        visibility=0;
        if (world.getBlock(worldX - scaleHalf - 1,yy - 1,worldZ) != Blocks.end_stone)         ++visibility;
        if (world.getBlock(worldX + scaleHalf + 1,yy - 1,worldZ) != Blocks.end_stone)         ++visibility;
        if (world.getBlock(worldX - scaleHalf - 1,yy + th + 1,worldZ) != Blocks.end_stone)         ++visibility;
        if (world.getBlock(worldX + scaleHalf + 1,yy + th + 1,worldZ) != Blocks.end_stone)         ++visibility;
        if (world.getBlock(worldX,yy - 1,worldZ - scaleHalf - 1) != Blocks.end_stone)         ++visibility;
        if (world.getBlock(worldX,yy - 1,worldZ + scaleHalf + 1) != Blocks.end_stone)         ++visibility;
        if (world.getBlock(worldX,yy + th + 1,worldZ - scaleHalf - 1) != Blocks.end_stone)         ++visibility;
        if (world.getBlock(worldX,yy + th + 1,worldZ + scaleHalf + 1) != Blocks.end_stone)         ++visibility;
        if (world.getBlock(worldX,yy + (hallHeight >> 1),worldZ) != Blocks.end_stone)         ++visibility;
        if (visibility > 3)         gen.blockLocation(layer,xx,zz);
        yy-=hallHeight + 2;
      }
    }
  }
  if (!gen.generate()) {
    DragonUtil.severe("String_Node_Str");
    return false;
  }
  TimeMeasurement.finish("String_Node_Str");
  TimeMeasurement.start("String_Node_Str");
  for (int a=0; a < gen.layers.length; a++) {
    DungeonElementList elements=gen.layers[a].getElements();
    if (a == 0)     y=generateEntrance(rand,elements,elements.getAll(DungeonElementType.ENTRANCE).get(0),y);
    if (a < gen.layers.length - 1)     generateDescendRoom(rand,elements,elements.getAll(DungeonElementType.DESCEND).get(0),y);
 else     if (a == gen.layers.length - 1)     generateEnd(rand,elements,elements.getAll(DungeonElementType.END),y);
    if (a > 0)     generateConnections(elements,elements.getAll(DungeonElementType.DESCENDBOTTOM).get(0),y);
    for (    DungeonElement hallway : elements.getAll(DungeonElementType.HALLWAY))     generateHallway(rand,elements,hallway,y);
    for (    DungeonElement room : elements.getAll(DungeonElementType.ROOM))     generateRoom(rand,elements,room,y);
    y-=hallHeight + 2;
  }
  TimeMeasurement.finish("String_Node_Str");
  return true;
}