Source:
<code>public void nextTuple() { LOG.trace("Next Tuple {}", spoutId); if (!retryList.isEmpty()) { LOG.debug("Sending tuple from retry list"); HdfsUtils.Pair<MessageId, List<Object>> pair = retryList.remove(); emitData(pair.getValue(), pair.getKey()); return; } if (ackEnabled && tracker.size() >= maxOutstanding) { LOG.warn("Waiting for more ACKs before generating new tuples. " + "Progress tracker size has reached limit {}, SpoutID {}", maxOutstanding, spoutId); return; } while (true) { try { boolean newReader = false; if (reader == null) { reader = pickNextFile(); if (reader == null) { LOG.debug("Currently no new files to process under : " + sourceDirPath); return; } else { fileReadCompletely = false; newReader = true; } } else { <START> newReader = false; <END> } if (fileReadCompletely) { return; } List<Object> tuple = reader.next(); if (tuple != null) { fileReadCompletely = false; ++tupleCounter; MessageId msgId = new MessageId(tupleCounter, reader.getFilePath(), reader.getFileOffset()); emitData(tuple, msgId); if (!ackEnabled) { ++acksSinceLastCommit; commitProgress(reader.getFileOffset()); } else { commitProgress(tracker.getCommitPosition()); } return; } else { fileReadCompletely = true; if (!ackEnabled || newReader) { markFileAsDone(reader.getFilePath()); } } } catch (IOException e) { LOG.error("I/O Error processing at file location " + getFileProgress(reader), e); return; } catch (ParseException e) { LOG.error("Parsing error when processing at file location " + getFileProgress(reader) + ". Skipping remainder of file.", e); markFileAsBad(reader.getFilePath()); } } }</code><technical_language>Nit: This branch is a op, newReader is false</technical_language>

Target:
public void nextTuple() { LOG.trace("Next Tuple {}", spoutId); if (!retryList.isEmpty()) { LOG.debug("Sending tuple from retry list"); HdfsUtils.Pair<MessageId, List<Object>> pair = retryList.remove(); emitData(pair.getValue(), pair.getKey()); return; } if (ackEnabled && tracker.size() >= maxOutstanding) { LOG.warn("Waiting for more ACKs before generating new tuples. " + "Progress tracker size has reached limit {}, SpoutID {}", maxOutstanding, spoutId); return; } while (true) { try { boolean newReader = false; if (reader == null) { reader = pickNextFile(); if (reader == null) { LOG.debug("Currently no new files to process under : " + sourceDirPath); return; } else { fileReadCompletely = false; newReader = true; } } if (fileReadCompletely) { return; } List<Object> tuple = reader.next(); if (tuple != null) { fileReadCompletely = false; ++tupleCounter; MessageId msgId = new MessageId(tupleCounter, reader.getFilePath(), reader.getFileOffset()); emitData(tuple, msgId); if (!ackEnabled) { ++acksSinceLastCommit; commitProgress(reader.getFileOffset()); } else { commitProgress(tracker.getCommitPosition()); } return; } else { fileReadCompletely = true; if (!ackEnabled || newReader) { markFileAsDone(reader.getFilePath()); } } } catch (IOException e) { LOG.error("I/O Error processing at file location " + getFileProgress(reader), e); return; } catch (ParseException e) { LOG.error("Parsing error when processing at file location " + getFileProgress(reader) + ". Skipping remainder of file.", e); markFileAsBad(reader.getFilePath()); } } }