<commit_before>package org.neo4j.helpers;

/**
 * Utility to handle pairs of objects.
 */
public final class Pair<T1, T2>
{
    private final T1 first;
    private final T2 other;

    public Pair( T1 first, T2 other )
    {
        this.first = first;
        this.other = other;
    }

    public T1 first()
    {
        return first;
    }

    public T2 other()
    {
        return other;
    }

    @Override
    public String toString()
    {
        return "(" + first + ", " + other + ")";
    }
}
<commit_msg>Added hashCode() and equals() to Pair.<commit_after>package org.neo4j.helpers;

/**
 * Utility to handle pairs of objects.
 */
public final class Pair<T1, T2>
{
    private final T1 first;
    private final T2 other;

    public Pair( T1 first, T2 other )
    {
        this.first = first;
        this.other = other;
    }

    public T1 first()
    {
        return first;
    }

    public T2 other()
    {
        return other;
    }

    @Override
    public String toString()
    {
        return "(" + first + ", " + other + ")";
    }

    @Override
    public int hashCode()
    {
        return ( 31 * hashCode( first ) ) | hashCode( other );
    }

    @SuppressWarnings( "unchecked" )
    @Override
    public boolean equals( Object obj )
    {
        if ( this == obj ) return true;
        if ( obj instanceof Pair )
        {
            Pair that = (Pair) obj;
            return equals( this.first, that.first ) && equals( this.other, that.other );
        }
        return false;
    }

    private static int hashCode( Object obj )
    {
        return obj == null ? 0 : obj.hashCode();
    }

    private static boolean equals( Object obj1, Object obj2 )
    {
        return ( obj1 == obj2 ) || ( obj1 != null && obj1.equals( obj2 ) );
    }
}

{'fraction_non_alphanumeric': 0.11702127659574468, 'fraction_numerical': 0.015677491601343786, 'mean_word_length': 1.7748447204968945, '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': '4811765', 'n_tokens_mistral': 572, 'n_tokens_neox': 553, 'n_words': 167}