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社区四个受欢迎的开放源码软件项目(21 583个项目)中的606个代码审查评论。我们手动分析了所收集的606个审查评论,以提供违规症状的类别和语言模式,以及开发者如何应对这些现象的反应。我们的研究结果表明:(1) 开发者在代码审查进程中讨论10类违规现象的特征;(2) 经常使用的表达违规症状的术语应该是“不一致的”和“违反”,而最常用的语言模式是“危机” ;(3) 我们人工分析所收集的违规现象的类别和行为特征,同时提出我们调查的标定的症状是更好地处理违反规则的症状。