<commit_before>﻿namespace Jwc.Experiment.Xunit
{
    using System;
    using System.Collections.Generic;
    using System.Globalization;
    using System.Linq;
    using System.Reflection;
    using global::Xunit.Sdk;

    /// <summary>
    /// Represents information of a test command.
    /// </summary>
    public class TestCommandContext : ITestCommandContext
    {
        private IMethodInfo testMethod;
        private IMethodInfo actualMethod;
        private object actualObject;
        private ITestFixtureFactory factory;
        private IEnumerable<object> arguments;

        /// <summary>
        /// Initializes a new instance of the <see cref="TestCommandContext"/> class.
        /// </summary>
        /// <param name="testMethod">
        /// A test method.
        /// </param>
        /// <param name="factory">
        /// A factory to create test fixture.
        /// </param>
        /// <param name="arguments">
        /// Explicit arguments of the test method.
        /// </param>
        public TestCommandContext(IMethodInfo testMethod, ITestFixtureFactory factory, IEnumerable<object> arguments)
        {
            if (testMethod == null)
                throw new ArgumentNullException("testMethod");

            if (factory == null)
                throw new ArgumentNullException("factory");

            if (arguments == null)
                throw new ArgumentNullException("arguments");

            this.testMethod = testMethod;
            this.factory = factory;
            this.arguments = arguments;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="TestCommandContext"/> class.
        /// </summary>
        /// <param name="testMethod">
        /// A test method.
        /// </param>
        /// <param name="actualMethod">
        /// A actual method.
        /// </param>
        /// <param name="factory">
        /// A factory to create test fixture.
        /// </param>
        /// <param name="arguments">
        /// Explicit arguments of the actual method.
        /// </param>
        public TestCommandContext(
            IMethodInfo testMethod,
            IMethodInfo actualMethod,
            ITestFixtureFactory factory,
            IEnumerable<object> arguments)
            : this(testMethod, factory, arguments)
        {
            if (actualMethod == null)
                throw new ArgumentNullException("actualMethod");

            this.actualMethod = actualMethod;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="TestCommandContext"/> class.
        /// </summary>
        /// <param name="testMethod">
        /// A test method.
        /// </param>
        /// <param name="actualMethod">
        /// A actual method.
        /// </param>
        /// <param name="actualObject">
        /// The test object.
        /// </param>
        /// <param name="factory">
        /// A factory to create test fixture.
        /// </param>
        /// <param name="arguments">
        /// Explicit arguments of the actual method.
        /// </param>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "object", Justification = "This rule is suppressed because the 'Object' term is appropriate to represent an object of a test class.")]
        public TestCommandContext(
            IMethodInfo testMethod,
            IMethodInfo actualMethod,
            object actualObject,
            ITestFixtureFactory factory,
            IEnumerable<object> arguments)
            : this(testMethod, actualMethod, factory, arguments)
        {
            if (actualObject == null)
                throw new ArgumentNullException("actualObject");

            this.actualObject = actualObject;
        }

        /// <summary>
        /// Gets the test method.
        /// </summary>
        public IMethodInfo TestMethod
        {
            get { return this.testMethod; }
        }

        /// <summary>
        /// Gets the actual method.
        /// </summary>
        public IMethodInfo ActualMethod
        {
            get { return this.actualMethod; }
        }

        /// <summary>
        /// Gets the test object.
        /// </summary>
        [Obsolete("This property is not supported and will be removed on the next major release.")]
        public object TestObject
        {
            get { throw new NotSupportedException(); }
        }

        /// <summary>
        /// Gets the actual object.
        /// </summary>
        public object ActualObject
        {
            get { return this.actualObject; }
        }

        /// <summary><commit_msg>build: Addressed the code analysis(CA1822).<commit_after>﻿namespace Jwc.Experiment.Xunit
{
    using System;
    using System.Collections.Generic;
    using System.Globalization;
    using System.Linq;
    using System.Reflection;
    using global::Xunit.Sdk;

    /// <summary>
    /// Represents information of a test command.
    /// </summary>
    public class TestCommandContext : ITestCommandContext
    {
        private IMethodInfo testMethod;
        private IMethodInfo actualMethod;
        private object actualObject;
        private ITestFixtureFactory factory;
        private IEnumerable<object> arguments;

        /// <summary>
        /// Initializes a new instance of the <see cref="TestCommandContext"/> class.
        /// </summary>
        /// <param name="testMethod">
        /// A test method.
        /// </param>
        /// <param name="factory">
        /// A factory to create test fixture.
        /// </param>
        /// <param name="arguments">
        /// Explicit arguments of the test method.
        /// </param>
        public TestCommandContext(IMethodInfo testMethod, ITestFixtureFactory factory, IEnumerable<object> arguments)
        {
            if (testMethod == null)
                throw new ArgumentNullException("testMethod");

            if (factory == null)
                throw new ArgumentNullException("factory");

            if (arguments == null)
                throw new ArgumentNullException("arguments");

            this.testMethod = testMethod;
            this.factory = factory;
            this.arguments = arguments;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="TestCommandContext"/> class.
        /// </summary>
        /// <param name="testMethod">
        /// A test method.
        /// </param>
        /// <param name="actualMethod">
        /// A actual method.
        /// </param>
        /// <param name="factory">
        /// A factory to create test fixture.
        /// </param>
        /// <param name="arguments">
        /// Explicit arguments of the actual method.
        /// </param>
        public TestCommandContext(
            IMethodInfo testMethod,
            IMethodInfo actualMethod,
            ITestFixtureFactory factory,
            IEnumerable<object> arguments)
            : this(testMethod, factory, arguments)
        {
            if (actualMethod == null)
                throw new ArgumentNullException("actualMethod");

            this.actualMethod = actualMethod;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="TestCommandContext"/> class.
        /// </summary>
        /// <param name="testMethod">
        /// A test method.
        /// </param>
        /// <param name="actualMethod">
        /// A actual method.
        /// </param>
        /// <param name="actualObject">
        /// The test object.
        /// </param>
        /// <param name="factory">
        /// A factory to create test fixture.
        /// </param>
        /// <param name="arguments">
        /// Explicit arguments of the actual method.
        /// </param>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "object", Justification = "This rule is suppressed because the 'Object' term is appropriate to represent an object of a test class.")]
        public TestCommandContext(
            IMethodInfo testMethod,
            IMethodInfo actualMethod,
            object actualObject,
            ITestFixtureFactory factory,
            IEnumerable<object> arguments)
            : this(testMethod, actualMethod, factory, arguments)
        {
            if (actualObject == null)
                throw new ArgumentNullException("actualObject");

            this.actualObject = actualObject;
        }

        /// <summary>
        /// Gets the test method.
        /// </summary>
        public IMethodInfo TestMethod
        {
            get { return this.testMethod; }
        }

        /// <summary>
        /// Gets the actual method.
        /// </summary>
        public IMethodInfo ActualMethod
        {
            get { return this.actualMethod; }
        }

        /// <summary>
        /// Gets the test object.
        /// </summary>
        [Obsolete("This property is not supported and will be removed on the next major release.")]
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "This is public API.")]
        public object TestObject
        {
            get { throw new NotSupportedException(); }
        }

        /// <summary>
        /// Gets the actual object.
        /// </summary>
        public object ActualObject
        {
            get { return this.actualObject; }
        }

        /// <summary>
{'fraction_non_alphanumeric': 0.11568096626405665, 'fraction_numerical': 0.001665972511453561, 'mean_word_length': 1.648194099807003, 'pattern_counts': {'":': 0, '<': 99, '<?xml version=': 0, '>': 99, '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': '6708535', 'n_tokens_mistral': 2315, 'n_tokens_neox': 2273, 'n_words': 664}