<commit_before>package volley.core.network;

import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.VolleyError;

import java.util.Map;

public abstract class CoreBaseRequest<T> {

    /**
     * @return base url of the server
     */
    protected abstract String baseUrl();

    /**
     * GET, POST, PUT, DELETE
     * @return integer value of Http Method
     */
    protected abstract int httpMethod();

    /**
     * @return the url path that will be concatenated
     */
    protected abstract String path();

    /**
     * @return response class of the action<commit_msg>get HTTP method name using reflection<commit_after>package volley.core.network;

import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.VolleyError;

import java.lang.reflect.Field;
import java.util.Map;

public abstract class CoreBaseRequest<T> {

    /**
     * @return base url of the server
     */
    protected abstract String baseUrl();

    /**
     * GET, POST, PUT, DELETE
     * @return integer value of Http Method
     */
    protected abstract int httpMethod();

    /**
     * @param methodCode integer value of HTTP Methods
     * @return String value of HTTP Methods defined in {@link com.android.volley.Request.Method}
     */
    public static String getMethodName(int methodCode) throws IllegalAccessException {
        Field[] fields = Request.Method.class.getDeclaredFields();

        for (Field field : fields) {
            if (methodCode == field.getInt(null)) {
                return field.getName();
            }
        }

        return null;
    }

    /**
     * @return the url path that will be concatenated
     */
    protected abstract String path();

    /**
     * @return response class of the action
{'fraction_non_alphanumeric': 0.09850581073602656, 'fraction_numerical': 0.0, 'mean_word_length': 2.6087824351297404, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2495786', 'n_tokens_mistral': 501, 'n_tokens_neox': 481, 'n_words': 156}