<commit_before>﻿namespace Http.Grammars.Rfc7230
{
    using System.Diagnostics.Contracts;
    using Text.Scanning;
    using Text.Scanning.Core;

    public class StatusLineToken : Token
    {
        private readonly CrLfToken crLf;
        private readonly HttpVersionToken httpVersion;
        private readonly ReasonPhraseToken reasonPhrase;
        private readonly SpToken sp1;
        private readonly SpToken sp2;
        private readonly StatusCodeToken statusCode;

        public StatusLineToken(HttpVersionToken httpVersion, SpToken sp1, StatusCodeToken statusCode, SpToken sp2,
            ReasonPhraseToken reasonPhrase, CrLfToken crLf, ITextContext context)
            : base(string.Concat(httpVersion, sp1, statusCode, sp2, reasonPhrase, crLf), context)
        {
            Contract.Requires(httpVersion != null);
            Contract.Requires(sp1 != null);
            Contract.Requires(statusCode != null);
            Contract.Requires(sp2 != null);
            Contract.Requires(reasonPhrase != null);
            Contract.Requires(crLf != null);
            this.httpVersion = httpVersion;
            this.sp1 = sp1;
            this.statusCode = statusCode;
            this.sp2 = sp2;
            this.reasonPhrase = reasonPhrase;
            this.crLf = crLf;
        }

        [ContractInvariantMethod]
        private void ObjectInvariant()
        {
            Contract.Invariant(this.httpVersion != null);
            Contract.Invariant(this.sp1 != null);
            Contract.Invariant(this.statusCode != null);
            Contract.Invariant(this.sp2 != null);
            Contract.Invariant(this.reasonPhrase != null);
            Contract.Invariant(this.crLf != null);
        }
    }
}<commit_msg>Encapsulating fields in 'StatusLineToken'<commit_after>﻿namespace Http.Grammars.Rfc7230
{
    using System.Diagnostics.Contracts;
    using Text.Scanning;
    using Text.Scanning.Core;

    public class StatusLineToken : Token
    {
        private readonly CrLfToken crLf;
        private readonly HttpVersionToken httpVersion;
        private readonly ReasonPhraseToken reasonPhrase;
        private readonly SpToken sp1;
        private readonly SpToken sp2;
        private readonly StatusCodeToken statusCode;

        public StatusLineToken(HttpVersionToken httpVersion, SpToken sp1, StatusCodeToken statusCode, SpToken sp2,
            ReasonPhraseToken reasonPhrase, CrLfToken crLf, ITextContext context)
            : base(string.Concat(httpVersion, sp1, statusCode, sp2, reasonPhrase, crLf), context)
        {
            Contract.Requires(httpVersion != null);
            Contract.Requires(sp1 != null);
            Contract.Requires(statusCode != null);
            Contract.Requires(sp2 != null);
            Contract.Requires(reasonPhrase != null);
            Contract.Requires(crLf != null);
            this.httpVersion = httpVersion;
            this.sp1 = sp1;
            this.statusCode = statusCode;
            this.sp2 = sp2;
            this.reasonPhrase = reasonPhrase;
            this.crLf = crLf;
        }

        public CrLfToken CrLf
        {
            get
            {
                return this.crLf;
            }
        }

        public HttpVersionToken HttpVersion
        {
            get
            {
                return this.httpVersion;
            }
        }

        public ReasonPhraseToken ReasonPhrase
        {
            get
            {
                return this.reasonPhrase;
            }
        }

        public SpToken Sp1
        {
            get
            {
                return this.sp1;
            }
        }

        public SpToken Sp2
        {
            get
            {
                return this.sp2;
            }
        }

        public StatusCodeToken StatusCode
        {
            get
            {
                return this.statusCode;
            }
        }

        [ContractInvariantMethod]
        private void ObjectInvariant()
        {
            Contract.Invariant(this.httpVersion != null);
            Contract.Invariant(this.sp1 != null);
            Contract.Invariant(this.statusCode != null);
            Contract.Invariant(this.sp2 != null);
            Contract.Invariant(this.reasonPhrase != null);
            Contract.Invariant(this.crLf != null);
        }
    }
}
{'fraction_non_alphanumeric': 0.07761607761607761, 'fraction_numerical': 0.00924000924000924, 'mean_word_length': 1.7267002518891688, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7049438', 'n_tokens_mistral': 1181, 'n_tokens_neox': 1132, 'n_words': 235}