Program: 34648
Project: 34648
Buggy source:
@Override public void run(String... args){
  if (args.length < 1)   return;
  if (args[0].equals("String_Node_Str")) {
    StructureDungeon<DungeonGeneratorSpreading> stronghold=new StructureDungeon<>(128,32,128,DungeonGeneratorSpreading::new);
    stronghold.setGeneratorSetupFunc(generator -> {
      generator.setPiecesBetweenRooms(3,10);
    }
);
    stronghold.setPieceAmount(220,250);
    stronghold.setStartingPiece(new StrongholdRoomEndPortal());
    stronghold.tryGenerateInWorld(world,world.rand,MathUtil.floor(player.posX) - 8,MathUtil.floor(player.posY) - 30,MathUtil.floor(player.posZ) - 8,1);
  }
 else   if (args[0].equals("String_Node_Str")) {
    CustomArrayList<StrongholdPiece> pieces=new CustomArrayList<>();
    pieces.add(new StrongholdRoomEndPortal());
    int fullWidth=pieces.stream().mapToInt(piece -> piece.size.sizeX + 2).sum();
    StructureWorld structureWorld=new StructureWorld(fullWidth / 2,48,32);
    PosMutable pos=new PosMutable(-fullWidth / 2,0,0);
    pieces.stream().map(piece -> new StructureDungeonPieceInst(piece,pos.move(piece.size.sizeX + 2,0,0).offset(-piece.size.sizeX,0,-piece.size.sizeZ / 2))).forEach(inst -> {
      Pos piecePos=inst.boundingBox.getTopLeft();
      inst.useAllConnections();
      inst.clearArea(structureWorld,world.rand);
      inst.generatePiece(structureWorld,world.rand);
      for (      Connection connection : inst.piece.getConnections()) {
        Block block=connection.facing == Facing4.NORTH_NEGZ ? Blocks.netherrack : connection.facing == Facing4.SOUTH_POSZ ? Blocks.sandstone : connection.facing == Facing4.EAST_POSX ? Blocks.emerald_block : Blocks.wool;
        structureWorld.setBlock(piecePos.getX() + connection.offsetX,piecePos.getY() + connection.offsetY,piecePos.getZ() + connection.offsetZ,block);
      }
    }
);
    structureWorld.generateInWorld(world,world.rand,MathUtil.floor(player.posX) - 8,MathUtil.floor(player.posY) + 3,MathUtil.floor(player.posZ) - 8);
  }
 else   if (args[0].equals("String_Node_Str")) {
    MapGenStronghold stronghold=new MapGenStronghold();
    int x=MathUtil.floor(player.posX) >> 4, z=MathUtil.floor(player.posZ) >> 4;
    StructureBoundingBox box=new StructureBoundingBox(-99999,0,-99999,99999,256,99999);
    try {
      Field f=MapGenStructure.class.getDeclaredField("String_Node_Str");
      Method m=MapGenStronghold.class.getDeclaredMethod("String_Node_Str",int.class,int.class);
      f.setAccessible(true);
      f.set(stronghold,new MapGenStructureData("String_Node_Str"));
      m.setAccessible(true);
      StructureStart start=(StructureStart)m.invoke(stronghold,x,z);
      f=MapGenStructure.class.getDeclaredField("String_Node_Str");
      f.setAccessible(true);
      ((Map)f.get(stronghold)).put(Long.valueOf(ChunkCoordIntPair.chunkXZ2Int(x,z)),start);
      start.generateStructure(world,world.rand,box);
    }
 catch (    Throwable t) {
      t.printStackTrace();
    }
  }
}

Fixed version (ground truth):
@Override public void run(String... args){
  if (args.length < 1)   return;
  if (args[0].equals("String_Node_Str")) {
    StructureDungeon<DungeonGeneratorSpreading> stronghold=new StructureDungeon<>(128,64,128,DungeonGeneratorSpreading::new);
    stronghold.setGeneratorSetupFunc(generator -> {
      generator.setPiecesBetweenRooms(2,8);
    }
);
    stronghold.setPieceAmount(20,20);
    stronghold.setStartingPiece(new StrongholdRoomEndPortal());
    stronghold.addPieces(12,new Range(0,8),StrongholdCorridorStraight.generateCorridors(3,5,7));
    stronghold.addPieces(6,new Range(0,8),StrongholdCorridorIntersection.generateCorners());
    stronghold.addPieces(8,new Range(0,5),StrongholdCorridorIntersection.generateThreeWay());
    stronghold.addPieces(3,new Range(0,5),StrongholdCorridorIntersection.generateFourWay());
    stronghold.addPieces(2,new Range(0,1),StrongholdCorridorChest.generateCorridors());
    stronghold.addPieces(1,new Range(0,1),StrongholdCorridorDoubleChest.generateCorridors());
    stronghold.addPieces(5,new Range(0,1),StrongholdStairsStraight.generateStairs());
    stronghold.addPieces(4,new Range(0,1),StrongholdStairsVertical.generateStairs(1));
    stronghold.addPieces(1,new Range(0,1),StrongholdStairsVertical.generateStairs(2));
    stronghold.addPieces(10,new Range(0,1),StrongholdDoorSmall.generateDoors());
    stronghold.addPieces(10,new Range(0,1),StrongholdDoorWooden.generateDoors());
    stronghold.addPieces(10,new Range(0,1),StrongholdDoorGrates.generateDoors());
    stronghold.addPieces(10,new Range(0,1),StrongholdDoorTorches.generateDoors());
    stronghold.addPieces(2,new Range(1,1),StrongholdRoomRelicDungeon.generateRelicRooms());
    stronghold.addPieces(2,new Range(1,1),StrongholdRoomRelicFountains.generateRelicRooms());
    stronghold.addPiece(3,new Range(0,1),new StrongholdRoomSilverfishTrap());
    stronghold.addPiece(3,new Range(0,1),new StrongholdRoomLargeIntersectionTrap());
    stronghold.addPieces(3,new Range(0,2),StrongholdRoomPrisonTrap.generatePrisons());
    stronghold.addPiece(5,new Range(0,6),new StrongholdRoomFountain());
    stronghold.addPiece(4,new Range(0,8),new StrongholdRoomLargeIntersection());
    stronghold.addPiece(5,new Range(0,5),new StrongholdRoomSmallIntersection());
    stronghold.addPiece(5,new Range(0,4),new StrongholdRoomLitPole());
    stronghold.addPiece(5,new Range(0,2),new StrongholdRoomLitTotem());
    stronghold.addPieces(4,new Range(0,7),StrongholdRoomLitCorners.generateColors());
    stronghold.tryGenerateInWorld(world,world.rand,MathUtil.floor(player.posX) - 8,MathUtil.floor(player.posY) - 30,MathUtil.floor(player.posZ) - 8,10);
  }
 else   if (args[0].equals("String_Node_Str")) {
    CustomArrayList<StrongholdPiece> pieces=new CustomArrayList<>();
    pieces.add(new StrongholdRoomEndPortal());
    pieces.addAll(StrongholdStairsStraight.generateStairs());
    int fullWidth=pieces.stream().mapToInt(piece -> piece.size.sizeX + 2).sum();
    StructureWorld structureWorld=new StructureWorld(fullWidth / 2,48,32);
    PosMutable pos=new PosMutable(-fullWidth / 2,0,0);
    pieces.stream().map(piece -> new StructureDungeonPieceInst(piece,pos.move(piece.size.sizeX + 2,0,0).offset(-piece.size.sizeX,0,-piece.size.sizeZ / 2))).forEach(inst -> {
      Pos piecePos=inst.boundingBox.getTopLeft();
      inst.useAllConnections();
      inst.clearArea(structureWorld,world.rand);
      inst.generatePiece(structureWorld,world.rand);
      for (      Connection connection : inst.piece.getConnections()) {
        Block block=connection.facing == Facing4.NORTH_NEGZ ? Blocks.netherrack : connection.facing == Facing4.SOUTH_POSZ ? Blocks.sandstone : connection.facing == Facing4.EAST_POSX ? Blocks.emerald_block : Blocks.wool;
        structureWorld.setBlock(piecePos.getX() + connection.offsetX,piecePos.getY() + connection.offsetY,piecePos.getZ() + connection.offsetZ,block);
      }
    }
);
    structureWorld.generateInWorld(world,world.rand,MathUtil.floor(player.posX) - 8,MathUtil.floor(player.posY) + 3,MathUtil.floor(player.posZ) - 8);
  }
 else   if (args[0].equals("String_Node_Str")) {
    MapGenStronghold stronghold=new MapGenStronghold();
    int x=MathUtil.floor(player.posX) >> 4, z=MathUtil.floor(player.posZ) >> 4;
    StructureBoundingBox box=new StructureBoundingBox(-99999,0,-99999,99999,256,99999);
    try {
      Field f=MapGenStructure.class.getDeclaredField("String_Node_Str");
      Method m=MapGenStronghold.class.getDeclaredMethod("String_Node_Str",int.class,int.class);
      f.setAccessible(true);
      f.set(stronghold,new MapGenStructureData("String_Node_Str"));
      m.setAccessible(true);
      StructureStart start=(StructureStart)m.invoke(stronghold,x,z);
      f=MapGenStructure.class.getDeclaredField("String_Node_Str");
      f.setAccessible(true);
      ((Map)f.get(stronghold)).put(Long.valueOf(ChunkCoordIntPair.chunkXZ2Int(x,z)),start);
      start.generateStructure(world,world.rand,box);
    }
 catch (    Throwable t) {
      t.printStackTrace();
    }
  }
}