protected static String formatLine(String line, int tabLength, int currentLineNo) {
        if (line == null) {
            return null;
        }
        StringBuffer lineBuffer = new StringBuffer(Util.escapeHtmlChars(line));
        //Insert an anchor for the line
        lineBuffer.append("<a name=\"line." + Integer.toString(currentLineNo) + "\"></a>");
        lineBuffer.append(DocletConstants.NL);
        Util.replaceTabs(tabLength, lineBuffer);
        return lineBuffer.toString();
    }