Several refactorings performed while evolving software features aim to improve internal quality attributes like cohesion and complexity. Indeed, internal attributes can become critical if their measurements assume anomalous values. Yet, current knowledge is scarce on how developers perceive the relevance of critical internal attributes while evolving features. This qualitative study investigates the developers' perception of the relevance of critical internal attributes when evolving features. We target six class-level critical attributes: low cohesion, high complexity, high coupling, large hierarchy depth, large hierarchy breadth, and large size. We performed two industrial case studies based on online focus group sessions. Developers discussed how much (and why) critical attributes are relevant when adding or enhancing features. We assessed the relevance of critical attributes individually and relatively, the reasons behind the relevance of each critical attribute, and the interrelations of critical attributes. Low cohesion and high complexity were perceived as very relevant because they often make evolving features hard while tracking failures and adding features. The other critical attributes were perceived as less relevant when reusing code or adopting design patterns. An example of perceived interrelation is high complexity leading to high coupling.
翻译:多项在软件功能演化过程中执行的代码重构旨在改善内聚性、复杂度等内部质量属性。事实上,若内部属性测度值呈现异常,便可能成为关键属性。然而,当前关于开发者在功能演化过程中对关键内部属性相关性的认知仍知之甚少。本定性研究探究了开发者在功能演化过程中对关键内部属性相关性的认知。我们聚焦六类类级关键属性:低内聚性、高复杂度、高耦合度、大层次深度、大层次广度及大尺寸。基于在线焦点小组会议,我们开展了两项工业案例研究。开发者讨论了添加或增强功能时关键属性的相关程度及原因。我们评估了关键属性的独立相关性、相对相关性、每项关键属性相关性的背后原因,以及关键属性间的相互关系。低内聚性与高复杂度被视为高度相关,因其常导致功能演化过程中故障追溯与功能添加困难。其他关键属性在代码复用或采用设计模式时被认为相关性较低。一个感知到的相互关系的例子是高复杂度导致高耦合度。