presto-benchmark-driver/src/main/java/io/prestosql/benchmark/driver/RegexTemplate.java/RegexTemplate/RegexTemplate
class RegexTemplate:    public RegexTemplate(String template)
    {
        this.template = requireNonNull(template, "template is null");

        try {
            this.pattern = Pattern.compile(template);
        }
        catch (Exception e) {
            throw new IllegalArgumentException("Invalid template: " + template, e);
        }

        Map<String, Integer> namedGroups;
        try {
            namedGroups = (Map<String, Integer>) NAMED_GROUPS_METHOD.invoke(pattern);
        }
        catch (ReflectiveOperationException e) {
            throw new RuntimeException(e);
        }
        ImmutableSortedMap<Integer, String> sortedGroups = ImmutableSortedMap.copyOf(ImmutableBiMap.copyOf(namedGroups).inverse());
        this.fieldNames = ImmutableList.copyOf(sortedGroups.values());
    }