arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1808.04352cs.SE
收藏

RePOR:在重构任务上模仿人类。我们到了吗?

RePOR: Mimicking humans on refactoring tasks. Are we there yet?

Rodrigo Morales, Foutse Khomh, Giuliano Antoniol

摘要:

重构是一种维护活动,旨在提高设计质量,同时保持系统的行为。已经提出了几种(半)自动化的方法,以支持开发人员在此维护活动的基础上,纠正反模式,这是“穷人”的解决方案,经常性的设计问题。然而,很少有定量的证据存在的影响,自动重构的代码对程序的理解,在这种情况下,自动重构可以有效的手动重构。利用RePOR,一种基于偏序约简技术的自动重构方法,我们进行了一项实证研究,以调查自动重构代码结构是否会影响系统在理解任务中的可理解性。(1)我们调查了80名开发人员,要求他们从一组20个重构更改中识别出它们是由开发人员还是由工具生成的,并根据它们的设计质量对重构更改进行评级;(2)我们要求30名开发人员在10个由自由职业者或自动重构工具重构的系统上完成代码理解任务。为了使比较公平,对于引入新代码实体的重构操作子集,只向从业者提供合成标识符。我们使用NASA任务负荷指数来衡量开发人员的表现,包括他们的努力、他们执行任务所花费的时间以及他们正确答案的百分比。我们的研究结果表明,尽管目前的技术限制,这是合理的期望重构工具,以匹配开发人员的代码。

英文摘要:

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.

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

↑