Source:
<code>public boolean process() { <START> verify(result == null, "result has been generated"); <END> if (fallbackProcessingProjectionWork != null) { if (fallbackProcessingProjectionWork.process()) { result = fallbackProcessingProjectionWork.getResult(); return true; } return false; } Optional<Block> dictionaryOutput = Optional.empty(); if (dictionaryProcessingProjectionWork != null) { try { if (!dictionaryProcessingProjectionWork.process()) { return false; } dictionaryOutput = Optional.of(dictionaryProcessingProjectionWork.getResult()); lastOutputDictionary = dictionaryOutput; } catch (Exception ignored) { lastOutputDictionary = Optional.empty(); dictionaryProcessingProjectionWork = null; } } if (block instanceof DictionaryBlock) { lastDictionaryUsageCount += selectedPositions.size(); } if (dictionaryOutput.isPresent()) { if (block instanceof RunLengthEncodedBlock) { result = new RunLengthEncodedBlock(dictionaryOutput.get(), selectedPositions.size()); return true; } if (block instanceof DictionaryBlock) { DictionaryBlock dictionaryBlock = (DictionaryBlock) block; int[] outputIds = filterDictionaryIds(dictionaryBlock, selectedPositions); result = new DictionaryBlock(selectedPositions.size(), dictionaryOutput.get(), outputIds, false, sourceIdFunction.apply(dictionaryBlock)); return true; } throw new UnsupportedOperationException("unexpected block type " + block.getClass()); } verify(dictionaryProcessingProjectionWork == null); verify(fallbackProcessingProjectionWork == null); fallbackProcessingProjectionWork = projection.project(session, yieldSignal, new Page(block), selectedPositions); if (fallbackProcessingProjectionWork.process()) { result = fallbackProcessingProjectionWork.getResult(); return true; } return false; }</code><technical_language>checkState</technical_language>

Target:
public boolean process() { checkState(result == null, "result has been generated"); if (fallbackProcessingProjectionWork != null) { if (fallbackProcessingProjectionWork.process()) { result = fallbackProcessingProjectionWork.getResult(); return true; } return false; } Optional<Block> dictionaryOutput = Optional.empty(); if (dictionaryProcessingProjectionWork != null) { try { if (!dictionaryProcessingProjectionWork.process()) { return false; } dictionaryOutput = Optional.of(dictionaryProcessingProjectionWork.getResult()); lastOutputDictionary = dictionaryOutput; } catch (Exception ignored) { lastOutputDictionary = Optional.empty(); dictionaryProcessingProjectionWork = null; } } if (block instanceof DictionaryBlock) { lastDictionaryUsageCount += selectedPositions.size(); } if (dictionaryOutput.isPresent()) { if (block instanceof RunLengthEncodedBlock) { result = new RunLengthEncodedBlock(dictionaryOutput.get(), selectedPositions.size()); return true; } if (block instanceof DictionaryBlock) { DictionaryBlock dictionaryBlock = (DictionaryBlock) block; int[] outputIds = filterDictionaryIds(dictionaryBlock, selectedPositions); result = new DictionaryBlock(selectedPositions.size(), dictionaryOutput.get(), outputIds, false, sourceIdFunction.apply(dictionaryBlock)); return true; } throw new UnsupportedOperationException("unexpected block type " + block.getClass()); } verify(dictionaryProcessingProjectionWork == null); verify(fallbackProcessingProjectionWork == null); fallbackProcessingProjectionWork = projection.project(session, yieldSignal, new Page(block), selectedPositions); if (fallbackProcessingProjectionWork.process()) { result = fallbackProcessingProjectionWork.getResult(); return true; } return false; }