<commit_before>// Copyright (c) <NAME> <<EMAIL>>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using System.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Input.Bindings;
using osu.Game.Rulesets.Edit.Checks.Components;

namespace osu.Game.Screens.Edit.Verify
{
    public class IssueTable : EditorTable
    {
        [Resolved]
        private VerifyScreen verify { get; set; }

        private Bindable<Issue> selectedIssue;

        [Resolved]
        private EditorClock clock { get; set; }

        [Resolved]
        private EditorBeatmap editorBeatmap { get; set; }

        [Resolved]
        private Editor editor { get; set; }

        public IEnumerable<Issue> Issues
        {
            set
            {
                Content = null;
                BackgroundFlow.Clear();

                if (value == null)
                    return;

                foreach (var issue in value)
                {
                    BackgroundFlow.Add(new RowBackground(issue)
                    {
                        Action = () =>
                        {
                            selectedIssue.Value = issue;

                            if (issue.Time != null)
                            {
                                clock.Seek(issue.Time.Value);
                                editor.OnPressed(GlobalAction.EditorComposeMode);
                            }

                            if (!issue.HitObjects.Any())
                                return;

                            editorBeatmap.SelectedHitObjects.Clear();
                            editorBeatmap.SelectedHitObjects.AddRange(issue.HitObjects);
                        },
                    });
                }

                Columns = createHeaders();
                Content = value.Select((g, i) => createContent(i, g)).ToArray().ToRectangular();
            }
        }

        protected override void LoadComplete()
        {
            base.LoadComplete();

            selectedIssue = verify.SelectedIssue.GetBoundCopy();
            selectedIssue.BindValueChanged(issue =>
            {
                foreach (var b in BackgroundFlow) b.Selected = b.Item == issue.NewValue;<commit_msg>Fix one more issue<commit_after>// Copyright (c) <NAME> <<EMAIL>>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using System.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Input.Bindings;
using osu.Game.Rulesets.Edit.Checks.Components;

namespace osu.Game.Screens.Edit.Verify
{
    public class IssueTable : EditorTable
    {
        [Resolved]
        private VerifyScreen verify { get; set; }

        private Bindable<Issue> selectedIssue;

        [Resolved]
        private EditorClock clock { get; set; }

        [Resolved]
        private EditorBeatmap editorBeatmap { get; set; }

        [Resolved]
        private Editor editor { get; set; }

        public IEnumerable<Issue> Issues
        {
            set
            {
                Content = null;
                BackgroundFlow.Clear();

                if (value == null)
                    return;

                foreach (var issue in value)
                {
                    BackgroundFlow.Add(new RowBackground(issue)
                    {
                        Action = () =>
                        {
                            selectedIssue.Value = issue;

                            if (issue.Time != null)
                            {
                                clock.Seek(issue.Time.Value);
                                editor.OnPressed(new KeyBindingPressEvent<GlobalAction>(GetContainingInputManager().CurrentState, GlobalAction.EditorComposeMode));
                            }

                            if (!issue.HitObjects.Any())
                                return;

                            editorBeatmap.SelectedHitObjects.Clear();
                            editorBeatmap.SelectedHitObjects.AddRange(issue.HitObjects);
                        },
                    });
                }

                Columns = createHeaders();
                Content = value.Select((g, i) => createContent(i, g)).ToArray().ToRectangular();
            }
        }

        protected override void LoadComplete()
        {
            base.LoadComplete();

            selectedIssue = verify.SelectedIssue.GetBoundCopy();
            selectedIssue.BindValueChanged(issue =>
            {
                foreach (var b in BackgroundFlow) b.Selected = b.Item == issue.NewValue;
{'fraction_non_alphanumeric': 0.08750245242299391, 'fraction_numerical': 0.0, 'mean_word_length': 1.4345749761222542, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 20, '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': '4429515', 'n_tokens_mistral': 1291, 'n_tokens_neox': 1199, 'n_words': 268}