<commit_before>package net.bytebuddy.dynamic.scaffold.inline;

import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.description.type.TypeDefinition;
import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.description.type.generic.GenericTypeDescription;
import net.bytebuddy.matcher.ElementMatcher;
import net.bytebuddy.matcher.LatentMethodMatcher;
import net.bytebuddy.test.utility.MockitoRule;
import net.bytebuddy.test.utility.ObjectPropertyAssertion;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestRule;
import org.mockito.Mock;
import org.objectweb.asm.Opcodes;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.mockito.Mockito.when;

public class InlineImplementationMatcherTest {

    @Rule
    public TestRule mockitoRule = new MockitoRule(this);

    @Mock
    private MethodDescription methodDescription;

    @Mock
    private TypeDescription typeDescription, otherType;

    @Mock
    private GenericTypeDescription genericTypeDescription, otherGenericType;

    @Mock
    private ElementMatcher<? super MethodDescription> ignoredMethods, predefinedMethods;

    private LatentMethodMatcher latentMethodMatcher;

    @Before
    public void setUp() throws Exception {
        latentMethodMatcher = new InliningImplementationMatcher(ignoredMethods, predefinedMethods);
        when(typeDescription.getSort()).thenReturn(TypeDefinition.Sort.NON_GENERIC);
        when(typeDescription.asGenericType()).thenReturn(genericTypeDescription); // TODO
        when(genericTypeDescription.asErasure()).thenReturn(typeDescription);
        when(otherType.getSort()).thenReturn(TypeDefinition.Sort.NON_GENERIC);
        when(otherType.asGenericType()).thenReturn(otherGenericType); // TODO
        when(otherGenericType.asErasure()).thenReturn(otherType);
    }
<commit_msg>Another test fixed.<commit_after>package net.bytebuddy.dynamic.scaffold.inline;

import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.description.type.TypeDefinition;
import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.description.type.generic.GenericTypeDescription;
import net.bytebuddy.matcher.ElementMatcher;
import net.bytebuddy.matcher.LatentMethodMatcher;
import net.bytebuddy.test.utility.MockitoRule;
import net.bytebuddy.test.utility.ObjectPropertyAssertion;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestRule;
import org.mockito.Mock;
import org.objectweb.asm.Opcodes;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.mockito.Mockito.when;

public class InlineImplementationMatcherTest {

    @Rule
    public TestRule mockitoRule = new MockitoRule(this);

    @Mock
    private MethodDescription methodDescription;

    @Mock
    private TypeDescription typeDescription, otherType;

    @Mock
    private GenericTypeDescription genericTypeDescription, otherGenericType;

    @Mock
    private ElementMatcher<? super MethodDescription> ignoredMethods, predefinedMethods;

    private LatentMethodMatcher latentMethodMatcher;

    @Before
    public void setUp() throws Exception {
        latentMethodMatcher = new InliningImplementationMatcher(ignoredMethods, predefinedMethods);
        when(typeDescription.getSort()).thenReturn(TypeDefinition.Sort.NON_GENERIC);
        when(typeDescription.asGenericType()).thenReturn(genericTypeDescription);
        when(genericTypeDescription.asErasure()).thenReturn(typeDescription);
        when(genericTypeDescription.getSort()).thenReturn(TypeDefinition.Sort.NON_GENERIC);
        when(otherGenericType.asErasure()).thenReturn(otherType);
        when(otherGenericType.getSort()).thenReturn(TypeDefinition.Sort.NON_GENERIC);
        when(otherType.asGenericType()).thenReturn(otherGenericType);
    }

{'fraction_non_alphanumeric': 0.08877679697351828, 'fraction_numerical': 0.0, 'mean_word_length': 5.577114427860696, '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': '265197', 'n_tokens_mistral': 1089, 'n_tokens_neox': 1065, 'n_words': 181}