Source:
<code>private Collection<EvaluatorParameters> generateEvaluatorParameters(final int numComputeTasks, final int[] dataUnitsArray) { final List<EvaluatorParameters> ret = new ArrayList<>(numComputeTasks + 1); double maxComputeTaskEndTime = 0D; for (int i = 0; i < numComputeTasks; ++i) { final List<DataInfo> cmpTaskDataInfos = new ArrayList<>(1); int sumDataUnits = 0; for (int j = 0; j < dataUnitsArray.length; ++j) { final int dataUnitsPerEval = dataUnitsArray[j] / numComputeTasks; final int dataUnits = (i == 0) ? dataUnitsPerEval + (dataUnitsArray[j] % numComputeTasks) : dataUnitsPerEval; <START> cmpTaskDataInfos.add(new DataInfoImpl("testType-" + j, dataUnits)); <END> sumDataUnits += dataUnits; } final Map<String, Double> cmpTaskMetrics = new HashMap<>(); final double computeTaskEndTime = (random.nextDouble() + 1) * sumDataUnits; if (computeTaskEndTime > maxComputeTaskEndTime) { maxComputeTaskEndTime = computeTaskEndTime; } cmpTaskMetrics.put(DolphinMetricKeys.COMPUTE_TASK_USER_COMPUTE_TASK_START, 0D); cmpTaskMetrics.put(DolphinMetricKeys.COMPUTE_TASK_USER_COMPUTE_TASK_END, computeTaskEndTime); ret.add(new EvaluatorParametersImpl(ComputeTask.TASK_ID_PREFIX + i, cmpTaskDataInfos, cmpTaskMetrics)); } final Map<String, Double> metrics = new HashMap<>(); metrics.put(DolphinMetricKeys.CONTROLLER_TASK_SEND_DATA_START, 0D); metrics.put(DolphinMetricKeys.CONTROLLER_TASK_RECEIVE_DATA_END, maxComputeTaskEndTime + random.nextInt(50)); ret.add(new EvaluatorParametersImpl(ControllerTask.TASK_ID_PREFIX + 2, new ArrayList<DataInfo>(0), metrics)); return ret; }</code><technical_language>String.format() in other files. Please too</technical_language>

Target:
private Collection<EvaluatorParameters> generateEvaluatorParameters(final int numComputeTasks, final int[] dataUnitsArray) { final List<EvaluatorParameters> ret = new ArrayList<>(numComputeTasks + 1); double maxComputeTaskEndTime = 0D; for (int i = 0; i < numComputeTasks; ++i) { final List<DataInfo> cmpTaskDataInfos = new ArrayList<>(1); int sumDataUnits = 0; for (int j = 0; j < dataUnitsArray.length; ++j) { final int dataUnitsPerEval = dataUnitsArray[j] / numComputeTasks; final int dataUnits = (i == 0) ? dataUnitsPerEval + (dataUnitsArray[j] % numComputeTasks) : dataUnitsPerEval; cmpTaskDataInfos.add(new DataInfoImpl(String.format("testType-%d", j), dataUnits)); sumDataUnits += dataUnits; } final Map<String, Double> cmpTaskMetrics = new HashMap<>(); final double computeTaskEndTime = (random.nextDouble() + 1) * sumDataUnits; if (computeTaskEndTime > maxComputeTaskEndTime) { maxComputeTaskEndTime = computeTaskEndTime; } cmpTaskMetrics.put(DolphinMetricKeys.COMPUTE_TASK_USER_COMPUTE_TASK_START, 0D); cmpTaskMetrics.put(DolphinMetricKeys.COMPUTE_TASK_USER_COMPUTE_TASK_END, computeTaskEndTime); ret.add(new EvaluatorParametersImpl(ComputeTask.TASK_ID_PREFIX + i, cmpTaskDataInfos, cmpTaskMetrics)); } final Map<String, Double> metrics = new HashMap<>(); metrics.put(DolphinMetricKeys.CONTROLLER_TASK_SEND_DATA_START, 0D); metrics.put(DolphinMetricKeys.CONTROLLER_TASK_RECEIVE_DATA_END, maxComputeTaskEndTime + random.nextInt(50)); ret.add(new EvaluatorParametersImpl(ControllerTask.TASK_ID_PREFIX + 2, new ArrayList<DataInfo>(0), metrics)); return ret; }