Program: 94467
Project: 94467
Buggy source:
@Override public void initialize(InputSplit split,TaskAttemptContext context) throws IOException, InterruptedException {
  this.myconf=context.getConfiguration();
  if (split instanceof MrsPyramidInputSplit) {
    final MrsPyramidInputSplit fsplit=(MrsPyramidInputSplit)split;
    final Configuration conf=context.getConfiguration();
    ifContext=TiledInputFormatContext.load(context.getConfiguration());
    if (ifContext.getBounds() != null) {
      inputBounds=ifContext.getBounds();
    }
    scannedInputReader=createRecordReader(fsplit,context);
    final String pyramidName=fsplit.getName();
    tileClusterInfo=HadoopUtils.getTileClusterInfo(conf);
    readers=new HashMap<String,MrsTileReader<T>>();
    tilecache=new HashMap<String,Map<TileIdWritable,T>>();
    int readerTileCacheSize=(tileClusterInfo == null) ? ifContext.getInputs().size() : (tileClusterInfo.getNeighborCount() + 1) * ifContext.getInputs().size();
    readerTileCache=CacheBuilder.newBuilder().maximumSize(readerTileCacheSize).expireAfterAccess(10,TimeUnit.SECONDS).build();
    for (    final String inputPyramidName : ifContext.getInputs()) {
      if (pyramidName.equals(inputPyramidName)) {
        scannedInput=inputPyramidName;
        if (tileClusterInfo != null && (tileClusterInfo.getNeighborCount() > 0)) {
          primaryReader=getMrsTileReader(inputPyramidName,ifContext.getZoomLevel(),conf);
        }
      }
 else {
        secondaryPyramidNames.add(inputPyramidName);
        MrsTileReader<T> tileReader=getMrsTileReader(inputPyramidName,ifContext.getZoomLevel(),conf);
        if (tileReader.canBeCached()) {
          readers.put(inputPyramidName,tileReader);
        }
      }
    }
    try {
      final Map<String,MrsPyramidMetadata> metadataMap=readMetadata(conf);
      MrsPyramidMetadata metadata=metadataMap.get(pyramidName);
      if (metadata == null) {
        metadata=metadataMap.get(pyramidName);
      }
      if (metadata == null) {
        throw new IOException("String_Node_Str" + pyramidName);
      }
      tilesize=metadata.getTilesize();
      zoomLevel=fsplit.getZoomlevel();
    }
 catch (    final ClassNotFoundException e) {
      e.printStackTrace();
      throw new IOException(e);
    }
    if (split instanceof MrsPyramidInputSplit) {
      preBounds=fsplit.getPreBounds();
      splitZoomLevel=fsplit.getZoomlevel();
    }
 else {
      splitZoomLevel=zoomLevel;
    }
    inputTileBounds=TMSUtils.boundsToTile(inputBounds.getTMSBounds(),zoomLevel,tilesize);
    if (tileClusterInfo != null) {
      final int neighborCount=tileClusterInfo.getNeighborCount();
      if (neighborCount > 0) {
        neighborTileIds=new long[neighborCount];
        initialTile=new TMSUtils.Tile(inputTileBounds.w - tileClusterInfo.getOffsetX(),inputTileBounds.s - tileClusterInfo.getOffsetY());
      }
    }
    value=new TileCollection<T>();
    key=new TileIdWritable();
  }
 else {
    throw new IOException("String_Node_Str" + split.getClass().getName());
  }
}

Fixed version (ground truth):
@Override public void initialize(InputSplit split,TaskAttemptContext context) throws IOException, InterruptedException {
  this.myconf=context.getConfiguration();
  if (split instanceof MrsPyramidInputSplit) {
    final MrsPyramidInputSplit fsplit=(MrsPyramidInputSplit)split;
    final Configuration conf=context.getConfiguration();
    ifContext=TiledInputFormatContext.load(context.getConfiguration());
    if (ifContext.getBounds() != null) {
      inputBounds=ifContext.getBounds();
    }
    scannedInputReader=createRecordReader(fsplit,context);
    final String pyramidName=fsplit.getName();
    tileClusterInfo=HadoopUtils.getTileClusterInfo(conf);
    readers=new HashMap<String,MrsTileReader<T>>();
    tilecache=new HashMap<String,Map<TileIdWritable,T>>();
    int readerTileCacheSize=(tileClusterInfo == null) ? ifContext.getInputs().size() : (tileClusterInfo.getNeighborCount() + 1) * 2 * ifContext.getInputs().size();
    readerTileCache=CacheBuilder.newBuilder().maximumSize(readerTileCacheSize).expireAfterAccess(120,TimeUnit.SECONDS).build();
    for (    final String inputPyramidName : ifContext.getInputs()) {
      if (pyramidName.equals(inputPyramidName)) {
        scannedInput=inputPyramidName;
        if (tileClusterInfo != null && (tileClusterInfo.getNeighborCount() > 0)) {
          primaryReader=getMrsTileReader(inputPyramidName,ifContext.getZoomLevel(),conf);
        }
      }
 else {
        secondaryPyramidNames.add(inputPyramidName);
        MrsTileReader<T> tileReader=getMrsTileReader(inputPyramidName,ifContext.getZoomLevel(),conf);
        if (tileReader.canBeCached()) {
          readers.put(inputPyramidName,tileReader);
        }
      }
    }
    try {
      final Map<String,MrsPyramidMetadata> metadataMap=readMetadata(conf);
      MrsPyramidMetadata metadata=metadataMap.get(pyramidName);
      if (metadata == null) {
        metadata=metadataMap.get(pyramidName);
      }
      if (metadata == null) {
        throw new IOException("String_Node_Str" + pyramidName);
      }
      tilesize=metadata.getTilesize();
      zoomLevel=fsplit.getZoomlevel();
    }
 catch (    final ClassNotFoundException e) {
      e.printStackTrace();
      throw new IOException(e);
    }
    if (split instanceof MrsPyramidInputSplit) {
      preBounds=fsplit.getPreBounds();
      splitZoomLevel=fsplit.getZoomlevel();
    }
 else {
      splitZoomLevel=zoomLevel;
    }
    inputTileBounds=TMSUtils.boundsToTile(inputBounds.getTMSBounds(),zoomLevel,tilesize);
    if (tileClusterInfo != null) {
      final int neighborCount=tileClusterInfo.getNeighborCount();
      if (neighborCount > 0) {
        neighborTileIds=new long[neighborCount];
        initialTile=new TMSUtils.Tile(inputTileBounds.w - tileClusterInfo.getOffsetX(),inputTileBounds.s - tileClusterInfo.getOffsetY());
      }
    }
    value=new TileCollection<T>();
    key=new TileIdWritable();
  }
 else {
    throw new IOException("String_Node_Str" + split.getClass().getName());
  }
}