Quality Sensitive Risk Model

Description

The strict quality risk model is emphasizing risks related to low test coverage or test success density.

Normalization intervals
unique-licenses[0, 5, 10, 30, 60, Infinity]
ratio-no-license[0, 5, 30, 60, 80, Infinity]
omm-license[0, 2, 4, 5, 6, Infinity]
blocker-issues[0, 1, 3, 5, 10, Infinity]
critical-issues[0, 5, 10, 30, 50, Infinity]
test-coverage[0, 60, 75, 80, 90, 100]
test-success[0, 90, 95, 98, 99, 100]
openhub-one-year-contributor-count[0, 2, 3, 4, 6, Infinity]
openhub-activity[0, 1, 2, 3, 4, Infinity]
omm-pdoc[0, 2, 4, 8, 9, 10]
omm-std[0, 0, 4, 4, 4, 4]
omm-qtp[0, 0, 1, 5, 7, 7]
omm-env[0, 0, 2, 4, 5, 6]
omm-dfct[0, 0, 2, 4, 6, 7]
omm-mst[0, 0, 2, 3, 4, 5]
omm-cm[0, 0, 2, 4, 5, 6]
omm-pp[0, 1, 2, 3, 4, 4]
omm-reqm[0, 0, 1, 2, 4, 4]
omm-rdmp[0, 0, 1, 2, 3, 4]
omm-stk[0, 1, 2, 4, 8, 9]
License Risk Function
function computeLicenseRisk(uniqueLicenses, noLicenseCount, fileCount, ommLcs) {
  return (
           normalize(uniqueLicenses, "unique-licenses")
        + normalize((noLicenseCount / fileCount)*100, "ratio-no-license")
        + normalize(ommLcs, "omm-license")
         ) / 3;
}
Quality Risk Function
function computeCodeQualityRisk(blockerIssues, criticalIssues, testCoverage, testSuccess, ommPdoc, ommStd, ommQtp, ommEnv, ommDfct, ommMst) {
  var ommAvg = (
             normalize(ommPdoc,"omm-pdoc")
          + normalize(ommStd, "omm-std")
          + normalize(ommQtp,"omm-qtp")
          + normalize(ommEnv,"omm-env")
          + normalize(ommDfct, "omm-dfct")
          + normalize(ommMst, "omm-mst")) / 6;

  return (
           (normalize(blockerIssues, "blocker-issues") + normalize(criticalIssues, "critical-issues")) / 2
        + normalize(testCoverage, "test-coverage", true)
        + normalize(testSuccess, "test-success", true) + ommAvg ) / 4;
}
Activity Risk Function
function computeActivenessRisk(openHubActivity, openHubContributors, ommCm, ommPp, ommReqm, ommRdmp, ommStk) {
  return (
           normalize(openHubActivity, "openhub-activity", true)
        + normalize(openHubContributors, "openhub-one-year-contributor-count", true)
        + normalize(ommCm,"omm-cm")
        + normalize(ommPp,"omm-pp")
        + normalize(ommReqm,"omm-reqm")
        + normalize(ommRdmp,"omm-rdmp")
        + normalize(ommStk,"omm-stk")) / 7;
}