void (@Nullable ProductionMarker marker) { int index = marker != null ? marker.getStartIndex() + 1 : myLexStarts.length; CharSequence context = index < myLexStarts.length ? myText.subSequence(Math.max(0, myLexStarts[index] - 1000), myLexStarts[index]) : "<none>"; String language = myFile != null ? myFile.getLanguage() + ", " : ""; LOG.error(UNBALANCED_MESSAGE + "\nlanguage: " + language + "\ncontext: '" + context + "'" + "\nmarker id: " + (marker == null ? "n/a" : marker.markerId)); }