Example #1
0
 public override void NewCodeSet(CodeSetData codeSet)
 {
     codeSetEstimations.Add(
         codeSet.EP(model.DefectLineProbability)
         *
         codeSet.EFDP(model.BugLifetimeDistribution)
         );
 }
Example #2
0
 public override void NewCodeSet(CodeSetData codeSet)
 {
     codeSetEstimations.Add(
         codeSet.EP(model.DefectLineProbability)
         *
         codeSet.EWNRFP()
         );
 }
Example #3
0
 public static double EWNFP_REVISION(this CodeSetData codeSet, double defectLineProbability)
 {
     return(LaplaceIntegralTheorem(
                defectLineProbability,
                codeSet.AddedCodeSizeFromRevision,
                codeSet.DefectCodeSizeFromRevision + 1,
                codeSet.DefectCodeSizeFromRevision + codeSet.RemainCodeSizeFromRevision
                ));
 }
Example #4
0
 /// <summary>
 /// Probability that code from revision has errors were not fixed before
 /// (fixed code predictor)
 /// </summary>
 /// <param name="codeSet"></param>
 /// <param name="defectLineProbability"></param>
 /// <returns></returns>
 public static double EWNFP(this CodeSetData codeSet, double defectLineProbability)
 {
     return(LaplaceIntegralTheorem(
                defectLineProbability,
                codeSet.AddedCodeSize,
                codeSet.DefectCodeSize + 1,
                codeSet.DefectCodeSize + codeSet.RemainCodeSize
                ));
 }
Example #5
0
 public override void NewCodeSet(CodeSetData codeSet)
 {
     codeSetEstimations.Add(
         codeSet.EP_REVISION(model.DefectLineProbability)
         *
         codeSet.EWNRP_REVISION()
         *
         codeSet.EWNFP_REVISION(model.DefectLineProbability)
         *
         codeSet.ESP()
         );
 }
Example #6
0
 public override void NewCodeSet(CodeSetData codeSet)
 {
     codeSetEstimations.Add(
         codeSet.EP_REVISION(model.DefectLineProbability)
         *
         (
             Math.Max(
                 codeSet.EFDP(model.BugLifetimeDistribution),
                 codeSet.EWNRP_REVISION() * codeSet.EWNFP_REVISION(model.DefectLineProbability)
                 )
         )
         *
         codeSet.ESP()
         );
 }
Example #7
0
 public static double EP_REVISION(this CodeSetData codeSet, double defectLineProbability)
 {
     return(1 - Math.Pow(1 - defectLineProbability, codeSet.AddedCodeSizeFromRevision));
 }
Example #8
0
 /// <summary>
 /// Probability that code from revision has errors
 /// (code size predictor)
 /// </summary>
 /// <param name="codeSet"></param>
 /// <param name="DefectLineProbability"></param>
 /// <returns></returns>
 public static double EP(this CodeSetData codeSet, double defectLineProbability)
 {
     return(1 - Math.Pow(1 - defectLineProbability, codeSet.AddedCodeSize));
 }
 protected void NewCodeSet(CodeSetData codeSet)
 {
     Estimation = defectLineProbabilityOfAuthor[authorByRevision[codeSet.Revision]];
 }
 public override void NewCodeSet(CodeSetData codeSet)
 {
     codeSetEstimations.Add(
         (
             (
                 codeSet.EP_REVISION(model.DefectLineProbability)
                 *
                 codeSet.EWNRP_REVISION()
                 *
                 codeSet.EWNFP_REVISION(model.DefectLineProbability)
                 *
                 codeSet.ESP()
             )
             +
             (
                 codeSet.EP(model.DefectLineProbability)
                 *
                 codeSet.EFDP(model.BugLifetimeDistribution)
             )
         ) / 2
     );
 }
Example #11
0
 /// <summary>
 /// Probability that code from revision has errors will be detected in future
 /// (code age predictor)
 /// </summary>
 /// <param name="codeSet"></param>
 /// <param name="bugLifetimeDistribution"></param>
 /// <returns></returns>
 public static double EFDP(this CodeSetData codeSet, Func <double, double> bugLifetimeDistribution)
 {
     return(1 - bugLifetimeDistribution(codeSet.AgeInDays));
 }
 protected void NewCodeSet(CodeSetData codeSet)
 {
     Estimation = fileEstimation + DCDA[authorByRevision[codeSet.Revision]];
 }
Example #13
0
 public static double EWNRP_REVISION(this CodeSetData codeSet)
 {
     return((codeSet.RemainCodeSizeFromRevision + codeSet.DefectCodeSizeFromRevision) / codeSet.AddedCodeSizeFromRevision);
 }
Example #14
0
 /// <summary>
 /// Probability that code from revision has errors were not removed during refactoring
 /// (code refactoring predictor)
 /// </summary>
 /// <param name="codeSet"></param>
 /// <returns></returns>
 public static double EWNRP(this CodeSetData codeSet)
 {
     return((codeSet.RemainCodeSize + codeSet.DefectCodeSize) / codeSet.AddedCodeSize);
 }
Example #15
0
 public static double EWNRFP_REVISION(this CodeSetData codeSet)
 {
     return(codeSet.RemainCodeSizeFromRevision / codeSet.AddedCodeSizeFromRevision);
 }
Example #16
0
 /// <summary>
 /// Probability that code from revision has errors were not removed
 /// (remain code predictor)
 /// </summary>
 /// <param name="codeSet"></param>
 /// <returns></returns>
 public static double EWNRFP(this CodeSetData codeSet)
 {
     return(codeSet.RemainCodeSize / codeSet.AddedCodeSize);
 }
Example #17
0
 protected void NewCodeSet(CodeSetData codeSet)
 {
     Estimation = defectLineProbabilityOfAuthor[authorByRevision[codeSet.Revision]];
 }
 public override void NewCodeSet(CodeSetData codeSet)
 {
     codeSetEstimations.Add(
         codeSet.EP_REVISION(model.DefectLineProbability)
         *
         codeSet.EWNRP_REVISION()
         *
         codeSet.EWNFP_REVISION(model.DefectLineProbability)
         *
         codeSet.ESP()
     );
 }
Example #19
0
 protected void NewCodeSet(CodeSetData codeSet)
 {
     Estimation = (codeOfAuthor.Estimation + codeInFile.Estimation) - (codeOfAuthor.Estimation * codeInFile.Estimation);
 }
Example #20
0
 /// <summary>
 /// Number of residual defect lines in code from revision
 /// </summary>
 /// <param name="codeSet"></param>
 /// <param name="defectLineProbability"></param>
 /// <returns></returns>
 public static double DLN_REVISION(this CodeSetData codeSet, double defectLineProbability)
 {
     return(defectLineProbability * codeSet.AddedCodeSizeFromRevision);
 }
 public override void NewCodeSet(CodeSetData codeSet)
 {
     codeSetEstimations.Add(
         codeSet.EP(model.DefectLineProbability)
         *
         codeSet.EWNRFP()
     );
 }
Example #22
0
 /// <summary>
 /// Probability that errors in revision are located in specified code set.
 /// (code set size predictor)
 /// </summary>
 /// <param name="codeSet"></param>
 /// <param name="defectLineProbability"></param>
 /// <returns></returns>
 public static double ESP(this CodeSetData codeSet)
 {
     return(codeSet.RemainCodeSize / codeSet.RemainCodeSizeFromRevision);
 }
 public override void NewCodeSet(CodeSetData codeSet)
 {
     codeSetEstimations.Add(
         codeSet.EP(model.DefectLineProbability)
         *
         codeSet.EFDP(model.BugLifetimeDistribution)
     );
 }
Example #24
0
 public static double EISP(this CodeSetData codeSet)
 {
     return(codeSet.AddedCodeSize / codeSet.AddedCodeSizeFromRevision);
 }
 public abstract void NewCodeSet(CodeSetData codeSet);
Example #26
0
 public abstract void NewCodeSet(CodeSetData codeSet);
 protected void NewCodeSet(CodeSetData codeSet)
 {
     Estimation = (codeOfAuthor.Estimation + codeInFile.Estimation) - (codeOfAuthor.Estimation * codeInFile.Estimation);
 }
Example #28
0
 protected void NewCodeSet(CodeSetData codeSet)
 {
     Estimation = fileEstimation + DCDA[authorByRevision[codeSet.Revision]];
 }