Program: 156814
Project: 156814
Buggy source:
@Override public void loadContents(NBTTagCompound nbt) throws BptError {
  mapping.read(nbt.getCompoundTag("String_Node_Str"));
  NBTTagList nbtContents=nbt.getTagList("String_Node_Str",Constants.NBT.TAG_COMPOUND);
  int index=0;
  for (int x=0; x < sizeX; ++x) {
    for (int y=0; y < sizeY; ++y) {
      for (int z=0; z < sizeZ; ++z) {
        NBTTagCompound cpt=nbtContents.getCompoundTagAt(index);
        index++;
        if (cpt.hasKey("String_Node_Str")) {
          Block block;
          try {
            block=mapping.getBlockForId(cpt.getInteger("String_Node_Str"));
          }
 catch (          MappingNotFoundException e) {
            block=null;
            isComplete=false;
          }
          if (block != null) {
            int meta=cpt.getInteger("String_Node_Str");
            contents[x][y][z]=SchematicRegistry.INSTANCE.createSchematicBlock(block,meta);
            if (contents[x][y][z] != null) {
              contents[x][y][z].readSchematicFromNBT(cpt,mapping);
              if (!contents[x][y][z].doNotUse()) {
                contents[x][y][z].idsToWorld(mapping);
switch (contents[x][y][z].getBuildingPermission()) {
case ALL:
                  break;
case CREATIVE_ONLY:
                System.out.println("String_Node_Str");
              System.out.println("String_Node_Str" + Block.blockRegistry.getNameForObject(block));
            System.out.println("String_Node_Str" + meta);
          if (buildingPermission == BuildingPermission.ALL) {
            buildingPermission=BuildingPermission.CREATIVE_ONLY;
          }
        break;
case NONE:
      buildingPermission=BuildingPermission.NONE;
    break;
}
}
 else {
contents[x][y][z]=null;
isComplete=false;
}
}
}
 else {
contents[x][y][z]=null;
isComplete=false;
}
}
 else {
contents[x][y][z]=null;
}
}
}
}
NBTTagList entitiesNBT=nbt.getTagList("String_Node_Str",Constants.NBT.TAG_COMPOUND);
for (int i=0; i < entitiesNBT.tagCount(); ++i) {
NBTTagCompound cpt=entitiesNBT.getCompoundTagAt(i);
if (cpt.hasKey("String_Node_Str")) {
Class<? extends Entity> entity;
try {
entity=mapping.getEntityForId(cpt.getInteger("String_Node_Str"));
}
 catch (MappingNotFoundException e) {
entity=null;
isComplete=false;
}
if (entity != null) {
SchematicEntity s=SchematicRegistry.INSTANCE.createSchematicEntity(entity);
s.readSchematicFromNBT(cpt,mapping);
s.idsToWorld(mapping);
entities.add(s);
}
 else {
isComplete=false;
}
}
}
}

Fixed version (ground truth):
@Override public void loadContents(NBTTagCompound nbt) throws BptError {
  mapping.read(nbt.getCompoundTag("String_Node_Str"));
  NBTTagList nbtContents=nbt.getTagList("String_Node_Str",Constants.NBT.TAG_COMPOUND);
  int index=0;
  for (int x=0; x < sizeX; ++x) {
    for (int y=0; y < sizeY; ++y) {
      for (int z=0; z < sizeZ; ++z) {
        NBTTagCompound cpt=nbtContents.getCompoundTagAt(index);
        index++;
        if (cpt.hasKey("String_Node_Str")) {
          Block block;
          try {
            block=mapping.getBlockForId(cpt.getInteger("String_Node_Str"));
          }
 catch (          MappingNotFoundException e) {
            block=null;
            isComplete=false;
          }
          if (block != null) {
            int meta=cpt.getInteger("String_Node_Str");
            contents[x][y][z]=SchematicRegistry.INSTANCE.createSchematicBlock(block,meta);
            if (contents[x][y][z] != null) {
              contents[x][y][z].readSchematicFromNBT(cpt,mapping);
              if (!contents[x][y][z].doNotUse()) {
                contents[x][y][z].idsToWorld(mapping);
switch (contents[x][y][z].getBuildingPermission()) {
case ALL:
                  break;
case CREATIVE_ONLY:
                if (buildingPermission == BuildingPermission.ALL) {
                  buildingPermission=BuildingPermission.CREATIVE_ONLY;
                }
              break;
case NONE:
            buildingPermission=BuildingPermission.NONE;
          break;
      }
    }
 else {
      contents[x][y][z]=null;
      isComplete=false;
    }
  }
}
 else {
  contents[x][y][z]=null;
  isComplete=false;
}
}
 else {
contents[x][y][z]=null;
}
}
}
}
NBTTagList entitiesNBT=nbt.getTagList("String_Node_Str",Constants.NBT.TAG_COMPOUND);
for (int i=0; i < entitiesNBT.tagCount(); ++i) {
NBTTagCompound cpt=entitiesNBT.getCompoundTagAt(i);
if (cpt.hasKey("String_Node_Str")) {
Class<? extends Entity> entity;
try {
entity=mapping.getEntityForId(cpt.getInteger("String_Node_Str"));
}
 catch (MappingNotFoundException e) {
entity=null;
isComplete=false;
}
if (entity != null) {
SchematicEntity s=SchematicRegistry.INSTANCE.createSchematicEntity(entity);
s.readSchematicFromNBT(cpt,mapping);
s.idsToWorld(mapping);
entities.add(s);
}
 else {
isComplete=false;
}
}
}
}