Program: 134270
Project: 134270
Buggy source:
private void generate(World world,Random random,BlockCoord origin,int layer,AxisAlignedTransform2D transform,boolean asSource){
  IvWorldData worldData=new IvWorldData(worldDataCompound,world,MCRegistrySpecial.INSTANCE);
  IvBlockCollection blockCollection=worldData.blockCollection;
  int[] size=new int[]{blockCollection.width,blockCollection.height,blockCollection.length};
  List<GeneratingTileEntity> generatingTileEntities=new ArrayList<>();
  Map<BlockCoord,TileEntity> tileEntities=new HashMap<>();
  for (  TileEntity tileEntity : worldData.tileEntities) {
    tileEntities.put(new BlockCoord(tileEntity),tileEntity);
  }
  if (!asSource) {
    for (    BlockTransformer transformer : blockTransformers) {
      if (transformer.generatesBefore()) {
        for (        BlockCoord sourceCoord : blockCollection) {
          BlockCoord worldCoord=transform.apply(sourceCoord,size).add(origin);
          Block block=blockCollection.getBlock(sourceCoord);
          int meta=blockCollection.getMetadata(sourceCoord);
          if (transformer.matches(block,meta)) {
            transformer.apply(world,random,true,worldCoord.x,worldCoord.y,worldCoord.z,block,meta,worldData);
          }
        }
      }
    }
  }
  for (int pass=0; pass < 2; pass++) {
    for (    BlockCoord sourceCoord : blockCollection) {
      Block block=blockCollection.getBlock(sourceCoord);
      int meta=blockCollection.getMetadata(sourceCoord);
      BlockCoord worldPos=transform.apply(sourceCoord,size).add(origin);
      if (pass == getPass(block,meta) && (asSource || transformer(block,meta) == null)) {
        world.setBlock(worldPos.x,worldPos.y,worldPos.z,block,meta,2);
        TileEntity tileEntity=tileEntities.get(sourceCoord);
        if (tileEntity != null) {
          world.setBlockMetadataWithNotify(worldPos.x,worldPos.y,worldPos.z,meta,2);
          tileEntity.xCoord=worldPos.x;
          tileEntity.yCoord=worldPos.y;
          tileEntity.zCoord=worldPos.z;
          world.setTileEntity(worldPos.x,worldPos.y,worldPos.z,tileEntity);
          tileEntity.updateContainingBlockInfo();
          if (!asSource) {
            if (tileEntity instanceof IInventory) {
              IInventory inventory=(IInventory)tileEntity;
              InventoryGenerationHandler.generateAllTags(inventory,random);
            }
            if (tileEntity instanceof GeneratingTileEntity) {
              generatingTileEntities.add((GeneratingTileEntity)tileEntity);
            }
          }
        }
        transform.rotateBlock(world,worldPos,block);
      }
    }
  }
  if (!asSource) {
    for (    BlockTransformer transformer : blockTransformers) {
      if (transformer.generatesAfter()) {
        for (        BlockCoord sourceCoord : blockCollection) {
          BlockCoord worldCoord=transform.apply(sourceCoord,size).add(origin);
          Block block=blockCollection.getBlock(sourceCoord);
          int meta=blockCollection.getMetadata(sourceCoord);
          if (transformer.matches(block,meta)) {
            transformer.apply(world,random,false,worldCoord.x,worldCoord.y,worldCoord.z,block,meta,worldData);
          }
        }
      }
    }
  }
  List<Entity> entities=worldData.entities;
  for (  Entity entity : entities) {
    entity.resetEntityId();
    RecurrentComplexEntityAccessor.resetEntityUUID(entity);
    double[] newEntityPos=transform.apply(new double[]{entity.posX,entity.posY,entity.posZ},size);
    entity.setPosition(newEntityPos[0] + origin.x,newEntityPos[1] + origin.y,newEntityPos[2] + origin.z);
    world.spawnEntityInWorld(entity);
  }
  if (layer < MAX_GENERATING_LAYERS) {
    for (    GeneratingTileEntity generatingTileEntity : generatingTileEntities) {
      generatingTileEntity.generate(world,random,transform,layer + 1);
    }
  }
 else {
    RecurrentComplex.logger.warn("String_Node_Str" + MAX_GENERATING_LAYERS + "String_Node_Str");
  }
}

Fixed version (ground truth):
private void generate(World world,Random random,BlockCoord origin,int layer,AxisAlignedTransform2D transform,boolean asSource){
  IvWorldData worldData=new IvWorldData(worldDataCompound,world,MCRegistrySpecial.INSTANCE);
  IvBlockCollection blockCollection=worldData.blockCollection;
  int[] size=new int[]{blockCollection.width,blockCollection.height,blockCollection.length};
  List<GeneratingTileEntity> generatingTileEntities=new ArrayList<>();
  Map<BlockCoord,TileEntity> tileEntities=new HashMap<>();
  for (  TileEntity tileEntity : worldData.tileEntities) {
    tileEntities.put(new BlockCoord(tileEntity),tileEntity);
  }
  if (!asSource) {
    for (    BlockTransformer transformer : blockTransformers) {
      if (transformer.generatesInPhase(BlockTransformer.Phase.BEFORE)) {
        for (        BlockCoord sourceCoord : blockCollection) {
          BlockCoord worldCoord=transform.apply(sourceCoord,size).add(origin);
          Block block=blockCollection.getBlock(sourceCoord);
          int meta=blockCollection.getMetadata(sourceCoord);
          if (transformer.matches(block,meta)) {
            transformer.apply(world,random,BlockTransformer.Phase.BEFORE,worldCoord.x,worldCoord.y,worldCoord.z,block,meta,worldData);
          }
        }
      }
    }
  }
  for (int pass=0; pass < 2; pass++) {
    for (    BlockCoord sourceCoord : blockCollection) {
      Block block=blockCollection.getBlock(sourceCoord);
      int meta=blockCollection.getMetadata(sourceCoord);
      BlockCoord worldPos=transform.apply(sourceCoord,size).add(origin);
      if (pass == getPass(block,meta) && (asSource || transformer(block,meta) == null)) {
        world.setBlock(worldPos.x,worldPos.y,worldPos.z,block,meta,2);
        TileEntity tileEntity=tileEntities.get(sourceCoord);
        if (tileEntity != null) {
          world.setBlockMetadataWithNotify(worldPos.x,worldPos.y,worldPos.z,meta,2);
          tileEntity.xCoord=worldPos.x;
          tileEntity.yCoord=worldPos.y;
          tileEntity.zCoord=worldPos.z;
          world.setTileEntity(worldPos.x,worldPos.y,worldPos.z,tileEntity);
          tileEntity.updateContainingBlockInfo();
          if (!asSource) {
            if (tileEntity instanceof IInventory) {
              IInventory inventory=(IInventory)tileEntity;
              InventoryGenerationHandler.generateAllTags(inventory,random);
            }
            if (tileEntity instanceof GeneratingTileEntity) {
              generatingTileEntities.add((GeneratingTileEntity)tileEntity);
            }
          }
        }
        transform.rotateBlock(world,worldPos,block);
      }
    }
  }
  if (!asSource) {
    for (    BlockTransformer transformer : blockTransformers) {
      if (transformer.generatesInPhase(BlockTransformer.Phase.AFTER)) {
        for (        BlockCoord sourceCoord : blockCollection) {
          BlockCoord worldCoord=transform.apply(sourceCoord,size).add(origin);
          Block block=blockCollection.getBlock(sourceCoord);
          int meta=blockCollection.getMetadata(sourceCoord);
          if (transformer.matches(block,meta)) {
            transformer.apply(world,random,BlockTransformer.Phase.AFTER,worldCoord.x,worldCoord.y,worldCoord.z,block,meta,worldData);
          }
        }
      }
    }
  }
  List<Entity> entities=worldData.entities;
  for (  Entity entity : entities) {
    entity.resetEntityId();
    RecurrentComplexEntityAccessor.resetEntityUUID(entity);
    double[] newEntityPos=transform.apply(new double[]{entity.posX,entity.posY,entity.posZ},size);
    entity.setPosition(newEntityPos[0] + origin.x,newEntityPos[1] + origin.y,newEntityPos[2] + origin.z);
    world.spawnEntityInWorld(entity);
  }
  if (layer < MAX_GENERATING_LAYERS) {
    for (    GeneratingTileEntity generatingTileEntity : generatingTileEntities) {
      generatingTileEntity.generate(world,random,transform,layer + 1);
    }
  }
 else {
    RecurrentComplex.logger.warn("String_Node_Str" + MAX_GENERATING_LAYERS + "String_Node_Str");
  }
}