private void appendSource(
     final StringBuilder builder,
     final int start,
     final int end,
     boolean escapeSource,
     boolean sourceEscaped) {
   if (sourceEscaped == escapeSource) {
     append(builder, codePoints.substring(start, end), escapeSource, sourceEscaped);
   } else if (escapeSource) {
     append(builder, escape(codePoints.substring(start, end)), true, sourceEscaped);
   } else {
     append(builder, unescape(codePoints.substring(start, end)), false, sourceEscaped);
   }
 }
 public HtmlBuilder(
     final String source,
     final boolean strict,
     final boolean sourceIsEscaped,
     final boolean shouldReEscape) {
   if (source == null) throw new NullPointerException();
   this.source = source;
   this.codePoints = new CodePointArray(source);
   this.throwExceptions = strict;
   this.sourceIsEscaped = sourceIsEscaped;
   this.shouldReEscape = shouldReEscape;
   this.codePointsLength = codePoints.length();
 }