<commit_before>package graphql.kickstart.tools.resolver

import graphql.kickstart.tools.MissingFieldResolverHandler
import graphql.kickstart.tools.MissingResolverInfo
import graphql.kickstart.tools.SchemaParserOptions
import graphql.kickstart.tools.TypeClassMatcher
import graphql.language.FieldDefinition
import graphql.schema.DataFetcher
import graphql.schema.DataFetchingEnvironment

internal class MissingFieldResolver(
    field: FieldDefinition,
    options: SchemaParserOptions
) : FieldResolver(field, FieldResolverScanner.Search(Any::class.java, MissingResolverInfo(), null), options, Any::class.java) {

    override fun scanForMatches(): List<TypeClassMatcher.PotentialMatch> = listOf()
    override fun createDataFetcher(): DataFetcher<*> {
        val handler = options.missingFieldResolverHandler ?: return NotImplementedMissingFieldDataFetcher()
        return MissingFieldDataFetcher(handler)
    }

    class MissingFieldDataFetcher(private val handler: MissingFieldResolverHandler) : DataFetcher<Any?> {
        override fun get(p0: DataFetchingEnvironment?): Any? {
            return handler.resolve(p0)
        }
    }

    class NotImplementedMissingFieldDataFetcher : DataFetcher<Any?> {
        override fun get(p0: DataFetchingEnvironment?): Any? {
            TODO("Schema resolver not implemented")
        }
    }
}<commit_msg>Rename parameter.<commit_after>package graphql.kickstart.tools.resolver

import graphql.kickstart.tools.MissingFieldResolverHandler
import graphql.kickstart.tools.MissingResolverInfo
import graphql.kickstart.tools.SchemaParserOptions
import graphql.kickstart.tools.TypeClassMatcher
import graphql.language.FieldDefinition
import graphql.schema.DataFetcher
import graphql.schema.DataFetchingEnvironment

internal class MissingFieldResolver(
    field: FieldDefinition,
    options: SchemaParserOptions
) : FieldResolver(field, FieldResolverScanner.Search(Any::class.java, MissingResolverInfo(), null), options, Any::class.java) {

    override fun scanForMatches(): List<TypeClassMatcher.PotentialMatch> = listOf()
    override fun createDataFetcher(): DataFetcher<*> {
        val handler = options.missingFieldResolverHandler ?: return NotImplementedMissingFieldDataFetcher()
        return MissingFieldDataFetcher(handler)
    }

    class MissingFieldDataFetcher(private val handler: MissingFieldResolverHandler) : DataFetcher<Any?> {
        override fun get(env: DataFetchingEnvironment?): Any? {
            return handler.resolve(env)
        }
    }

    class NotImplementedMissingFieldDataFetcher : DataFetcher<Any?> {
        override fun get(env: DataFetchingEnvironment?): Any? {
            TODO("Schema resolver not implemented")
        }
    }
}
{'fraction_non_alphanumeric': 0.08354803091645197, 'fraction_numerical': 0.001104158998895841, 'mean_word_length': 4.921568627450981, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '140956', 'n_tokens_mistral': 730, 'n_tokens_neox': 726, 'n_words': 141}