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

设计反模式和设计模式突变及其变更和错误倾向性研究

Investigating Design Anti-pattern and Design Pattern Mutations and Their Change- and Fault-proneness

Zeinab, Kermansaravi, Md Saidur Rahman, Foutse Khomh, Fehmi Jaafar, Yann-Gael Gueheneuc

摘要:

在软件演化过程中,当缺乏经验的开发人员修改他们的软件系统以修复错误或根据需求的变化添加新功能时,他们可能会引入设计反模式。开发人员还可以使用设计模式来提高软件质量,或者作为某些设计反模式的可能解决方案。因此,设计模式和设计反模式由开发人员引入、删除和变异。许多研究调查了设计模式和设计反模式的演变及其对软件开发的影响。然而,他们孤立地研究了设计模式或设计反模式,没有考虑它们的突变以及这些突变对软件质量的影响。因此,我们报告我们的研究设计模式和设计反模式之间的双向突变和这些突变对软件的变化和故障倾向的影响。我们分析了7个Java软件系统的快照,这些系统具有不同的规模、演化历史和应用领域。我们构建了马尔可夫模型来捕获不同设计模式和设计反模式突变的发生概率。我们的研究结果表明:(1)设计模式和设计反模式突变为其他设计模式和/或设计反模式。它们还表明:(2)某些更改类型主要触发设计模式和设计反模式的突变(重命名和对注释、声明和操作符的更改),以及(3)设计反模式和设计模式的某些突变在特定上下文中更容易出错。这些结果提供了重要的洞察设计模式和设计反模式的演变及其对软件系统的变化和故障倾向的影响。

英文摘要:

During software evolution, inexperienced developers may introduce design anti-patterns when they modify their software systems to fix bugs or to add new functionalities based on changes in requirements. Developers may also use design patterns to promote software quality or as a possible cure for some design anti-patterns. Thus, design patterns and design anti-patterns are introduced, removed, and mutated from one another by developers. Many studies investigated the evolution of design patterns and design anti-patterns and their impact on software development. However, they investigated design patterns or design anti-patterns in isolation and did not consider their mutations and the impact of these mutations on software quality. Therefore, we report our study of bidirectional mutations between design patterns and design anti-patterns and the impacts of these mutations on software change- and fault-proneness. We analyzed snapshots of seven Java software systems with diverse sizes, evolution histories, and application domains. We built Markov models to capture the probability of occurrences of the different design patterns and design anti-patterns mutations. Results from our study show that (1) design patterns and design anti-patterns mutate into other design patterns and/or design anti-patterns. They also show that (2) some change types primarily trigger mutations of design patterns and design anti-patterns (renaming and changes to comments, declarations, and operators), and (3) some mutations of design anti-patterns and design patterns are more faulty in specific contexts. These results provide important insights into the evolution of design patterns and design anti-patterns and its impact on the change- and fault-proneness of software systems.

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

↑