代码评审中遗漏了哪些bug--基于SmartSHARK数据集的实证研究
Which bugs are missed in code reviews: An empirical study on SmartSHARK dataset
摘要:
在拉式开发系统中,代码审查和拉请求注释在提高代码质量方面起着重要作用。在这样的系统中,审阅者试图通过不同的单元测试仔细检查一段代码。不幸的是,有时他们在审查拉取请求时会遗漏错误,这会导致系统质量下降。换句话说,当合并pull请求后发现bug时,就会发生灾难性的后果。由于对这些bug缺乏具体的了解,我们不得不对它们进行调查和分类。在本研究中,我们尝试识别SmartSHARK数据集项目拉取请求中遗漏的错误。我们的贡献是双重的。首先,我们假设合并后的pull request有代码审查,代码审查评论或合并后的pull request评论,可能在代码审查后遗漏了bug。我们将这些合并的pull请求视为遗漏bug的候选pull请求。根据我们的假设,我们从77个开源GitHub项目中获得了3,261个候选拉取请求。经过两轮严格的人工分析,我们发现在173个pull请求中遗漏了187个bug。在第一步中,我们发现了224个错误的pull请求,其中包含合并pull请求后遗漏的bug。其次,我们定义并最终确定了一个适合我们发现的bug的分类法,然后在再次分析这些pull request之后找到了bug类别的分布。拉取请求中遗漏的bug及其分布的类别是:语义(51.34%),构建(15.5%),分析检查(9.09%),兼容性(7.49%),并发性(4.28%),配置(4.28%),GUI(2.14%),API(2.14%),安全性(2.14%)和内存(1.6%)。
英文摘要:
In pull-based development systems, code reviews and pull request comments play important roles in improving code quality. In such systems, reviewers attempt to carefully check a piece of code by different unit tests. Unfortunately, sometimes they miss bugs in their review of pull requests, which lead to quality degradations of the systems. In other words, disastrous consequences occur when bugs are observed after merging the pull requests. The lack of a concrete understanding of these bugs led us to investigate and categorize them. In this research, we try to identify missed bugs in pull requests of SmartSHARK dataset projects. Our contribution is twofold. First, we hypothesized merged pull requests that have code reviews, code review comments, or pull request comments after merging, may have missed bugs after the code review. We considered these merged pull requests as candidate pull requests having missed bugs. Based on our assumption, we obtained 3,261 candidate pull requests from 77 open-source GitHub projects. After two rounds of restrictive manual analysis, we found 187 bugs missed in 173 pull requests. In the first step, we found 224 buggy pull requests containing missed bugs after merging the pull requests. Secondly, we defined and finalized a taxonomy that is appropriate for the bugs that we found and then found the distribution of bug categories after analysing those pull requests all over again. The categories of missed bugs in pull requests and their distributions are: semantic (51.34%), build (15.5%), analysis checks (9.09%), compatibility (7.49%), concurrency (4.28%), configuration (4.28%), GUI (2.14%), API (2.14%), security (2.14%), and memory (1.6%).
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。