public boolean shouldDefer(StringAppender inBuf) {
    char[] buffer = new char[inBuf.length()];
    inBuf.getChars(0, inBuf.length(), buffer, 0);

    depth = cdepth = 0;
    for (int i = 0; i < buffer.length; i++) {
      switch (buffer[i]) {
        case '/':
          if (i + 1 < buffer.length && buffer[i + 1] == '*') {
            cdepth++;
          }
          break;
        case '*':
          if (i + 1 < buffer.length && buffer[i + 1] == '/') {
            cdepth--;
          }
          break;

        case '{':
          depth++;
          break;
        case '}':
          depth--;
          break;
      }
    }

    return depth + cdepth > 0;
  }