Recommending Trips in the Archipelago of Refactorings
The essence of refactoring is to improve source code quality, in a principled, behavior preserving, one step at the time, process. To this end, the developer has to figure out the refactoring steps, while working on a specific source code fragment. To facilitate this task, the documentation that explains each primitive refactoring typically provides guidelines and tips on how to combine it with further refactorings. However, the developer has to cope with many refactorings and lots of guidelines.
To deal with this problem, we propose a graph-based model that formally specifies refactoring guidelines and tips in terms of nodes that correspond to refactorings and edges that denote part-of, instead-of and succession relations. We refer to this model as the Map of the Archipelago of Refactorings and we use it as the premise of the Refactoring Trip Advisor, a refactoring recommendation tool that facilitates the combination of refactorings. A first assessment of the tool in a practical scenario that involves 16 developers and a limited set of refactorings for composing and moving methods brought out positive results that motivate further studies of a larger scale and scope.
KeywordsRefactoring recommendation Refactoring graph Refactoring combination
We would like to thank the anonymous reviewers for their feedback on the paper.
- 1.Cook, T.D., Campbell, D.T.: Quasi-Experimentation: Design and Analysis Issues for Field Settings. Houghton Mifflin Company, Boston (1979)Google Scholar
- 8.Moghadam, I.H., Cinnéide, M.Ó.: Resolving conflict and dependency in refactoring to a desired design. e-Informatica 9(1), 37–56 (2015)Google Scholar
- 11.Opdyke, W.F.: Refactoring object-oriented frameworks. Ph.D. thesis, University of Illinois - Urbana Champaign (1992)Google Scholar
- 14.Tsimakis, A., Zarras, A.V., Vassiliadis, P.: The three-step refactoring detector pattern. In: Proceedings of the 24th European Conference on Pattern Languages of Programs (EuroPLoP) (2019, to appear). www.cs.uoi.gr/~zarras/papers/C36.pdf
- 16.Zarras, A.V., Vartziotis, T., Vassiliadis, P.: Navigating through the archipelago of refactorings. In: Proceedings of the the Joint 23rd ACM SIGSOFT Symposium on the Foundations of Software Engineering and 15th European Software Engineering Conference (FSE/ESEC), pp. 922–925 (2015)Google Scholar