<commit_before>package org.nnsoft.hazelmap;

/*
 *    Copyright 2011 The 99 Software Foundation
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

import java.io.Serializable;

import org.nnsoft.hazelmap.builder.MapperBuilder;

public final class Hazelmap
{

    public static <K extends Serializable, V extends Serializable> MapperBuilder<K, V> processInput( InputReader<K, V> inputReader )
    {
        if ( inputReader == null )
        {
            throw new IllegalArgumentException( "The inputReader cannot be null" );
        }

        return null;
    }

    /**
     * Hidden constructor, this class must not be instantiated directly.
     */
    private Hazelmap()
    {
        // do nothing
    }

}<commit_msg>a first step of fluent APIs implementation<commit_after>package org.nnsoft.hazelmap;

/*
 *    Copyright 2011 The 99 Software Foundation
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

import java.io.Serializable;

import org.nnsoft.hazelmap.builder.MapReduceInvoker;
import org.nnsoft.hazelmap.builder.MapperBuilder;
import org.nnsoft.hazelmap.builder.ReducerBuilder;

import com.hazelcast.core.MultiMap;

public final class Hazelmap
{

    public static <K extends Serializable, V extends Serializable> MapperBuilder<K, V> processInput( InputReader<K, V> inputReader )
    {
        if ( inputReader == null )
        {
            throw new IllegalArgumentException( "The inputReader cannot be null" );
        }

        return new DefaultMapperBuilder<K, V>( inputReader );
    }

    /**
     * Hidden constructor, this class must not be instantiated directly.
     */
    private Hazelmap()
    {
        // do nothing
    }

    private static final class DefaultMapperBuilder<IK extends Serializable, IV extends Serializable>
        implements MapperBuilder<IK, IV>
    {

        private final InputReader<IK, IV> inputReader;

        DefaultMapperBuilder( InputReader<IK, IV> inputReader )
        {
            this.inputReader = inputReader;
        }

        public <OK extends Serializable, OV extends Serializable> ReducerBuilder<IK, IV, OK, OV> usingMapper( Mapper<IK, IV, OK, OV> mapper )
        {
            return new DefaultReducerBuilder<IK, IV, OK, OV>();
        }

    }

    private static final class DefaultReducerBuilder<IK extends Serializable, IV extends Serializable, OK extends Serializable, OV extends Serializable>
        implements ReducerBuilder<IK, IV, OK, OV>
    {

        public MapReduceInvoker<IK, IV, OK, OV> withReducer( Reducer<OK, OV> reducer )
        {
            return new DefaultMapReduceInvoker<IK, IV, OK, OV>();
        }

    }

    private static final class DefaultMapReduceInvoker<IK extends Serializable, IV extends Serializable, OK extends Serializable, OV extends Serializable>
        implements MapReduceInvoker<IK, IV, OK, OV>
    {

        public MultiMap<OK, OV> invoke()
        {
            return null;
        }

        public <O> O invoke( OutputWriter<OK, OV, O> outputWriter )
        {
            return null;
        }

    }

}
{'fraction_non_alphanumeric': 0.07789371511768989, 'fraction_numerical': 0.0048531909730647905, 'mean_word_length': 2.730316742081448, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5317799', 'n_tokens_mistral': 1169, 'n_tokens_neox': 1106, 'n_words': 405}