Source:
<code>public OneOriginResult propagate () { timer.fullPropagation.start(); perIterationTravelTimes = new int[nIterations]; <START> if (writePathsForTaui || calculateAllPaths || calculateOnePath) { <END> perIterationPaths = new Path[nIterations]; } int startTarget = 0; int endTarget = nTargets; if (oneToOne) { startTarget = ((RegionalTask) request).taskId; endTarget = startTarget + 1; } for (int targetIdx = startTarget; targetIdx < endTarget; targetIdx++) { Arrays.fill(perIterationTravelTimes, nonTransitTravelTimesToTargets[targetIdx]); if (writePathsForTaui || calculateAllPaths || (calculateOnePath && targetIdx == destinationIndexForPaths)) { Arrays.fill(perIterationPaths, null); } timer.propagation.start(); propagateTransit(targetIdx); timer.propagation.stop(); PathScorer pathScorer = null; if (writePathsForTaui) { pathScorer = new PathScorer(perIterationPaths, perIterationTravelTimes); } if (calculateAllPaths) { travelTimeReducer.recordPathsForTarget(targetIdx, perIterationTravelTimes, perIterationPaths); } else if (calculateOnePath && targetIdx == destinationIndexForPaths) { travelTimeReducer.recordPathsForTarget(0, perIterationTravelTimes, perIterationPaths); } int targetToWrite = oneToOne ? 0 : targetIdx; timer.reducer.start(); travelTimeReducer.extractTravelTimePercentilesAndRecord(targetToWrite, perIterationTravelTimes); timer.reducer.stop(); if (writePathsForTaui) { Set<Path> selectedPaths = pathScorer.getTopPaths(pathWriter.nPathsPerTarget, perIterationTravelTimes[0]); pathWriter.recordPathsForTarget(selectedPaths); } } timer.fullPropagation.stop(); timer.log(); if (writePathsForTaui && pathWriter != null) { pathWriter.finishAndStorePaths(); } targets = null; return travelTimeReducer.finish(); }</code><technical_language>enum mentioned above, this if (savePaths != NONE) cleaner me</technical_language>

Target:
public OneOriginResult propagate () { timer.fullPropagation.start(); perIterationTravelTimes = new int[nIterations]; if (savePaths != savePaths.NONE) { perIterationPaths = new Path[nIterations]; } int startTarget = 0; int endTarget = nTargets; if (oneToOne) { startTarget = ((RegionalTask) request).taskId; endTarget = startTarget + 1; } for (int targetIdx = startTarget; targetIdx < endTarget; targetIdx++) { Arrays.fill(perIterationTravelTimes, nonTransitTravelTimesToTargets[targetIdx]); if (savePaths == savePaths.WRITE_TAUI || savePaths == savePaths.ALL_DESTINATIONS || (savePaths == savePaths.ONE_DESTINATION && targetIdx == destinationIndexForPaths)) { Arrays.fill(perIterationPaths, null); } timer.propagation.start(); propagateTransit(targetIdx); timer.propagation.stop(); PathScorer pathScorer = null; if (savePaths == SavePaths.WRITE_TAUI) { pathScorer = new PathScorer(perIterationPaths, perIterationTravelTimes); } else if (savePaths == SavePaths.ALL_DESTINATIONS) { travelTimeReducer.recordPathsForTarget(targetIdx, perIterationTravelTimes, perIterationPaths); } else if (savePaths == SavePaths.ONE_DESTINATION && targetIdx == destinationIndexForPaths) { travelTimeReducer.recordPathsForTarget(0, perIterationTravelTimes, perIterationPaths); } int targetToWrite = oneToOne ? 0 : targetIdx; timer.reducer.start(); travelTimeReducer.extractTravelTimePercentilesAndRecord(targetToWrite, perIterationTravelTimes); timer.reducer.stop(); if (savePaths == SavePaths.WRITE_TAUI) { Set<Path> selectedPaths = pathScorer.getTopPaths(pathWriter.nPathsPerTarget, perIterationTravelTimes[0]); pathWriter.recordPathsForTarget(selectedPaths); } } timer.fullPropagation.stop(); timer.log(); if (savePaths == SavePaths.WRITE_TAUI && pathWriter != null) { pathWriter.finishAndStorePaths(); } targets = null; return travelTimeReducer.finish(); }