private @NotNull RuntimeException doCreateCompleteException() {
      StubTreeLoader instance = getInstance();
      StubTree stubTreeFromIndex = (StubTree)instance.readFromVFile(project, file);

      String msg = coarseMessage;
      msg += "\nlatestIndexedStub=" + stubTreeFromIndex;
      if (stubTreeFromIndex != null) {
        if (stubTreePlainListSize != -1) {
          msg += "\n   same size=" + (stubTreePlainListSize == stubTreeFromIndex.getPlainList().size());
        }
        msg += "\n   debugInfo=" + stubTreeFromIndex.getDebugInfo();
      }

      if (stubTreeFromIndex != null) {
        coarseAttachments.add(new Attachment("stubTreeFromIndex.txt", ((PsiFileStubImpl<?>)stubTreeFromIndex.getRoot()).printTree()));
      }
      Attachment[] attachments = coarseAttachments.toArray(Attachment.EMPTY_ARRAY);

      // separate methods and separate exception classes for EA to treat these situations differently
      return instance.hasPsiInManyProjects(file) ? handleManyProjectsMismatch(msg, attachments, cause) :
             upToDate ? handleUpToDateMismatch(msg, attachments, cause) :
             new RuntimeExceptionWithAttachments(msg, cause, attachments);
    }
private @NotNull RuntimeException doCreateCompleteException()