AutoRefactoring: A platform to build refactoring agents

作者:dos Santos Neto Baldoino Fonseca; Ribeiro Marcio; da Silva Viviane Torres; Braga Christiano; Pereira de Lucena Carlos Jose; Costa Evandro de Barros
来源:Expert Systems with Applications, 2015, 42(3): 1652-1664.
DOI:10.1016/j.eswa.2014.09.022

摘要

Software maintenance may degrade the software quality. One of the primary ways to reduce undesired effects of maintenance is refactoring, which is a technique to improve software code quality without changing its observable behavior. To safely apply a refactoring, several issues must be considered: (i) identify the code parts that should be improved; (ii) determine the changes that must be applied to the code in order to improve its; (iii) evaluate the corrections impacts on code quality; and (iv) check that the observable behavior of the software will be preserved after applying the corrections. Given the amount of issues to consider, refactoring by hand has been assumed to be an expensive and error-prone task. Therefore, in this paper, we propose an agent-based platform that enables to implement an agent able to autonomously deal with the above mentioned refactoring issues. To evaluate our approach, we performed an empirical study on code smells detection and correction, code quality improvement and preservation of the software observable behavior. To answer our research questions, we analyze 5 releases of Java open source projects, ranging from 166 to 711 classes.

  • 出版日期2015-2-15