<commit_before>package com.github.dreamhead.moco.parser.model;

import com.github.dreamhead.moco.Moco;
import com.github.dreamhead.moco.RequestExtractor;
import com.google.common.base.Predicate;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;

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

import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.not;
import static com.google.common.base.Predicates.or;
import static com.google.common.collect.ImmutableList.copyOf;
import static com.google.common.collect.Iterables.concat;

public class Dynamics {
    private static final Map<String, String> EXTRACTORS = ImmutableMap.<String, String>builder()
            .put("headers", "header")
            .put("queries", "query")
            .put("xpaths", "xpath")
            .put("jsonPaths", "jsonPath")
            .put("cookies", "cookie")
            .put("forms", "form")
            .build();

    protected Predicate<Field> isClassField() {
        return new Predicate<Field>() {
            @Override
            public boolean apply(final Field field) {
                return "class".equals(field.getName());
            }
        };
    }

    protected Predicate<Field> isFinalField() {
        return new Predicate<Field>() {
            @Override
            public boolean apply(final Field field) {
                return Modifier.isFinal(field.getModifiers());
            }
        };
    }

    protected <T> Predicate<Field> fieldExist(final T target) {
        return new Predicate<Field>() {
            @Override
            public boolean apply(final Field field) {<commit_msg>added missing final to dynamics<commit_after>package com.github.dreamhead.moco.parser.model;

import com.github.dreamhead.moco.Moco;
import com.github.dreamhead.moco.RequestExtractor;
import com.google.common.base.Predicate;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;

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

import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.not;
import static com.google.common.base.Predicates.or;
import static com.google.common.collect.ImmutableList.copyOf;
import static com.google.common.collect.Iterables.concat;

public final class Dynamics {
    private static final Map<String, String> EXTRACTORS = ImmutableMap.<String, String>builder()
            .put("headers", "header")
            .put("queries", "query")
            .put("xpaths", "xpath")
            .put("jsonPaths", "jsonPath")
            .put("cookies", "cookie")
            .put("forms", "form")
            .build();

    protected Predicate<Field> isClassField() {
        return new Predicate<Field>() {
            @Override
            public boolean apply(final Field field) {
                return "class".equals(field.getName());
            }
        };
    }

    protected Predicate<Field> isFinalField() {
        return new Predicate<Field>() {
            @Override
            public boolean apply(final Field field) {
                return Modifier.isFinal(field.getModifiers());
            }
        };
    }

    protected <T> Predicate<Field> fieldExist(final T target) {
        return new Predicate<Field>() {
            @Override
            public boolean apply(final Field field) {
{'fraction_non_alphanumeric': 0.11824324324324324, 'fraction_numerical': 0.0, 'mean_word_length': 2.7243186582809225, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '19956', 'n_tokens_mistral': 998, 'n_tokens_neox': 981, 'n_words': 209}