Buggy code:
private void visitRestElementsAndCleanup ( @ NotNull final ProgressIndicator indicator , @ NotNull final List < PsiElement > elements , @ NotNull final LocalInspectionToolSession session , @ NotNull List < LocalInspectionsPass . InspectionContext > init ) { } void inspectInjectedPsi ( @ NotNull final List < PsiElement > elements , final boolean onTheFly , @ NotNull final ProgressIndicator indicator , @ NotNull final InspectionManager iManager , final boolean inVisibleRange , final boolean checkDumbAwareness , @ NotNull final List < LocalInspectionToolWrapper > wrappers ) { } @ Nullable private HighlightInfo highlightInfoFromDescriptor ( @ NotNull ProblemDescriptor problemDescriptor , @ NotNull HighlightInfoType highlightInfoType , @ NotNull String message , String toolTip , PsiElement psiElement ) { } private final Map < TextRange , RangeMarker > ranges2markersCache = new gnu . trove . THashMap < TextRange , RangeMarker > ( ) ; private final TransferToEDTQueue < Trinity < ProblemDescriptor , LocalInspectionToolWrapper , ProgressIndicator > > myTransferToEDTQueue = new TransferToEDTQueue < Trinity < ProblemDescriptor , LocalInspectionToolWrapper , ProgressIndicator > > ( "Apply<seq2seq4repair_space>inspection<seq2seq4repair_space>results" , new com . intellij . util . Processor < Trinity < ProblemDescriptor , LocalInspectionToolWrapper , ProgressIndicator > > ( ) { private final InspectionProfile inspectionProfile = InspectionProjectProfileManager . getInstance ( myProject ) . getInspectionProfile ( ) ; private final InjectedLanguageManager ilManager = InjectedLanguageManager . getInstance ( myProject ) ; private final List < HighlightInfo > infos = new ArrayList < HighlightInfo > ( 2 ) ; private final PsiDocumentManager documentManager = PsiDocumentManager . getInstance ( myProject ) ; @ Override public boolean process ( Trinity < ProblemDescriptor , LocalInspectionToolWrapper , ProgressIndicator > trinity ) { } } , myProject . getDisposed ( ) , 200 ) ; private final Set < Pair < TextRange , String > > emptyActionRegistered = Collections . synchronizedSet ( new gnu . trove . THashSet < Pair < TextRange , String > > ( ) ) ; private void addDescriptorIncrementally ( @ NotNull final ProblemDescriptor descriptor , @ NotNull final LocalInspectionToolWrapper tool , @ NotNull final ProgressIndicator indicator ) { } private void appendDescriptors ( @ NotNull PsiFile file , @ NotNull List < ProblemDescriptor > descriptors , @ NotNull LocalInspectionToolWrapper tool ) { } private void appendResult ( @ NotNull PsiFile file , @ NotNull LocalInspectionsPass . InspectionResult result ) { } @ Override protected void applyInformationWithProgress ( ) { } private void addHighlightsFromResults ( @ NotNull List < HighlightInfo > outInfos , @ NotNull ProgressIndicator indicator ) { } private void createHighlightsForDescriptor ( @ NotNull List < HighlightInfo > outInfos , @ NotNull Set < Pair < TextRange , String > > emptyActionRegistered , @ NotNull InjectedLanguageManager ilManager , @ NotNull PsiFile file , @ NotNull Document documentRange , @ NotNull LocalInspectionToolWrapper toolWrapper , @ NotNull HighlightSeverity severity , @ NotNull ProblemDescriptor descriptor , @ NotNull PsiElement element ) { } private PsiFile getTopLevelFileInBaseLanguage ( @ NotNull PsiElement element ) { } @ Nullable private HighlightInfo createHighlightInfo ( @ NotNull ProblemDescriptor descriptor , @ NotNull LocalInspectionToolWrapper tool , @ NotNull HighlightInfoType level , @ NotNull Set < Pair < TextRange , String > > emptyActionRegistered , @ NotNull PsiElement element ) { @ NonNls String message = ProblemDescriptorUtil . renderDescriptionMessage ( descriptor , element ) ; final HighlightDisplayKey key = HighlightDisplayKey . find ( tool . getShortName ( ) ) ; final InspectionProfile inspectionProfile = myProfileWrapper . getInspectionProfile ( ) ; if ( ! ( inspectionProfile . isToolEnabled ( key , getFile ( ) ) ) ) return null ; HighlightInfoType type = new HighlightInfoType . HighlightInfoTypeImpl ( level . getSeverity ( element ) , level . getAttributesKey ( ) ) ; final String plainMessage = ( message . startsWith ( "<html>" ) ) ? StringUtil . unescapeXml ( XmlStringUtil . stripHtml ( message ) . replaceAll ( "<[^>]*>" , "" ) ) : message ; @ NonNls final String link = ( ( ( ( ( ( ( "<seq2seq4repair_space><a<seq2seq4repair_space>" + "href=\"#inspection//" ) + ( tool . getShortName ( ) ) ) + "\"" ) + ( UIUtil . isUnderDarcula ( ) ? "<seq2seq4repair_space>color=\"7AB4C9\"<seq2seq4repair_space>" : "" ) ) + ">" ) + ( DaemonBundle . message ( "inspection.extended.description" ) ) ) + "<//a><seq2seq4repair_space>" ) + ( myShortcutText ) ; @ NonNls String tooltip = null ; if ( descriptor . showTooltip ( ) ) { <START_BUG> tooltip = ( XmlStringUtil . wrapInHtml ( ( message . startsWith ( "<html>" ) ? XmlStringUtil . stripHtml ( message ) : XmlStringUtil . escapeString ( message ) ) ) ) + link ; <END_BUG> } HighlightInfo highlightInfo = highlightInfoFromDescriptor ( descriptor , type , plainMessage , tooltip , element ) ; if ( highlightInfo != null ) { LocalInspectionsPass . registerQuickFixes ( tool , descriptor , highlightInfo , emptyActionRegistered ) ; } return highlightInfo ; } private static void registerQuickFixes ( @ NotNull LocalInspectionToolWrapper tool , @ NotNull ProblemDescriptor descriptor , @ NotNull HighlightInfo highlightInfo , @ NotNull Set < Pair < TextRange , String > > emptyActionRegistered ) { } @ NotNull private static List < PsiElement > getElementsFrom ( @ NotNull PsiFile file ) { } @ NotNull List < LocalInspectionToolWrapper > getInspectionTools ( @ NotNull InspectionProfileWrapper profile ) { } private void doInspectInjectedPsi ( @ NotNull PsiFile injectedPsi , final boolean isOnTheFly , @ NotNull final ProgressIndicator indicator , @ NotNull InspectionManager iManager , final boolean inVisibleRange , @ NotNull List < LocalInspectionToolWrapper > wrappers , boolean checkDumbAwareness ) { } @ Override @ NotNull public List < HighlightInfo > getInfos ( ) { } private static class InspectionResult { @ NotNull private final LocalInspectionToolWrapper tool ; @ NotNull private final List < ProblemDescriptor > foundProblems ; private InspectionResult ( @ NotNull LocalInspectionToolWrapper tool , @ NotNull List < ProblemDescriptor > foundProblems ) { }

Fix:
tooltip = XmlStringUtil . wrapInHtml ( ( ( message . startsWith ( "<html>" ) ? XmlStringUtil . stripHtml ( message ) : XmlStringUtil . escapeString ( message ) ) + link ) ) ;