public void setProjectTasks(@NotNull Project project, @NotNull Set<Task> tasks) {
    ProjectIdentifier projectIdentifier = GradleProjectUtil.getProjectIdentifier(project);
    Set<Task> previousTasks = allTasks.put(projectIdentifier, tasks);
    if (previousTasks != null) {
      context.getMessageReporter().createMessage()
        .withGroup(Messages.TASK_INDEX_CACHE_SET_GROUP)
        .withTitle("Task model redefinition")
        .withText("Tasks for " + project.getDisplayName() + " was already collected.")
        .withInternal().withStackTrace()
        .withKind(Message.Kind.ERROR)
        .reportMessage(project);
    }
  }
public void setProjectTasks(@NotNull Project project, @NotNull Set<Task> tasks)