code: private int addProbabilisticSplits(
  			List<InputSplit> splits, int i, List<InputSplit> newSplits,
  			Configuration cfg)
  		throws IOException
  	{
  		final Path path = ((FileSplit)splits.get(i)).getPath();
  		final FSDataInputStream in = path.getFileSystem(cfg).open(path);
  
  		final BGZFSplitGuesser guesser = new BGZFSplitGuesser(in);
  
  		FileSplit fspl;
  		do {
  			fspl = (FileSplit)splits.get(i);
  
  			final long beg =       fspl.getStart();
  			final long end = beg + fspl.getLength();
  
  			final long alignedBeg = guesser.guessNextBGZFBlockStart(beg, end);
  
  			newSplits.add(new FileSplit(
  				path, alignedBeg, end - alignedBeg, fspl.getLocations()));
  
  			++i;
  		} while (i < splits.size() && fspl.getPath().equals(path));
  
  		in.close();
  		return i;
  	}
docs: file repeatedly and checking addIndexedSplits for an index repeatedly.