<commit_before>﻿using System;
using System.Collections.Generic;
using Baseline;

namespace Marten.Testing
{
    public enum Colors
    {
        Red,
        Blue,
        Green
    }

    public class Target
    {
        private static readonly Random _random = new Random(67);

        private static readonly string[] _strings =
        {
            "Red", "Orange", "Yellow", "Green", "Blue", "Purple", "Violet",
            "Pink", "Gray", "Black"
        };

        private static readonly string[] _otherStrings =
        {
            "one", "two", "three", "four", "five", "six", "seven", "eight",
            "nine", "ten"
        };

        public static IEnumerable<Target> GenerateRandomData(int number)
        {
            var i = 0;
            while (i < number)
            {
                yield return Random(true);

                i++;
            }
        }

        public static Target Random(bool deep = false)
        {
            var target = new Target();
            target.String = _strings[_random.Next(0, 10)];
            target.AnotherString = _otherStrings[_random.Next(0, 10)];
            target.Number = _random.Next();

            target.Float = float.Parse(_random.NextDouble().ToString());

            target.NumberArray = new[] { _random.Next(0, 10), _random.Next(0, 10), _random.Next(0, 10) };

            switch (_random.Next(0, 2))
            {
                case 0:
                    target.Color = Colors.Blue;
                    break;

                case 1:
                    target.Color = Colors.Green;
                    break;

                default:
                    target.Color = Colors.Red;
                    break;
            }

            target.Long = 100 * _random.Next();
            target.Double = _random.NextDouble();
            target.Long = _random.Next() * 10000;

            target.Date = DateTime.Today.AddDays(_random.Next(-10000, 10000)).ToUniversalTime();

            if (deep)
            {
                target.Inner = Random();

                var number = _random.Next(1, 10);
                target.Children = new Target[number];
                for (int i = 0; i < number; i++)
                {<commit_msg>trying to make the patching api tests more reliable<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using Baseline;

namespace Marten.Testing
{
    public enum Colors
    {
        Red,
        Blue,
        Green
    }

    public class Target
    {
        private static readonly Random _random = new Random(67);

        private static readonly string[] _strings =
        {
            "Red", "Orange", "Yellow", "Green", "Blue", "Purple", "Violet",
            "Pink", "Gray", "Black"
        };

        private static readonly string[] _otherStrings =
        {
            "one", "two", "three", "four", "five", "six", "seven", "eight",
            "nine", "ten"
        };

        public static IEnumerable<Target> GenerateRandomData(int number)
        {
            var i = 0;
            while (i < number)
            {
                yield return Random(true);

                i++;
            }
        }

        public static Target Random(bool deep = false)
        {
            var target = new Target();
            target.String = _strings[_random.Next(0, 10)];
            target.AnotherString = _otherStrings[_random.Next(0, 10)];
            target.Number = _random.Next();

            target.Float = float.Parse(_random.NextDouble().ToString());

            target.NumberArray = new[] { _random.Next(0, 10), _random.Next(0, 10), _random.Next(0, 10) };

            target.NumberArray = target.NumberArray.Distinct().ToArray();

            switch (_random.Next(0, 2))
            {
                case 0:
                    target.Color = Colors.Blue;
                    break;

                case 1:
                    target.Color = Colors.Green;
                    break;

                default:
                    target.Color = Colors.Red;
                    break;
            }

            target.Long = 100 * _random.Next();
            target.Double = _random.NextDouble();
            target.Long = _random.Next() * 10000;

            target.Date = DateTime.Today.AddDays(_random.Next(-10000, 10000)).ToUniversalTime();

            if (deep)
            {
                target.Inner = Random();

                var number = _random.Next(1, 10);
                target.Children = new Target[number];
                for (int i = 0; i < number; i++)
                {
{'fraction_non_alphanumeric': 0.11741597555652554, 'fraction_numerical': 0.01920558707987778, 'mean_word_length': 1.4019916142557651, 'pattern_counts': {'":': 0, '<': 9, '<?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': '4094649', 'n_tokens_mistral': 1318, 'n_tokens_neox': 1165, 'n_words': 298}