Program: 10329
Project: 10329
Buggy source:
/** 
 * Gets a map of all tile entities in the previous version of that chunk. Only "problematic" tile entities (those that require manual opening) will be imported, and the tile entity must be in the correct position (IE, the block at the tile entity's position must match the block normally used with that tile entity). See  {@link #shouldImportTileEntity(String,BlockPos)} for details.
 * @param chunk The chunk to import tile entities from.
 * @return A map of positions to tile entities.
 */
public Map<BlockPos,NBTTagCompound> getOldTileEntities(Chunk chunk){
  DataInputStream dis=null;
  Map<BlockPos,NBTTagCompound> returned=new HashMap<BlockPos,NBTTagCompound>();
  try {
    dis=RegionFileCache.getChunkInputStream(chunkSaveLocation,chunk.xPosition,chunk.zPosition);
    if (dis == null) {
      return returned;
    }
    NBTTagCompound chunkNBT=CompressedStreamTools.read(dis);
    NBTTagCompound levelNBT=chunkNBT.getCompoundTag("String_Node_Str");
    NBTTagList oldList=levelNBT.getTagList("String_Node_Str",10);
    if (oldList != null) {
      for (int i=0; i < oldList.tagCount(); i++) {
        NBTTagCompound oldNBT=oldList.getCompoundTagAt(i);
        String entityID=oldNBT.getString("String_Node_Str");
        BlockPos pos=new BlockPos(oldNBT.getInteger("String_Node_Str"),oldNBT.getInteger("String_Node_Str"),oldNBT.getInteger("String_Node_Str"));
        Block block=chunk.getBlockState(pos).getBlock();
        if (shouldImportTileEntity(entityID,pos,block,oldNBT,chunk)) {
          returned.put(pos,oldNBT);
        }
 else {
          WDLMessages.chatMessageTranslated(WDLMessageTypes.LOAD_TILE_ENTITY,"String_Node_Str",entityID,pos);
        }
      }
    }
  }
 catch (  Exception e) {
    WDLMessages.chatMessageTranslated(WDLMessageTypes.ERROR,"String_Node_Str",chunk.xPosition,chunk.zPosition,e);
  }
 finally {
    if (dis != null) {
      try {
        dis.close();
      }
 catch (      Exception e) {
        throw new RuntimeException(e);
      }
    }
  }
  return returned;
}

Fixed version (ground truth):
/** 
 * Gets a map of all tile entities in the previous version of that chunk. Only "problematic" tile entities (those that require manual opening) will be imported, and the tile entity must be in the correct position (IE, the block at the tile entity's position must match the block normally used with that tile entity). See  {@link #shouldImportTileEntity(String,BlockPos)} for details.
 * @param chunk The chunk to import tile entities from.
 * @return A map of positions to tile entities.
 */
public Map<BlockPos,NBTTagCompound> getOldTileEntities(Chunk chunk){
  DataInputStream dis=null;
  Map<BlockPos,NBTTagCompound> returned=new HashMap<BlockPos,NBTTagCompound>();
  try {
    dis=RegionFileCache.getChunkInputStream(chunkSaveLocation,chunk.x,chunk.z);
    if (dis == null) {
      return returned;
    }
    NBTTagCompound chunkNBT=CompressedStreamTools.read(dis);
    NBTTagCompound levelNBT=chunkNBT.getCompoundTag("String_Node_Str");
    NBTTagList oldList=levelNBT.getTagList("String_Node_Str",10);
    if (oldList != null) {
      for (int i=0; i < oldList.tagCount(); i++) {
        NBTTagCompound oldNBT=oldList.getCompoundTagAt(i);
        String entityID=oldNBT.getString("String_Node_Str");
        BlockPos pos=new BlockPos(oldNBT.getInteger("String_Node_Str"),oldNBT.getInteger("String_Node_Str"),oldNBT.getInteger("String_Node_Str"));
        Block block=chunk.getBlockState(pos).getBlock();
        if (shouldImportTileEntity(entityID,pos,block,oldNBT,chunk)) {
          returned.put(pos,oldNBT);
        }
 else {
          WDLMessages.chatMessageTranslated(WDLMessageTypes.LOAD_TILE_ENTITY,"String_Node_Str",entityID,pos);
        }
      }
    }
  }
 catch (  Exception e) {
    WDLMessages.chatMessageTranslated(WDLMessageTypes.ERROR,"String_Node_Str",chunk.x,chunk.z,e);
  }
 finally {
    if (dis != null) {
      try {
        dis.close();
      }
 catch (      Exception e) {
        throw new RuntimeException(e);
      }
    }
  }
  return returned;
}