Source:
<code>private synchronized void display() { try { token.acquire(); if ((searchFilteredList.size() > 0) && (pageIndex <= searchFilteredList.size())) { builder.append("<html><body><table cellpadding=0 cellspacing=0>"); builder.append(buildString(searchFilteredList.get(pageIndex-1).getMessages())); } else { builder.replace(0, builder.length(), ""); builder.append("<b>") .append(Res.getString("message.no.history.found")) .append("</b>"); } window.setText(builder.toString()); try { String text = searchQuery; Document doc = window.getDocument(); String line; if (text.length() > 0 && focusFlag) { String str = doc.getText(1, doc.getLength()); BufferedReader buf = new BufferedReader(new StringReader(str)); int globalPos = 1; while ((line = buf.readLine()) != null){ Matcher matcherTime = Pattern .compile("\\(\\d\\d:\\d\\d:\\d\\d\\)\\s[a-zA-Z0-9]+:\\s") .matcher(line); if (matcherTime.find()) { for (int i = matcherTime.end(); i + text.length() < line.length() + 1; i++) { String match = line.substring(i, i + text.length()); <START> if (text.toLowerCase().equals(match.toLowerCase())) { <END> window.getHighlighter().addHighlight(globalPos + i, globalPos + i + text.length(), highlighter); } } } globalPos = globalPos + line.length() + 1; } } } catch (BadLocationException | IOException ex) { ex.printStackTrace(); } builder.replace(0, builder.length(), ""); if (window.getText().length() > 0) window.setCaretPosition(0); pageCounter.setText(pageIndex + " / " + maxPages); token.release(); } catch (InterruptedException e) { Log.error(e); e.printStackTrace(); } }</code><technical_language>This same, is easier eyes: text.equalsIgnoreCase( match )</technical_language>

Target:
private synchronized void display() { try { token.acquire(); if ((searchFilteredList.size() > 0) && (pageIndex <= searchFilteredList.size())) { builder.append("<html><body><table cellpadding=0 cellspacing=0>"); builder.append(buildString(searchFilteredList.get(pageIndex-1).getMessages())); } else { builder.replace(0, builder.length(), ""); builder.append("<b>") .append(Res.getString("message.no.history.found")) .append("</b>"); } window.setText(builder.toString()); try { String text = searchQuery; Document doc = window.getDocument(); String line; if (text.length() > 0 && focusFlag) { String str = doc.getText(1, doc.getLength()); BufferedReader buf = new BufferedReader(new StringReader(str)); int globalPos = 1; while ((line = buf.readLine()) != null){ Matcher matcherTime = Pattern .compile("\\(\\d\\d:\\d\\d:\\d\\d\\)\\s[a-zA-Z0-9]+:\\s") .matcher(line); if (matcherTime.find()) { for (int i = matcherTime.end(); i + text.length() < line.length() + 1; i++) { String match = line.substring(i, i + text.length()); if (text.equalsIgnoreCase(match)) { window.getHighlighter().addHighlight(globalPos + i, globalPos + i + text.length(), highlighter); } } } globalPos = globalPos + line.length() + 1; } } } catch (BadLocationException | IOException ex) { Log.error(ex); ex.printStackTrace(); } builder.replace(0, builder.length(), ""); if (window.getText().length() > 0) window.setCaretPosition(0); pageCounter.setText(pageIndex + " / " + maxPages); token.release(); } catch (InterruptedException e) { Log.error(e); e.printStackTrace(); } }