@article {290,
	title = {On the use of developers{\textquoteright} context for automatic refactoring of software anti-patterns},
	journal = {Journal of Systems and Software},
	volume = {128},
	year = {2017},
	month = {06/2017},
	pages = {236-251},
	abstract = {<p>Abstract Anti-patterns are poor solutions to design problems that make software systems hard to understand and extend. Entities involved in anti-patterns are reported to be consistently related to high change and fault rates. Refactorings, which are behavior preserving changes are often performed to remove anti-patterns from software systems. Developers are advised to interleave refactoring activities with their regular coding tasks to remove anti-patterns, and consequently improve software design quality. However, because the number of anti-patterns in a software system can be very large, and their interactions can require a solution in a set of conflicting objectives, the process of manual refactoring can be overwhelming. To automate this process, previous works have modeled anti-patterns refactoring as a batch process where a program provides a solution for the total number of classes in a system, and the developer has to examine a long list of refactorings, which is not feasible in most situations. Moreover, these proposed solutions often require that developers modify classes on which they never worked before (i.e., classes on which they have little or no knowledge). To improve on these limitations, this paper proposes an automated refactoring approach, ReCon (Refactoring approach based on task Context), that leverages information about a developer{\textquoteright}s task (i.e., the list of code entities relevant to the developer{\textquoteright}s task) and metaheuristics techniques to compute the best sequence of refactorings that affects only entities in the developer{\textquoteright}s context. We mine 1705 task contexts (collected using the Eclipse plug-in Mylyn) and 1013 code snapshots from three open-source software projects (Mylyn, PDE, Eclipse Platform) to assess the performance of our proposed approach. Results show that ReCon can remove more than 50\% of anti-patterns in a software system, using fewer resources than the traditional approaches from the literature.</p>
},
	keywords = {Metaheuristics},
	issn = {0164-1212},
	doi = {http://dx.doi.org/10.1016/j.jss.2016.05.042},
	url = {http://www.sciencedirect.com/science/article/pii/S0164121216300632},
	author = {Rodrigo Morales and Z{\'e}phyrin Soh and Foutse Khomh and Giuliano Antoniol and Francisco Chicano}
}
