Towards an Autonomous Bot for Automatic Source Code Refactoring

Towards an Autonomous Bot for Automatic Source Code Refactoring
复制标题

迈向自动源代码重构的自主机器人

DOI:
10.1109/botse.2019.00015
复制
发表时间:
2019
期刊:
2019 IEEE/ACM 1st International Workshop on Bots in Software Engineering (BotSE)
影响因子:
--
通讯作者:
J. Bogner
J. Bogner
中科院分区:
--
文献类型:
--
作者:
Marvin Wyrich;J. Bogner

文献摘要

被引文献

相似文献

持续重构对于保持源代码质量和应对技术债务是必要的。由于手动重构效率低且容易出错,过去已经提出了各种自动化重构的解决方案。然而,实证研究表明,这些解决方案并没有被软件开发人员广泛接受,大多数重构仍然是手动执行的。例如,开发人员报告说,重构工具应该支持审查更改的功能。他们还批评引入此类工具需要花费大量精力进行配置并集成到当前的开发环境中。在本文中,我们介绍了我们对 Refactoring-Bot 的工作,这是一个自主机器人,可以像人类开发人员一样通过现有的版本控制平台集成到团队中。该机器人自动执行重构以解决代码异味,并通过拉取请求向开发人员呈现更改以进行异步审查。这样,开发人员的工作流程就不会中断,并且可以使用熟悉的工具随时查看更改。然后,只需按一下按钮即可将建议的重构集成到代码库中。我们详细阐述我们的愿景,讨论设计决策,描述当前的开发状态,并对计划的开发和研究活动进行展望。
Continuous refactoring is necessary to maintain source code quality and to cope with technical debt. Since manual refactoring is inefficient and error-prone, various solutions for automated refactoring have been proposed in the past. However, empirical studies have shown that these solutions are not widely accepted by software developers and most refactorings are still performed manually. For example, developers reported that refactoring tools should support functionality for reviewing changes. They also criticized that introducing such tools would require substantial effort for configuration and integration into the current development environment. In this paper, we present our work towards the Refactoring-Bot, an autonomous bot that integrates into the team like a human developer via the existing version control platform. The bot automatically performs refactorings to resolve code smells and presents the changes to a developer for asynchronous review via pull requests. This way, developers are not interrupted in their workflow and can review the changes at any time with familiar tools. Proposed refactorings can then be integrated into the code base via the push of a button. We elaborate on our vision, discuss design decisions, describe the current state of development, and give an outlook on planned development and research activities.