As a software system evolves, its architecture tends to degrade, and gradually impedes software maintenance and evolution activities and negatively impacts the quality attributes of the system. The main root cause behind architecture erosion phenomenon derives from violation symptoms (such as violations of architecture pattern). Previous studies focus on detecting violations in software systems using architecture conformance checking approaches. However, code review comments are also rich sources that may contain extensive discussions regarding architecture violations. In this work, we investigated the characteristics of architecture violation symptoms in code review comments from the developers' perspective. We employed a set of keywords related to violation symptoms to collect 606 (out of 21,583) code review comments from four popular OSS projects in the OpenStack and Qt communities. We manually analyzed the collected 606 review comments to provide the categories and linguistic patterns of violation symptoms, as well as the reactions how developers addressed them. Our findings show that: (1) 10 categories of violation symptoms are discussed by developers during the code review process; (2) The frequently-used terms of expressing violation symptoms are "inconsistent" and "violate", and the most frequently-used linguistic pattern is Problem Discovery; (3) Refactoring and removing code are the major measures (90%) to tackle violation symptoms, while a few violation symptoms were ignored by developers. Our findings suggest that the investigation of violation symptoms can help researchers better understand the characteristics of architecture erosion and facilitate the development and maintenance activities, and developers should explicitly manage violation symptoms, not only for addressing the existing architecture violations but also preventing future violations.
翻译:随着软件系统的演进,其架构往往会退化,逐渐阻碍软件的维护与演进活动,并对系统的质量属性产生负面影响。架构侵蚀现象的主要根本原因在于违例症状(例如违反架构模式)。以往的研究侧重于使用架构一致性检查方法来检测软件系统中的违例情况。然而,代码审查评论同样是丰富的信息来源,可能包含大量关于架构违例的讨论。在本研究中,我们从开发者的视角出发,探究了代码审查评论中架构违例症状的特征。我们采用一组与违例症状相关的关键词,从OpenStack和Qt社区中的四个流行开源软件项目中收集了606条(共21,583条)代码审查评论。我们人工分析了所收集的606条审查评论,以提供违例症状的类别和语言模式,以及开发者解决这些症状的应对方式。我们的研究结果表明:(1) 在代码审查过程中,开发者讨论了10类违例症状;(2) 表达违例症状的常用术语是“inconsistent”和“violate”,最常用的语言模式是“问题发现”;(3) 重构和移除代码是解决违例症状的主要措施(占90%),而少数违例症状被开发者忽略。我们的发现表明,对违例症状的研究可以帮助研究者更好地理解架构侵蚀的特征,并促进开发与维护活动;同时,开发者应明确管理违例症状,这不仅是为了解决现有架构违例,也是为了预防未来的违例。