internal override double ComputeReviewerScore(PullRequestContext pullRequestContext, DeveloperKnowledge reviewer)
        {
            double spreadingScore = GetPersistSpreadingScore(pullRequestContext, reviewer);

            var expertiseScore = ComputeBirdReviewerScore(pullRequestContext, reviewer);

            var alpha = pullRequestContext.GetRiskyFiles(_riskOwenershipThreshold).Length > 0 ? 1 : 0;

            var score = (1 - alpha) * expertiseScore + alpha * spreadingScore;

            return(score);
        }
Ejemplo n.º 2
0
        internal override double ComputeReviewerScore(PullRequestContext pullRequestContext, DeveloperKnowledge reviewer)
        {
            var alpha = pullRequestContext.GetRiskyFiles(_riskOwenershipThreshold).Length > 0 ? 1 : 0;

            if (alpha == 1)
            {
                double spreadingScore = GetPersistSpreadingScore(pullRequestContext, reviewer);
                return(spreadingScore);
            }
            else
            {
                double loadscore = GetLoadScore(pullRequestContext, reviewer);
                var    load      = Math.Pow(Math.E, (0.5 * loadscore));

                var expertiseScore = ComputeBirdReviewerScore(pullRequestContext, reviewer);

                return(expertiseScore / load);
            }
        }