Source:
<code>private void warmUpPopulate(Map<Future<SingleBenchmarkRunner>, SingleBenchmarkRunner> futureMap, ConcurrentMap<SolverBenchmarkResult, Integer> singleBenchmarkResultIndexMap, SolverBenchmarkResult[] solverBenchmarkResultArray, long timeLeftPerSolverConfig) { for (SolverBenchmarkResult solverBenchmarkResult : solverBenchmarkResultArray) { TerminationConfig originalTerminationConfig = solverBenchmarkResult.getSolverConfig().getTerminationConfig(); TerminationConfig tmpTerminationConfig = originalTerminationConfig == null ? new TerminationConfig() : originalTerminationConfig.clone(); <START> tmpTerminationConfig.overwriteTimeMillisSpentLimit(timeLeftPerSolverConfig); <END> solverBenchmarkResult.getSolverConfig().setTerminationConfig(tmpTerminationConfig); Integer singleBenchmarkResultIndex = singleBenchmarkResultIndexMap.get(solverBenchmarkResult); if (singleBenchmarkResultIndex == null || singleBenchmarkResultIndex >= solverBenchmarkResult.getSingleBenchmarkResultList().size()) { singleBenchmarkResultIndex = 0; } SingleBenchmarkResult singleBenchmarkResult = solverBenchmarkResult.getSingleBenchmarkResultList().get(singleBenchmarkResultIndex); if (singleBenchmarkResult != null) { SingleBenchmarkRunner singleBenchmarkRunner = new SingleBenchmarkRunner(singleBenchmarkResult); Future<SingleBenchmarkRunner> future = warmUpExecutorCompletionService.submit(singleBenchmarkRunner); futureMap.put(future, singleBenchmarkRunner); singleBenchmarkResultIndexMap.put(solverBenchmarkResult, singleBenchmarkResultIndex + 1); } } }</code><technical_language>overwrite instead of shorten? If a warmup budget of 1000 seconds in this cycle, a solver config a termination set 50 seconds, I run for 50 seconds dataset 1, 50 seconds dataset 2, etc</technical_language>

Target:
private void warmUpPopulate(Map<Future<SingleBenchmarkRunner>, SingleBenchmarkRunner> futureMap, ConcurrentMap<SolverBenchmarkResult, Integer> singleBenchmarkResultIndexMap, SolverBenchmarkResult[] solverBenchmarkResultArray, long timeLeftPerSolverConfig) { for (SolverBenchmarkResult solverBenchmarkResult : solverBenchmarkResultArray) { TerminationConfig originalTerminationConfig = solverBenchmarkResult.getSolverConfig().getTerminationConfig(); TerminationConfig tmpTerminationConfig = originalTerminationConfig == null ? new TerminationConfig() : originalTerminationConfig.clone(); tmpTerminationConfig.shortenTimeMillisSpentLimit(timeLeftPerSolverConfig); solverBenchmarkResult.getSolverConfig().setTerminationConfig(tmpTerminationConfig); Integer singleBenchmarkResultIndex = singleBenchmarkResultIndexMap.get(solverBenchmarkResult); singleBenchmarkResultIndex = (singleBenchmarkResultIndex == null) ? 0 : singleBenchmarkResultIndex % solverBenchmarkResult.getSingleBenchmarkResultList().size(); SingleBenchmarkResult singleBenchmarkResult = solverBenchmarkResult.getSingleBenchmarkResultList().get(singleBenchmarkResultIndex); SingleBenchmarkRunner singleBenchmarkRunner = new SingleBenchmarkRunner(singleBenchmarkResult); Future<SingleBenchmarkRunner> future = warmUpExecutorCompletionService.submit(singleBenchmarkRunner); futureMap.put(future, singleBenchmarkRunner); singleBenchmarkResultIndexMap.put(solverBenchmarkResult, singleBenchmarkResultIndex + 1); } }