<commit_before>//  
//  InnerJoin.cs
//  
//  Author:
//       <NAME> <<EMAIL>>
// 
//  Copyright (c) 2010-2012 <NAME>
// 
//  This file is part of Epic.NET.
// 
//  Epic.NET is free software: you can redistribute it and/or modify
//  it under the terms of the GNU Affero General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
// 
//  Epic.NET is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU Affero General Public License for more details.
// 
//  You should have received a copy of the GNU Affero General Public License
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
//  
using System;
using Epic.Query.Relational.Predicates;


namespace Epic.Query.Relational.Operations
{
    /// <summary>
    /// This class models the Inner Join operation, which joins two relations and returns those
    /// record matching a given condition.
    /// </summary>
    [Serializable]
    public sealed class InnerJoin: Relation, IEquatable<InnerJoin>
    {
        private readonly Relation _leftRelation;
        private readonly Relation _rightRelation;
        private readonly Predicate _predicate;

        /// <summary>
        /// Initializes a new instance of the <see cref="Epic.Query.Relational.Operations.InnerJoin"/> class.
        /// </summary>
        /// <param name='leftRelation'>
        /// Left relation in the Join operation.
        /// </param>
        /// <param name='rightRelation'>
        /// Right relation in the Join operation.
        /// </param>
        /// <param name='predicate'>
        /// Predicate used to join the two Relations.
        /// </param>
        /// <exception cref="ArgumentNullException">Thrown when any argument is <see langword="null"/></exception> 
        public InnerJoin (Relation leftRelation, Relation rightRelation, Predicate predicate) :
            base(RelationType.InnerJoin, getDefaultName(leftRelation))
        {
            if (null == rightRelation)
                throw new ArgumentNullException("rightRelation");
            if (null == predicate)
                throw new ArgumentNullException("predicate");

            this._leftRelation = leftRelation;
            this._rightRelation = rightRelation;
            this._predicate = predicate;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Epic.Query.Relational.Operations.InnerJoin"/> class.
        /// </summary>
        /// <param name='leftRelation'>
        /// Left relation in the Join operation.
        /// </param>
        /// <param name='rightRelation'>
        /// Right relation in the Join operation.
        /// </param>
        /// <param name='predicate'>
        /// Predicate used to join the two Relations.
        /// </param>
        /// <param name='name'>
        /// Name assigned to the join relation.
        /// </param>
        /// <exception cref="ArgumentNullException">Thrown when any argument is <see langword="null"/></exception> 
        public InnerJoin (Relation leftRelation, Relation rightRelation, Predicate predicate, string name):
            base(RelationType.InnerJoin, name)
        {
            if (null == leftRelation)
                throw new ArgumentNullException("leftRelation");
            if (null == rightRelation)
                throw new ArgumentNullException("rightRelation");
            if (null == predicate)
                throw new ArgumentNullException("predicate");
            if (null == name)
                throw new ArgumentNullException("name");

            this._leftRelation = leftRelation;
            this._rightRelation = rightRelation;
            this._predicate = predicate;
        }

        /// <summary>
        /// Gets the left relation.
        /// </summary>
        /// <value>
        /// The left relation.
        /// </value>
        public Relation LeftRelation { get { return this._leftRelation; } }

        /// <summary><commit_msg>Fixed coverage<commit_after>//  
//  InnerJoin.cs
//  
//  Author:
//       <NAME> <<EMAIL>>
// 
//  Copyright (c) 2010-2012 <NAME>
// 
//  This file is part of Epic.NET.
// 
//  Epic.NET is free software: you can redistribute it and/or modify
//  it under the terms of the GNU Affero General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
// 
//  Epic.NET is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU Affero General Public License for more details.
// 
//  You should have received a copy of the GNU Affero General Public License
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
//  
using System;
using Epic.Query.Relational.Predicates;


namespace Epic.Query.Relational.Operations
{
    /// <summary>
    /// This class models the Inner Join operation, which joins two relations and returns those
    /// record matching a given condition.
    /// </summary>
    [Serializable]
    public sealed class InnerJoin: Relation, IEquatable<InnerJoin>
    {
        private readonly Relation _leftRelation;
        private readonly Relation _rightRelation;
        private readonly Predicate _predicate;

        /// <summary>
        /// Initializes a new instance of the <see cref="Epic.Query.Relational.Operations.InnerJoin"/> class.
        /// </summary>
        /// <param name='leftRelation'>
        /// Left relation in the Join operation.
        /// </param>
        /// <param name='rightRelation'>
        /// Right relation in the Join operation.
        /// </param>
        /// <param name='predicate'>
        /// Predicate used to join the two Relations.
        /// </param>
        /// <exception cref="ArgumentNullException">Thrown when any argument is <see langword="null"/></exception> 
        public InnerJoin (Relation leftRelation, Relation rightRelation, Predicate predicate) :
            base(RelationType.InnerJoin, getDefaultName(leftRelation))
        {
            if (null == rightRelation)
                throw new ArgumentNullException("rightRelation");
            if (null == predicate)
                throw new ArgumentNullException("predicate");

            this._leftRelation = leftRelation;
            this._rightRelation = rightRelation;
            this._predicate = predicate;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Epic.Query.Relational.Operations.InnerJoin"/> class.
        /// </summary>
        /// <param name='leftRelation'>
        /// Left relation in the Join operation.
        /// </param>
        /// <param name='rightRelation'>
        /// Right relation in the Join operation.
        /// </param>
        /// <param name='predicate'>
        /// Predicate used to join the two Relations.
        /// </param>
        /// <param name='name'>
        /// Name assigned to the join relation.
        /// </param>
        /// <exception cref="ArgumentNullException">Thrown when any argument is <see langword="null"/></exception> 
        public InnerJoin (Relation leftRelation, Relation rightRelation, Predicate predicate, string name):
            base(RelationType.InnerJoin, name)
        {
            if (null == leftRelation)
                throw new ArgumentNullException("leftRelation");
            if (null == rightRelation)
                throw new ArgumentNullException("rightRelation");
            if (null == predicate)
                throw new ArgumentNullException("predicate");

            this._leftRelation = leftRelation;
            this._rightRelation = rightRelation;
            this._predicate = predicate;
        }

        /// <summary>
        /// Gets the left relation.
        /// </summary>
        /// <value>
        /// The left relation.
        /// </value>
        public Relation LeftRelation { get { return this._leftRelation; } }

        /// <summary>
{'fraction_non_alphanumeric': 0.114226754066521, 'fraction_numerical': 0.0021849963583394027, 'mean_word_length': 2.0301581463773446, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 81, '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': '4434862', 'n_tokens_mistral': 2144, 'n_tokens_neox': 2070, 'n_words': 698}