int taskConfigId = partialTask.getTaskConfigId();
TaskConfig config;
try {
config = deduplicatedSnapshot.getTaskConfigs().get(taskConfigId);
} catch (IndexOutOfBoundsException e) {
throw new CodingException(
"DeduplicatedScheduledTask referenced invalid task index " + taskConfigId, e);
}
scheduledTask.getAssignedTask().setTask(config);
snapshot.addToTasks(scheduledTask);
}