Refactoring is a maintenance activity that aims to improve design quality while preserving the behavior of a system. Several (semi)automated approaches have been proposed to support developers in this maintenance activity, based on the correction of anti-patterns, which are `poor' solutions to recurring design problems. However, little quantitative evidence exists about the impact of automatically refactored code on program comprehension, and in which context automated refactoring can be as effective as manual refactoring. Leveraging RePOR, an automated refactoring approach based on partial order reduction techniques, we performed an empirical study to investigate whether automated refactoring code structure affects the understandability of systems during comprehension tasks. (1) We surveyed 80 developers, asking them to identify from a set of 20 refactoring changes if they were generated by developers or by a tool, and to rate the refactoring changes according to their design quality; (2) we asked 30 developers to complete code comprehension tasks on 10 systems that were refactored by either a freelancer or an automated refactoring tool. To make comparison fair, for a subset of refactoring actions that introduce new code entities, only synthetic identifiers were presented to practitioners. We measured developers' performance using the NASA task load index for their effort, the time that they spent performing the tasks, and their percentages of correct answers. Our findings, despite current technology limitations, show that it is reasonable to expect a refactoring tools to match developer code.
Toward Refactoring of DMARF and GIPSY Case Studies -- a Team 9 SOEN6471-S14 Project Report
软件体系结构由一系列决策组成,这些决策是为了提供满足所有技术和操作需求的结构化解决方案而做出的。本文涉及代码重构。代码重构是一个在不改变代码外部行为的情况下改变代码内部结构的过程。本文重点介绍了开源系统DMARF和GIPSY的实验研究。我们查阅了各种研究论文并分析了它们的架构。重构提高了代码的可理解性、可维护性和可扩展性。代码气味是通过各种工具识别的,如JDeodorant、Logiscope和CodePro。为了更好地理解系统,对DMARF和GIPSY进行了逆向工程。用于此的工具是Object Aid UML。为了更好地理解用例,建立了领域模型、设计类图。
Bugs in the Shadows: Static Detection of Faulty Python Refactorings
Federal University of Campina Grande(坎皮纳格兰德联邦大学);Federal University of Alagoas(阿拉戈阿斯联邦大学);Pontifical Catholic University of Rio de Janeiro(里约热内卢天主教 Pontifical 大学)
Specification-first convergence with an AI coding agent: a case study of dismantling a core architectural invariant across 189 files in a 717k-line codebase with no test oracle and no human code review
Identification and Assessment of Software Design Pattern Violations
为了在快速开发环境中保存、扩展和重用软件项目,设计模式实现的验证以识别模式违反已经成为重新工程过程的一部分。如果设计模式实现不符合它们的定义,则会被视为违规。软件老化和开发人员缺乏经验是设计模式违反的根源。根据一些预定义的特征来检查设计模式实现的正确性以检测和纠正违规,从而降低成本是很重要的。目前,已经开发了几种工具来检测设计模式实例,但在创建一个自动化工具来识别和验证设计模式违规方面所做的工作很少。在本文中,我们提出了一个设计模式违规识别和评估(DPVIA)工具,它有能力识别软件设计模式违规,并报告模式实例实现的一致性得分对一组预定义的特征,任何设计模式定义,无论是Gang of Four(GoF)设计模式由Gamma等人[1];或自定义模式由软件开发人员。此外,我们已经验证了所提出的工具的有效性,使用两个评估实验和结果进行手动检查。最后,为了评估所提出的工具的功能,它进行了评估与数据集包含5,679,964行代码中的28,669在15个开源项目,与大小的开源项目,广泛和系统地采用设计模式,以确定设计模式的违规行为,并建议重构解决方案,从而保持软件进化的成本。软件架构师可以使用这些结果在使用设计模式的同时开发最佳实践。