String (@Nullable String knownHeapDumpPath) { String result = """ Error description: This error means that the object is expected to be collected by the garbage collector by this time, but it was not. Please make sure you dispose your resources properly. See https://plugins.jetbrains.com/docs/intellij/disposers.html"""; if (TeamCityLogger.isUnderTC) { result+="\n You can find a memory snapshot `" +TestApplicationKt.LEAKED_PROJECTS +".hproof.zip` in the \"Artifacts\" tab of the build run."; result+="\n If you suspect a particular test, you can reproduce the problem locally " + "calling TestApplicationManager.testProjectLeak() after the test."; } else if (knownHeapDumpPath != null) { result += "\n Please see ``" + knownHeapDumpPath + "` for a memory dump"; } else { result += "\n Try looking for '"+DumpKt.HEAP_DUMP_IS_PUBLISHED +"' line in the system output log below. It contains a path to a collected memory snapshot"; } return result; }