public void compose(@NotNull StringBuilder buf, RefEntity refEntity, boolean toExternalHtml) {
    if (toExternalHtml) {
      genPageHeader(buf, refEntity);
    }

    if (refEntity instanceof RefElementImpl refElement) {
      if (refElement.isSuspicious() && !refElement.isEntry()) {
        appendHeading(buf, AnalysisBundle.message("inspection.problem.synopsis"));
        startProblemDescription(buf);
        appendProblemSynopsis(refElement, buf);
        doneProblemDescription(buf);

        if (toExternalHtml) {
          appendResolution(buf, refElement, DescriptorComposer.quickFixTexts(refElement, myToolPresentation));
        }
        refElement.accept(new RefJavaVisitor() {
          @Override
          public void visitClass(@NotNull RefClass aClass) {
            appendClassInstantiations(buf, aClass);
            myComposer.appendDerivedClasses(buf, aClass);
            myComposer.appendClassExtendsImplements(buf, aClass);
            myComposer.appendLibraryMethods(buf, aClass);
            myComposer.appendTypeReferences(buf, aClass);
          }

          @Override
          public void visitMethod(@NotNull RefMethod method) {
            appendElementInReferences(buf, method);
            appendElementOutReferences(buf, method);
            myComposer.appendDerivedMethods(buf, method);
            myComposer.appendDerivedFunctionalExpressions(buf, method);
            myComposer.appendSuperMethods(buf, method);
          }

          @Override
          public void visitField(@NotNull RefField field) {
            appendElementInReferences(buf, field);
            appendElementOutReferences(buf, field);
          }
        });
      } else {
        appendNoProblems(buf);
      }
      appendCallersList(refElement, buf, new HashSet<>(), true);
    }
  }
public void compose(@NotNull StringBuilder buf, RefEntity refEntity, boolean toExternalHtml)