Program: 94468
Project: 94468
Buggy source:
@Override public List<InputSplit> getSplits(JobContext context) throws IOException {
  Configuration conf=context.getConfiguration();
  TiledInputFormatContext ifContext=TiledInputFormatContext.load(conf);
  final int zoom=ifContext.getZoomLevel();
  final int tilesize=ifContext.getTileSize();
  HdfsMrsImageDataProvider dp=new HdfsMrsImageDataProvider(context.getConfiguration(),input,null);
  Path inputWithZoom=new Path(dp.getResourcePath(true),"String_Node_Str" + zoom);
  org.mrgeo.hdfs.tile.FileSplit splitfile=new org.mrgeo.hdfs.tile.FileSplit();
  splitfile.readSplits(inputWithZoom);
  MrsImagePyramidMetadataReader metadataReader=dp.getMetadataReader();
  MrsImagePyramidMetadata metadata=metadataReader.read();
  List<InputSplit> actualSplits=super.getSplits(context);
  List<InputSplit> result=new ArrayList<InputSplit>(actualSplits.size());
  for (  InputSplit actualSplit : actualSplits) {
    if (!(actualSplit instanceof FileSplit)) {
      throw new IOException("String_Node_Str" + actualSplit.getClass().getCanonicalName());
    }
    FileSplit fileSplit=(FileSplit)actualSplit;
    String partFile=fileSplit.getPath().getParent().getName();
    if (!partFile.startsWith("String_Node_Str")) {
      throw new IOException("String_Node_Str" + partFile);
    }
    org.mrgeo.hdfs.tile.FileSplit.FileSplitInfo splitinfo;
    try {
      splitinfo=(org.mrgeo.hdfs.tile.FileSplit.FileSplitInfo)splitfile.getSplitByName(partFile);
    }
 catch (    Splits.SplitException e) {
      String indexStr=partFile.substring(partFile.lastIndexOf('-') + 1,partFile.length());
      int partition=Integer.valueOf(indexStr);
      splitinfo=(org.mrgeo.hdfs.tile.FileSplit.FileSplitInfo)splitfile.getSplitByPartition(partition);
    }
    long endTileId=splitinfo.getEndId();
    long startTileId=splitinfo.getStartId();
    TMSUtils.Tile startTile=TMSUtils.tileid(startTileId,zoom);
    TMSUtils.Tile endTile=TMSUtils.tileid(endTileId,zoom);
    TileBounds partFileTileBounds=new TileBounds(startTile.tx,startTile.ty,endTile.tx,endTile.ty);
    Bounds partFileBounds=TMSUtils.tileToBounds(partFileTileBounds,zoom,tilesize);
    if (ifContext.getBounds() != null) {
      Bounds requestedBounds=ifContext.getBounds().getTMSBounds();
      if (requestedBounds.intersect(partFileBounds,false)) {
        Bounds intersected=requestedBounds.intersection(partFileBounds,false);
        TMSUtils.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(actualSplit,s,e,zoom,metadata.getTilesize()));
      }
    }
 else {
      result.add(new TiledInputSplit(actualSplit,startTileId,endTileId,ifContext.getZoomLevel(),metadata.getTilesize()));
    }
  }
  return result;
}

Fixed version (ground truth):
@Override public List<InputSplit> getSplits(JobContext context) throws IOException {
  Configuration conf=context.getConfiguration();
  TiledInputFormatContext ifContext=TiledInputFormatContext.load(conf);
  final int zoom=ifContext.getZoomLevel();
  final int tilesize=ifContext.getTileSize();
  HdfsMrsImageDataProvider dp=new HdfsMrsImageDataProvider(context.getConfiguration(),input,null);
  Path inputWithZoom=new Path(dp.getResourcePath(true),"String_Node_Str" + zoom);
  org.mrgeo.hdfs.tile.FileSplit splitfile=new org.mrgeo.hdfs.tile.FileSplit();
  splitfile.readSplits(inputWithZoom);
  MrsImagePyramidMetadataReader metadataReader=dp.getMetadataReader();
  MrsImagePyramidMetadata metadata=metadataReader.read();
  List<InputSplit> actualSplits=super.getSplits(context);
  List<InputSplit> result=new ArrayList<InputSplit>(actualSplits.size());
  for (  InputSplit actualSplit : actualSplits) {
    if (!(actualSplit instanceof FileSplit)) {
      throw new IOException("String_Node_Str" + actualSplit.getClass().getCanonicalName());
    }
    FileSplit fileSplit=(FileSplit)actualSplit;
    String partFile=fileSplit.getPath().getParent().getName();
    if (!partFile.startsWith("String_Node_Str")) {
      throw new IOException("String_Node_Str" + partFile);
    }
    org.mrgeo.hdfs.tile.FileSplit.FileSplitInfo splitinfo;
    try {
      splitinfo=(org.mrgeo.hdfs.tile.FileSplit.FileSplitInfo)splitfile.getSplitByName(partFile);
    }
 catch (    Splits.SplitNotFoundException e) {
      LOG.info("String_Node_Str" + super.getClass().getName() + "String_Node_Str"+ partFile);
      continue;
    }
    long endTileId=splitinfo.getEndId();
    long startTileId=splitinfo.getStartId();
    TMSUtils.Tile startTile=TMSUtils.tileid(startTileId,zoom);
    TMSUtils.Tile endTile=TMSUtils.tileid(endTileId,zoom);
    TileBounds partFileTileBounds=new TileBounds(startTile.tx,startTile.ty,endTile.tx,endTile.ty);
    Bounds partFileBounds=TMSUtils.tileToBounds(partFileTileBounds,zoom,tilesize);
    if (ifContext.getBounds() != null) {
      Bounds requestedBounds=ifContext.getBounds().getTMSBounds();
      if (requestedBounds.intersect(partFileBounds,false)) {
        Bounds intersected=requestedBounds.intersection(partFileBounds,false);
        TMSUtils.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(actualSplit,s,e,zoom,metadata.getTilesize()));
      }
    }
 else {
      result.add(new TiledInputSplit(actualSplit,startTileId,endTileId,ifContext.getZoomLevel(),metadata.getTilesize()));
    }
  }
  return result;
}