private void ensureMyProject(@NotNull Project project) {
    if (project != myProject) {
      boolean basePathEquals = Objects.equals(myProject.getBasePath(), project.getBasePath());
      boolean namesEquals = myProject.getName().equals(project.getName());
      throw new IllegalArgumentException("Element from alien project: "+ anonymize(project) + " expected: " + anonymize(myProject) +
                                         "; basePathEquals: " + basePathEquals + "; nameEquals: " + namesEquals);
    }
  }
private void ensureMyProject(@NotNull Project project)