void (@NotNull SerializedStubTree prebuiltStubTree, @NotNull FileContent fileContent, @NotNull StubBuilderType type) { try { Stub stub = StubTreeBuilder.buildStubTree(fileContent, type); if (stub == null) { return; } SerializedStubTree actualTree = SerializedStubTree.serializeStub(stub, mySerializationManager, myStubIndexesExternalizer); if (!IndexDataComparer.INSTANCE.areStubTreesTheSame(actualTree, prebuiltStubTree)) { throw new RuntimeExceptionWithAttachments( "Prebuilt stub tree does not match actual stub tree", new Attachment("actual-stub-tree.txt", IndexDataPresenter.INSTANCE.getPresentableSerializedStubTree(actualTree)), new Attachment("prebuilt-stub-tree.txt", IndexDataPresenter.INSTANCE.getPresentableSerializedStubTree(prebuiltStubTree)) ); } } catch (IOException e) { throw new RuntimeException(e); } }