Program: 94402
Project: 94402
Buggy source:
@Override public List<InputSplit> getSplits(JobContext context) throws IOException {
  long start=System.currentTimeMillis();
  Configuration conf=context.getConfiguration();
  ImageInputFormatContext ifContext=ImageInputFormatContext.load(conf);
  final int zoom=ifContext.getZoomLevel();
  final int tilesize=ifContext.getTileSize();
  HdfsMrsImageDataProvider dp=createHdfsMrsImageDataProvider(context.getConfiguration());
  Path inputWithZoom=new Path(dp.getResourcePath(true),"String_Node_Str" + zoom);
  MrsPyramidMetadataReader metadataReader=dp.getMetadataReader();
  MrsPyramidMetadata metadata=metadataReader.read();
  org.mrgeo.hdfs.tile.FileSplit fsplit=createFileSplit();
  fsplit.readSplits(inputWithZoom);
  org.mrgeo.hdfs.tile.FileSplit.FileSplitInfo[] splits=(org.mrgeo.hdfs.tile.FileSplit.FileSplitInfo[])fsplit.getSplits();
  List<InputSplit> result=new ArrayList<>(splits.length);
  final Bounds requestedBounds=ifContext.getBounds();
  for (  org.mrgeo.hdfs.tile.FileSplit.FileSplitInfo split : splits) {
    final Path part=new Path(inputWithZoom,split.getName());
    final Path dataFile=new Path(part,MapFile.DATA_FILE_NAME);
    final long endTileId=split.getEndId();
    final long startTileId=split.getStartId();
    final Tile startTile=TMSUtils.tileid(startTileId,zoom);
    final Tile endTile=TMSUtils.tileid(endTileId,zoom);
    final TileBounds partFileTileBounds=new TileBounds(startTile.tx,startTile.ty,endTile.tx,endTile.ty);
    final Bounds partFileBounds=TMSUtils.tileToBounds(partFileTileBounds,zoom,tilesize);
    if (requestedBounds != null) {
      if (requestedBounds.intersects(partFileBounds,false)) {
        Bounds intersected=requestedBounds.intersection(partFileBounds,false);
        TileBounds tb=TMSUtils.boundsToTile(intersected,zoom,tilesize);
        long s=TMSUtils.tileid(tb.w,tb.s,zoom);
        long e=TMSUtils.tileid(tb.e,tb.n,zoom);
        result.add(new TiledInputSplit(new FileSplit(dataFile,0,0,null),s,e,zoom,metadata.getTilesize()));
      }
    }
 else {
      result.add(new TiledInputSplit(new FileSplit(dataFile,0,0,null),startTileId,endTileId,zoom,metadata.getTilesize()));
    }
  }
  long end=System.currentTimeMillis();
  log.info("String_Node_Str" + (end - start) + "String_Node_Str");
  return result;
}

Fixed version (ground truth):
@Override public List<InputSplit> getSplits(JobContext context) throws IOException {
  long start=System.currentTimeMillis();
  Configuration conf=context.getConfiguration();
  ImageInputFormatContext ifContext=ImageInputFormatContext.load(conf);
  final int zoom=ifContext.getZoomLevel();
  final int tilesize=ifContext.getTileSize();
  HdfsMrsImageDataProvider dp=createHdfsMrsImageDataProvider(context.getConfiguration());
  Path inputWithZoom=new Path(dp.getResourcePath(true),"String_Node_Str" + zoom);
  MrsPyramidMetadataReader metadataReader=dp.getMetadataReader();
  MrsPyramidMetadata metadata=metadataReader.read();
  org.mrgeo.hdfs.tile.FileSplit fsplit=createFileSplit();
  fsplit.readSplits(inputWithZoom);
  org.mrgeo.hdfs.tile.FileSplit.FileSplitInfo[] splits=(org.mrgeo.hdfs.tile.FileSplit.FileSplitInfo[])fsplit.getSplits();
  List<InputSplit> result=new ArrayList<>(splits.length);
  final Bounds requestedBounds=ifContext.getBounds();
  for (  org.mrgeo.hdfs.tile.FileSplit.FileSplitInfo split : splits) {
    final Path part=new Path(inputWithZoom,split.getName());
    final Path dataFile=new Path(part,MapFile.DATA_FILE_NAME);
    final long endTileId=split.getEndId();
    final long startTileId=split.getStartId();
    if (requestedBounds != null) {
      final Tile startTile=TMSUtils.tileid(startTileId,zoom);
      final Bounds startTileBounds=TMSUtils.tileBounds(startTile,zoom,tilesize);
      final Tile endTile=TMSUtils.tileid(endTileId,zoom);
      final Bounds endTileBounds=TMSUtils.tileBounds(endTile,zoom,tilesize);
      if (startTileBounds.s > requestedBounds.n || endTileBounds.n < requestedBounds.s) {
      }
 else {
        result.add(new TiledInputSplit(new FileSplit(dataFile,0,0,null),startTileId,endTileId,zoom,metadata.getTilesize()));
      }
    }
 else {
      result.add(new TiledInputSplit(new FileSplit(dataFile,0,0,null),startTileId,endTileId,zoom,metadata.getTilesize()));
    }
  }
  long end=System.currentTimeMillis();
  log.info("String_Node_Str" + (end - start) + "String_Node_Str");
  return result;
}