Program: 8858
Project: 8858
Buggy source:
/** 
 * Handle top construction on the tile
 * @param tile this tile
 * @param terrain DO NOT REMOVE. Need for construct water bed
 * @param pageNode page node
 */
private void handleTop(TileData tile,Terrain terrain,Node pageNode){
  ArtResource model=terrain.getCompleteResource();
  Point p=tile.getLocation();
  Spatial spatial;
  if (terrain.getFlags().contains(Terrain.TerrainFlag.CONSTRUCTION_TYPE_WATER)) {
    if (!terrainBatchCoordinates.containsKey(p)) {
      EntityInstance<Terrain> entityInstance=new EntityInstance<>(terrain);
      findTerrainBatch(p,entityInstance);
      if (terrain.getFlags().contains(Terrain.TerrainFlag.LAVA)) {
        lavaBatches.add(entityInstance);
      }
 else {
        waterBatches.add(entityInstance);
      }
    }
    spatial=new WaterConstructor(kwdFile).construct(mapData,p.x,p.y,terrain,assetManager,model.getName());
  }
 else   if (terrain.getFlags().contains(Terrain.TerrainFlag.CONSTRUCTION_TYPE_QUAD)) {
    String modelName=(model == null && terrain.getTerrainId() == 35) ? "String_Node_Str" : model.getName();
    spatial=new QuadConstructor(kwdFile).construct(mapData,p.x,p.y,terrain,assetManager,modelName);
  }
 else {
    if (terrain.getFlags().contains(Terrain.TerrainFlag.SOLID)) {
      model=terrain.getTopResource();
    }
    spatial=loadModel(model.getName());
  }
  if (terrain.getFlags().contains(Terrain.TerrainFlag.RANDOM_TEXTURE)) {
    setRandomTexture(spatial,tile);
  }
  Node topTileNode;
  if (terrain.getFlags().contains(Terrain.TerrainFlag.SOLID)) {
    topTileNode=getTileNode(p,(Node)pageNode.getChild(TOP_INDEX));
  }
 else {
    topTileNode=getTileNode(p,(Node)pageNode.getChild(FLOOR_INDEX));
  }
  topTileNode.attachChild(spatial);
  setTileMaterialToGeometries(tile,topTileNode);
  AssetUtils.moveToTile(topTileNode,p);
  tile.setTopNode(topTileNode);
}

Fixed version (ground truth):
/** 
 * Handle top construction on the tile
 * @param tile this tile
 * @param terrain DO NOT REMOVE. Need for construct water bed
 * @param pageNode page node
 */
private void handleTop(TileData tile,Terrain terrain,Node pageNode){
  ArtResource model=terrain.getCompleteResource();
  Point p=tile.getLocation();
  Spatial spatial;
  if (terrain.getFlags().contains(Terrain.TerrainFlag.CONSTRUCTION_TYPE_WATER)) {
    if (!terrainBatchCoordinates.containsKey(p)) {
      EntityInstance<Terrain> entityInstance=new EntityInstance<>(terrain);
      findTerrainBatch(p,entityInstance);
      if (terrain.getFlags().contains(Terrain.TerrainFlag.LAVA)) {
        lavaBatches.add(entityInstance);
      }
 else {
        waterBatches.add(entityInstance);
      }
    }
    spatial=new WaterConstructor(kwdFile).construct(mapData,p.x,p.y,terrain,assetManager,model.getName());
  }
 else   if (terrain.getFlags().contains(Terrain.TerrainFlag.CONSTRUCTION_TYPE_QUAD)) {
    String modelName=(model == null && terrain.getTerrainId() == 35) ? "String_Node_Str" : model.getName();
    spatial=new QuadConstructor(kwdFile).construct(mapData,p.x,p.y,terrain,assetManager,modelName);
  }
 else {
    if (terrain.getFlags().contains(Terrain.TerrainFlag.SOLID)) {
      model=terrain.getTopResource();
    }
    spatial=loadModel(model.getName());
  }
  if (terrain.getFlags().contains(Terrain.TerrainFlag.RANDOM_TEXTURE)) {
    setRandomTexture(spatial,tile);
  }
  Node topTileNode;
  if (terrain.getFlags().contains(Terrain.TerrainFlag.SOLID)) {
    topTileNode=getTileNode(p,(Node)pageNode.getChild(TOP_INDEX));
  }
 else {
    topTileNode=getTileNode(p,(Node)pageNode.getChild(FLOOR_INDEX));
  }
  topTileNode.attachChild(spatial);
  setTileMaterialToGeometries(tile,topTileNode);
  AssetUtils.translateToTile(topTileNode,p);
  tile.setTopNode(topTileNode);
}