<commit_before>namespace Nancy
{
    using System.Diagnostics;
    using System.Linq;
    using Nancy.Bootstrapper;

    /// <summary>
    /// Default implementation of the <see cref="IRuntimeEnvironmentInformation"/> interface.
    /// </summary>
    public class DefaultRuntimeEnvironmentInformation : IRuntimeEnvironmentInformation
    {
        private bool? isDebug;

        /// <summary>
        /// Gets a value indicating if the application is running in debug mode.
        /// </summary>
        /// <returns><see langword="true"/> if the application is running in debug mode, otherwise <see langword="false"/>.</returns>
        public virtual bool IsDebug
        {
            get { return this.isDebug ?? (bool)(this.isDebug = GetDebugMode()); }
        }

        private static bool GetDebugMode()
        {
            try
            {
                var assembliesInDebug = AppDomainAssemblyTypeScanner
                    .TypesOf<INancyModule>(ScanMode.ExcludeNancy)
                    .Select(x => x.Assembly.GetCustomAttributes(typeof(DebuggableAttribute), true))
                    .Where(x => x.Length != 0);

                return assembliesInDebug.Any(d => ((DebuggableAttribute)d[0]).IsJITTrackingEnabled);
            }
            catch
            {
                return false;
            }
        }
    }
}<commit_msg>Updated to use Lazy<bool><commit_after>namespace Nancy
{
    using System;
    using System.Diagnostics;
    using System.Linq;
    using Nancy.Bootstrapper;

    /// <summary>
    /// Default implementation of the <see cref="IRuntimeEnvironmentInformation"/> interface.
    /// </summary>
    public class DefaultRuntimeEnvironmentInformation : IRuntimeEnvironmentInformation
    {
        private readonly Lazy<bool> isDebug = GetDebugMode();

        /// <summary>
        /// Gets a value indicating if the application is running in debug mode.
        /// </summary>
        /// <returns><see langword="true"/> if the application is running in debug mode, otherwise <see langword="false"/>.</returns>
        public virtual bool IsDebug
        {
            get { return this.isDebug.Value; }
        }

        private static Lazy<bool> GetDebugMode()
        {
            return new Lazy<bool>(() =>
            {
                try
                {
                    var assembliesInDebug = AppDomainAssemblyTypeScanner
                        .TypesOf<INancyModule>(ScanMode.ExcludeNancy)
                        .Select(x => x.Assembly.GetCustomAttributes(typeof(DebuggableAttribute), true))
                        .Where(x => x.Length != 0);

                    return assembliesInDebug.Any(d => ((DebuggableAttribute)d[0]).IsJITTrackingEnabled);
                }
                catch
                {
                    return false;
                }
            });
        }
    }
}
{'fraction_non_alphanumeric': 0.10146443514644352, 'fraction_numerical': 0.001394700139470014, 'mean_word_length': 1.7454545454545454, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 34, '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': '5389238', 'n_tokens_mistral': 715, 'n_tokens_neox': 681, 'n_words': 170}