Software code complexity is a well-studied property to determine software component health. However, the existing code complexity metrics do not directly take into account the fault-proneness aspect of the code. We propose a metric called mutant density where we use mutation as a method to introduce artificial faults in code, and count the number of possible mutations per line. We show how this metric can be used to perform helpful analysis of real-life software projects.
翻译:软件代码复杂度是用来确定软件元件健康的一种研究周全的特性。 但是, 现有的代码复杂度没有直接考虑到代码的易出错性。 我们建议了一种称为变异密度的量度, 我们用突变作为在代码中引入人为错误的方法, 并计算每行可能发生的突变次数。 我们展示了如何使用该量度来对实际软件项目进行有益的分析 。