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

论代码审查对代码气味的影响

On The Effect Of Code Review On Code Smells

Luca Pascarella, Davide Spadini, Fabio Palomba, Alberto Bacchelli

摘要:

代码气味是设计质量差的症状。由于代码审查是一个过程,也旨在提高代码质量,我们调查是否以及如何影响代码气味的严重性。在这项研究中,我们分析了属于7个Java开源项目的21,000多个代码审查;我们发现,积极和参与的代码审查对降低代码气味严重程度的可能性有显着影响。这个结果似乎证实了代码审查对代码质量的影响。然而,通过人工调查365个案例,其中一个文件中的代码气味的严重性通过审查而降低,我们发现,在95%的情况下,这种降低是审查人员要求对与代码气味无关的事项进行更改的副作用。数据和材料[https://doi.org/10.5281/zenodo.3588501]。

英文摘要:

Code smells are symptoms of poor design quality. Since code review is a process that also aims at improving code quality, we investigate whether and how code review influences the severity of code smells. In this study, we analyze more than 21,000 code reviews belonging to seven Java open-source projects; we find that active and participated code reviews have a significant influence on the likelihood of reducing the severity of code smells. This result seems to confirm the expectations around code review's influence on code quality. However, by manually investigating 365 cases in which the severity of a code smell in a file was reduced with a review, we found that-in 95% of the cases-the reduction was a side effect of changes that reviewers requested on matters unrelated to code smells. Data and materials [https://doi.org/10.5281/zenodo.3588501].

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

↑