<commit_before>package com.afrozaar.wordpress.wpapi.v2.request;

import com.google.common.collect.ImmutableMap;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

public class SearchRequest<T> extends Request {

    public SearchRequest(String uri, Map<String, List<String>> params) {
        super(uri, params);
    }

    public static <T> SearchRequest<T> posts() {
        return Builder.<T>aSearchRequest().build();
    }

    public static class Builder<BT> {
        ImmutableMap.Builder<String, List<String>> paramBuilder = new ImmutableMap.Builder<>();
        String uri = Request.POSTS;

        private Builder() {
        }

        public static <BT> Builder<BT> aSearchRequest() {
            return new Builder<>();
        }

        public Builder<BT> withParam(String key, String... values) {
            paramBuilder.put(key, Arrays.asList(values));
            return this;
        }

        public Builder<BT> withParams(Map<String, List<String>> params) {
            this.paramBuilder.putAll(params);
            return this;
        }

        public Builder<BT> withUri(String uri) {
            this.uri = uri;
            return this;
        }

        public Builder<BT> but() {
            return Builder.<BT>aSearchRequest().withParams(paramBuilder.build()).withUri(uri);
        }

        public SearchRequest<BT> build() {
            return new SearchRequest<>(uri, paramBuilder.build());
        }
    }
}
<commit_msg>Make it clearer how SearchRequest.posts() get its context.<commit_after>package com.afrozaar.wordpress.wpapi.v2.request;

import com.google.common.collect.ImmutableMap;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

public class SearchRequest<T> extends Request {

    public SearchRequest(String uri, Map<String, List<String>> params) {
        super(uri, params);
    }

    public static <T> SearchRequest<T> posts() {
        return Builder.<T>aSearchRequest()
                .withUri(Request.POSTS)
                .build();
    }

    public static class Builder<BT> {
        ImmutableMap.Builder<String, List<String>> paramBuilder = new ImmutableMap.Builder<>();
        String uri = Request.POSTS;

        private Builder() {
        }

        public static <BT> Builder<BT> aSearchRequest() {
            return new Builder<>();
        }

        public Builder<BT> withParam(String key, String... values) {
            paramBuilder.put(key, Arrays.asList(values));
            return this;
        }

        public Builder<BT> withParams(Map<String, List<String>> params) {
            this.paramBuilder.putAll(params);
            return this;
        }

        public Builder<BT> withUri(String uri) {
            this.uri = uri;
            return this;
        }

        public Builder<BT> but() {
            return Builder.<BT>aSearchRequest().withParams(paramBuilder.build()).withUri(uri);
        }

        public SearchRequest<BT> build() {
            return new SearchRequest<>(uri, paramBuilder.build());
        }
    }
}

{'fraction_non_alphanumeric': 0.11845549738219895, 'fraction_numerical': 0.0006544502617801048, 'mean_word_length': 2.3228260869565216, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4742232', 'n_tokens_mistral': 857, 'n_tokens_neox': 835, 'n_words': 189}