arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1912.01142cs.SE
收藏

代码复杂度与缺陷相关性的实证研究

An Empirical Investigation of Correlation between Code Complexity and Bugs

Changqi Chen

摘要:

已经有许多关于预测bug的研究。这些研究表明,代码复杂度,如圈复杂度,与代码中存在的错误相关。在本文中,我们打算找到路径复杂度和错误之间的相关性。我们发现:1)对于简单的bug,路径复杂度和bug的存在之间没有很强的相关性; 2)对于复杂的真实世界bug,路径复杂度与bug的存在之间的相关性虽然不强,但比圈复杂度和NPATH复杂度更高。这些结果对于研究人员利用路径复杂度来建立错误预测模型是有用的。此外,路径复杂度可以用作测试生成的指导机制。

英文摘要:

There have been many studies conducted on predicting bugs. These studies show that code complexity, such as cyclomatic complexity, correlates with the presence of bugs in code. In this paper, we intend to find the correlation between path complexity and bugs. We found that 1) For simple bugs, there is no strong correlation between the path complexity and the presence of bugs; 2) For complex real-world bugs, though not strong, path complexity has a higher correlation with the presence of bugs than cyclomatic complexity and NPATH complexity. These results are useful for researchers to use the path complexity for building bug prediction models. Moreover, path complexity can be used as a guiding mechanism for test generation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑