<commit_before>﻿using System;
using System.Threading;
using System.Threading.Tasks;
using Orleans;
using Orleans.Runtime;

namespace TestGrains
{
    public interface ITestGrain : IGrainWithIntegerKey
    {
        Task ExampleMethod1();

        Task ExampleMethod2();

        Task<int> ExampleMethod3();
    }

    public class TestGrain : Grain, ITestGrain, IRemindable
    {
        private readonly Random random = new Random();

        public async Task ExampleMethod1()
        {
            await Task.Delay(random.Next(100));
        }

        public Task ExampleMethod2()
        {
            if (random.Next(100) > 50)
            {
                throw new Exception();
            }

            return Task.CompletedTask;
        }

        public Task<int> ExampleMethod3()
        {
            return Task.FromResult(random.Next(100));
        }

        public override async Task OnActivateAsync(CancellationToken cancellationToken)
        {
            await RegisterOrUpdateReminder("Frequent", TimeSpan.Zero, TimeSpan.FromMinutes(1));
            await RegisterOrUpdateReminder("Daily", TimeSpan.Zero, TimeSpan.FromDays(1));
            await RegisterOrUpdateReminder("Weekly", TimeSpan.Zero, TimeSpan.FromDays(7));
        }

        public Task ReceiveReminder(string reminderName, TickStatus status)
        {
            return Task.CompletedTask;
        }
    }
}<commit_msg>Fix TestGrain<commit_after>﻿using System;
using System.Threading;
using System.Threading.Tasks;
using Orleans;
using Orleans.Runtime;

namespace TestGrains
{
    public interface ITestGrain : IGrainWithIntegerKey
    {
        Task ExampleMethod1();

        Task ExampleMethod2();
    }

    public class TestGrain : Grain, ITestGrain, IRemindable
    {
        private readonly Random random = new Random();

        public async Task ExampleMethod1()
        {
            await Task.Delay(random.Next(100));
        }

        public Task ExampleMethod2()
        {
            if (random.Next(100) > 50)
            {
                throw new Exception();
            }

            return Task.CompletedTask;
        }

        public override async Task OnActivateAsync(CancellationToken cancellationToken)
        {
            await RegisterOrUpdateReminder("Frequent", TimeSpan.Zero, TimeSpan.FromMinutes(1));
            await RegisterOrUpdateReminder("Daily", TimeSpan.Zero, TimeSpan.FromDays(1));
            await RegisterOrUpdateReminder("Weekly", TimeSpan.Zero, TimeSpan.FromDays(7));
        }

        public Task ReceiveReminder(string reminderName, TickStatus status)
        {
            return Task.CompletedTask;
        }
    }
}
{'fraction_non_alphanumeric': 0.08558558558558559, 'fraction_numerical': 0.013138138138138139, 'mean_word_length': 2.214716525934861, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '2462555', 'n_tokens_mistral': 727, 'n_tokens_neox': 699, 'n_words': 158}