Object () { if (myDiscoveryIndex == null) { Project project = ProjectManager.getInstance().getDefaultProject(); try { myDiscoveryIndexClass = Class.forName("com.intellij.execution.testDiscovery.TestDiscoveryIndex"); myDiscoveryIndex = myDiscoveryIndexClass .getConstructor(Path.class) .newInstance(Path.of(myTracesFile)); } catch (Throwable e) { e.printStackTrace(); } } return myDiscoveryIndex; }