<commit_before>package org.minijax;

import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Map;

import javax.ws.rs.core.Cookie;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;

import org.minijax.util.LocaleUtils;
import org.minijax.util.MediaTypeUtils;

public abstract class MinijaxHttpHeaders implements HttpHeaders {
    protected Map<String, Cookie> cookies;
    protected List<Locale> acceptableLanguages;
    protected List<MediaType> acceptableMediaTypes;

    @Override
    public abstract List<String> getRequestHeader(final String name);

    @Override
    public abstract String getHeaderString(final String name);

    @Override
    public abstract MultivaluedMap<String, String> getRequestHeaders();

    @Override
    public abstract Map<String, Cookie> getCookies();

    @Override
    public List<MediaType> getAcceptableMediaTypes() {
        if (acceptableMediaTypes == null) {
            acceptableMediaTypes = MediaTypeUtils.parseMediaTypes(getHeaderString("Accept"));
        }<commit_msg>Sonar warnings<commit_after>package org.minijax;

import java.util.Date;
import java.util.List;
import java.util.Locale;

import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;

import org.minijax.util.LocaleUtils;
import org.minijax.util.MediaTypeUtils;

public abstract class MinijaxHttpHeaders implements HttpHeaders {
    private List<Locale> acceptableLanguages;
    private List<MediaType> acceptableMediaTypes;

    @Override
    public List<MediaType> getAcceptableMediaTypes() {
        if (acceptableMediaTypes == null) {
            acceptableMediaTypes = MediaTypeUtils.parseMediaTypes(getHeaderString("Accept"));
        }
{'fraction_non_alphanumeric': 0.09132161089052751, 'fraction_numerical': 0.0, 'mean_word_length': 4.617834394904459, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3401391', 'n_tokens_mistral': 507, 'n_tokens_neox': 493, 'n_words': 111}