<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace TheBugs.Utils
{
    public static class SpecificFilterUtil
    {
        public static class CompilerTeam
        {
            public static bool AssignedToTeam(RoachIssue issue)
            {
                switch (issue.Assignee.ToLower())
                {
                    case "jaredpar":
                    case "jcouv":
                    case "agocke":
                    case "alekseyts":
                    case "cston":
                    case "gafter":
                    case "tyoverby":
                    case "vsadov":
                        return true;
                    default:
                        return false;
                }
            }

            public static bool AssignedToArea(RoachIssue issue)
            {
                return issue.Labels.Contains("Area-Compilers");
            }

            public static bool IsIssue(RoachIssue issue)
            {
                if (IsNotBug(issue))
                {
                    return false;
                }

                if (AssignedToTeam(issue))
                {
                    return true;
                }

                if (AssignedToArea(issue) && issue.Assignee == TheBugsConstants.UnassignedName)
                {
                    return true;
                }

                return false;
            }

        }

        public static class IdeTeam
        {
            public static bool AssignedToTeam(RoachIssue issue)
            {
                switch (issue.Assignee.ToLower())
                {
                    case "pilchie":
                    case "balajikris":
                    case "brettfo":
                    case "cyrusnajmabadi":
                    case "dpoeschl":
                    case "dustincampbell":
                    case "jasonmalinowski":
                    case "jmarolf":
                    case "rchande":
                    case "tmeschter":
                        return true;
                    default:
                        return false;
                }
            }

            public static bool AssignedToArea(RoachIssue issue)
            {
                return issue.Labels.Contains("Area-Ide");
            }

            public static bool IsIssue(RoachIssue issue)
            {
                if (IsNotBug(issue))
                {
                    return false;
                }

                if (AssignedToTeam(issue))
                {
                    return true;
                }

                if (AssignedToArea(issue) && issue.Assignee == TheBugsConstants.UnassignedName)
                {
                    return true;
                }

                return false;
            }

        }

        public static bool IsNotBug(RoachIssue issue)
        {
            if (!issue.IsOpen)
            {
                return true;
            }

            return
                issue.Labels.Contains("Documentation") ||
                issue.Labels.Contains("Question") ||
                issue.Labels.Contains("Area-Infrastructure");
        }

        public static IEnumerable<RoachIssue> Filter(
            IEnumerable<RoachIssue> issues,
            string view)
        {
            if (view != null)
            {
                switch (view)
                {
                    case "jaredpar":
                        issues = issues.Where(x => SpecificFilterUtil.CompilerTeam.IsIssue(x));
                        break;
                    case "pilchie":
                        issues = issues.Where(x => SpecificFilterUtil.IdeTeam.IsIssue(x));
                        break;
                }
            }

            return issues;
        }
    }
}<commit_msg>Update IDE team members<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace TheBugs.Utils
{
    public static class SpecificFilterUtil
    {
        public static class CompilerTeam
        {
            public static bool AssignedToTeam(RoachIssue issue)
            {
                switch (issue.Assignee.ToLower())
                {
                    case "jaredpar":
                    case "jcouv":
                    case "agocke":
                    case "alekseyts":
                    case "cston":
                    case "gafter":
                    case "tyoverby":
                    case "vsadov":
                        return true;
                    default:
                        return false;
                }
            }

            public static bool AssignedToArea(RoachIssue issue)
            {
                return issue.Labels.Contains("Area-Compilers");
            }

            public static bool IsIssue(RoachIssue issue)
            {
                if (IsNotBug(issue))
                {
                    return false;
                }

                if (AssignedToTeam(issue))
                {
                    return true;
                }

                if (AssignedToArea(issue) && issue.Assignee == TheBugsConstants.UnassignedName)
                {
                    return true;
                }

                return false;
            }

        }

        public static class IdeTeam
        {
            public static bool AssignedToTeam(RoachIssue issue)
            {
                switch (issue.Assignee.ToLower())
                {
                    case "pilchie":
                    case "brettfo":
                    case "cyrusnajmabadi":
                    case "dpoeschl":
                    case "jasonmalinowski":
                    case "kevinransom":
                    case "rchande":
                    case "sharwell":
                    case "dustincampbell":
                    case "kuhlenh":
                        return true;
                    default:
                        return false;
                }
            }

            public static bool AssignedToArea(RoachIssue issue)
            {
                return issue.Labels.Contains("Area-Ide");
            }

            public static bool IsIssue(RoachIssue issue)
            {
                if (IsNotBug(issue))
                {
                    return false;
                }

                if (AssignedToTeam(issue))
                {
                    return true;
                }

                if (AssignedToArea(issue) && issue.Assignee == TheBugsConstants.UnassignedName)
                {
                    return true;
                }

                return false;
            }

        }

        public static bool IsNotBug(RoachIssue issue)
        {
            if (!issue.IsOpen)
            {
                return true;
            }

            return
                issue.Labels.Contains("Documentation") ||
                issue.Labels.Contains("Question") ||
                issue.Labels.Contains("Area-Infrastructure");
        }

        public static IEnumerable<RoachIssue> Filter(
            IEnumerable<RoachIssue> issues,
            string view)
        {
            if (view != null)
            {
                switch (view)
                {
                    case "jaredpar":
                        issues = issues.Where(x => SpecificFilterUtil.CompilerTeam.IsIssue(x));
                        break;
                    case "pilchie":
                        issues = issues.Where(x => SpecificFilterUtil.IdeTeam.IsIssue(x));
                        break;
                }
            }

            return issues;
        }
    }
}
{'fraction_non_alphanumeric': 0.07228289131565263, 'fraction_numerical': 0.0, 'mean_word_length': 0.8827704356338718, 'pattern_counts': {'":': 40, '<': 7, '<?xml version=': 0, '>': 11, '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': '1767284', 'n_tokens_mistral': 1899, 'n_tokens_neox': 1675, 'n_words': 359}