Source:
<code>private ProcessBatchResult processBatch(int batchSize) { Block[] blocks = new Block[outputCount]; int pageSize = 0; SelectedPositions positionsBatch = selectedPositions.subRange(0, batchSize); for (PageProjectionWithOutputs projection : projections) { if (yieldSignal.isSet()) { return ProcessBatchResult.processBatchYield(); } if (positionsBatch.size() > 1 && pageSize > MAX_PAGE_SIZE_IN_BYTES) { return ProcessBatchResult.processBatchTooLarge(); } int[] outputChannels = projection.getOutputChannels(); if (previouslyComputedResults[outputChannels[0]] != null && previouslyComputedResults[outputChannels[0]].getPositionCount() >= batchSize) { <START> for (Integer channel : outputChannels) { <END> blocks[channel] = previouslyComputedResults[channel].getRegion(0, batchSize); pageSize += blocks[channel].getSizeInBytes(); } } else { if (pageProjectWork == null) { expressionProfiler.start(); pageProjectWork = projection.project(session, yieldSignal, projection.getPageProjection().getInputChannels().getInputChannels(page), positionsBatch); expressionProfiler.stop(positionsBatch.size()); } if (!pageProjectWork.process()) { return ProcessBatchResult.processBatchYield(); } List<Block> projectionOutputs = pageProjectWork.getResult(); for (int j = 0; j < outputChannels.length; j++) { int channel = outputChannels[j]; previouslyComputedResults[channel] = projectionOutputs.get(j); blocks[channel] = previouslyComputedResults[channel]; pageSize += blocks[channel].getSizeInBytes(); } pageProjectWork = null; } } return ProcessBatchResult.processBatchSuccess(new Page(positionsBatch.size(), blocks)); }</code><technical_language>int channel</technical_language>

Target:
private ProcessBatchResult processBatch(int batchSize) { Block[] blocks = new Block[outputCount]; int pageSize = 0; SelectedPositions positionsBatch = selectedPositions.subRange(0, batchSize); for (PageProjectionWithOutputs projection : projections) { if (yieldSignal.isSet()) { return ProcessBatchResult.processBatchYield(); } if (positionsBatch.size() > 1 && pageSize > MAX_PAGE_SIZE_IN_BYTES) { return ProcessBatchResult.processBatchTooLarge(); } int[] outputChannels = projection.getOutputChannels(); if (previouslyComputedResults[outputChannels[0]] != null && previouslyComputedResults[outputChannels[0]].getPositionCount() >= batchSize) { for (int channel : outputChannels) { blocks[channel] = previouslyComputedResults[channel].getRegion(0, batchSize); pageSize += blocks[channel].getSizeInBytes(); } } else { if (pageProjectWork == null) { expressionProfiler.start(); pageProjectWork = projection.project(properties, yieldSignal, projection.getPageProjection().getInputChannels().getInputChannels(page), positionsBatch); expressionProfiler.stop(positionsBatch.size()); } if (!pageProjectWork.process()) { return ProcessBatchResult.processBatchYield(); } List<Block> projectionOutputs = pageProjectWork.getResult(); for (int j = 0; j < outputChannels.length; j++) { int channel = outputChannels[j]; previouslyComputedResults[channel] = projectionOutputs.get(j); blocks[channel] = previouslyComputedResults[channel]; pageSize += blocks[channel].getSizeInBytes(); } pageProjectWork = null; } } return ProcessBatchResult.processBatchSuccess(new Page(positionsBatch.size(), blocks)); }