private static List<Integer> collectClosingBraceOffsets(String s) {
    List<Integer> singleBraces = null;
    int i = -1;
    while ((i = getAVTEndOffset(s, i)) != -1) {
      if (singleBraces == null) {
        singleBraces = new SmartList<>();
      }
      if (i == 0 || s.charAt(i - 1) != '{') {
        singleBraces.add(i);
      }
    }
    return singleBraces;
  }
private static List<Integer> collectClosingBraceOffsets(String s)