<commit_before>package ru.agolovin;

import java.util.Iterator;
import java.util.Map;
import java.util.Objects;

/**
 * @author agolovin (<EMAIL>)
 * @version $Id$
 * @since 0.1
 */

public class MyMap<T, V> implements Iterable<V> {

    private Node<T, V>[] nodes;
    private int position = 0;

    public MyMap() {
        int capacity = 16;
        this.nodes = new Node[capacity];
    }

    boolean insert(T key, V value) {
        return false;
    }

    private boolean insertVal(int hash, T key, V value) {
        boolean result = false;
        int hashK = hash(key);
        int pos = getPosition(hash, nodes.length);



        if (this.nodes.length == 0 || this.nodes == null || position > (this.nodes.length - 1)) {
            this.nodes = resize();
        }
        return false;
    }

    final Node<T, V>[] resize() {
        int newCapacity = this.nodes.length * 2;
        Node<T, V>[] newTab = (Node<T, V>[]) new Node[newCapacity];
        for (int j = 0; j < this.nodes.length; ++j) {
            Node<T, V> e;
            if ((e = this.nodes[j]) != null) {
                newTab[indexOfTable(e.hash, newCapacity)] = e;
            }
        }
        return newTab;
    }

    V get(T key) {
        return null;
    }

    boolean delete(T key) {
        return false;
    }


    private int hash(Object key) {
        int h = key.hashCode();
        return h ^ (h >>> 16);
    }

    private int getPosition(int hashValue, int length) {
        return (length - 1) & hashValue;
    }


    @Override<commit_msg>add task8 in part5 chapter5 package2<commit_after>package ru.agolovin;

import java.util.Iterator;
import java.util.Map;
import java.util.Objects;

/**
 * @author agolovin (<EMAIL>)
 * @version $Id$
 * @since 0.1
 */

public class MyMap<T, V> implements Iterable<V> {

    private Node<T, V>[] nodes;
    private int position = 0;

    public MyMap() {
        int capacity = 16;
        this.nodes = new Node[capacity];
    }

    boolean insert(T key, V value) {
        return false;
    }

    private boolean insertVal(int hash, T key, V value) {
        boolean result = false;
        int hashK = hash(key);
        int pos = getPosition(hash, nodes.length);


        if (this.nodes.length == 0 || this.nodes == null || position > (this.nodes.length - 1)) {
            this.nodes = resize();
        }
        return false;
    }

    private final Node<T, V>[] resize() {
        int newCapacity = this.nodes.length * 2;
        Node<T, V>[] newMap = (Node<T, V>[]) new Node[newCapacity];
        for (Node<T, V> node : this.nodes) {
            Node<T, V> e = node;
            if (e != null) {
                newMap[getPosition(e.hash, newCapacity)] = e;
            }
        }
        return newMap;
    }

    V get(T key) {
        return null;
    }

    boolean delete(T key) {
        return false;
    }


    private int hash(Object key) {
        int h = key.hashCode();
        return h ^ (h >>> 16);
    }

    private int getPosition(int hashValue, int length) {
        return (length - 1) & hashValue;
    }


    @Override
{'fraction_non_alphanumeric': 0.13449725185903652, 'fraction_numerical': 0.008729388942774006, 'mean_word_length': 1.8942937324602431, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 28, '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': '5936400', 'n_tokens_mistral': 1038, 'n_tokens_neox': 979, 'n_words': 283}