<BUG>(i < splits.size() && samples.size() < numSamples); ++i) {RecordReader<K,V> reader = inf.createRecordReader(splits.get(i),new TaskAttemptContext(job.getConfiguration(),new TaskAttemptID()));while (reader.nextKeyValue()) {</BUG><CONTEXT>int j = r.nextInt(splits.size());splits.set(i, splits.get(j));splits.set(j, tmp);}for (int i = 0; i < splitsToSample ||<extra_id_0>if (r.nextDouble() <= freq) {</CONTEXT>
TaskAttemptContext samplingContext = new TaskAttemptContext(job.getConfiguration(), new TaskAttemptID());RecordReader<K,V> reader = inf.createRecordReader(splits.get(i), samplingContext);reader.initialize(splits.get(i), samplingContext);while (reader.nextKeyValue()) {