论文标题

代码评论中建筑侵蚀的症状:对两个开放式扇区项目的研究

Symptoms of Architecture Erosion in Code Reviews: A Study of Two OpenStack Projects

论文作者

Li, Ruiyin, Soliman, Mohamed, Liang, Peng, Avgeriou, Paris

论文摘要

建筑侵蚀的现象会对软件系统的维护和演变产生负面影响,并在软件开发过程中表现出各种症状。尽管侵蚀通常被认为很晚,但如果及时检测到,它的症状可能是对软件开发人员的早期警告。除静态源代码分析外,代码审查还可以是检测侵蚀症状并随后采取行动的来源。在这项研究中,我们研究了法规评论及其趋势以及开发人员采取的行动中讨论的侵蚀症状。具体而言,我们对OpenStack社区(即Nova和Neutron)的两个最活跃的开源软件(OSS)项目进行了实证研究。我们手动检查了通过关键字搜索和随机选择检索的21,274代码评论评论,并确定了502个代码评论评论(来自472个讨论线程),讨论了侵蚀。我们的发现表明,(1)侵蚀症状的比例相当低,但在代码审查中值得注意,最常见的侵蚀症状是建筑侵犯,重复的功能和环状依赖性; (2)两个OSS项目中确定的侵蚀症状的下降趋势表明,随着时间的流逝,建筑趋于稳定; (3)大多数鉴定侵蚀症状的代码评论对消除侵蚀症状都有积极的影响,但是仍然存在一些症状,并且被开发人员忽略了。结果表明(1)代码审查提供了一种减少侵蚀症状的实用方法; (2)分析侵蚀症状的趋势可以帮助您深入了解软件系统的侵蚀状态,然后避免建筑侵蚀的潜在风险。

The phenomenon of architecture erosion can negatively impact the maintenance and evolution of software systems, and manifest in a variety of symptoms during software development. While erosion is often considered rather late, its symptoms can act as early warnings to software developers, if detected in time. In addition to static source code analysis, code reviews can be a source of detecting erosion symptoms and subsequently taking action. In this study, we investigate the erosion symptoms discussed in code reviews, as well as their trends, and the actions taken by developers. Specifically, we conducted an empirical study with the two most active Open Source Software (OSS) projects in the OpenStack community (i.e., Nova and Neutron). We manually checked 21,274 code review comments retrieved by keyword search and random selection, and identified 502 code review comments (from 472 discussion threads) that discuss erosion. Our findings show that (1) the proportion of erosion symptoms is rather low, yet notable in code reviews and the most frequently identified erosion symptoms are architectural violation, duplicate functionality, and cyclic dependency; (2) the declining trend of the identified erosion symptoms in the two OSS projects indicates that the architecture tends to stabilize over time; and (3) most code reviews that identify erosion symptoms have a positive impact on removing erosion symptoms, but a few symptoms still remain and are ignored by developers. The results suggest that (1) code review provides a practical way to reduce erosion symptoms; and (2) analyzing the trend of erosion symptoms can help get an insight about the erosion status of software systems, and subsequently avoid the potential risk of architecture erosion.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源