Multi-level Automated Refactoring Using Design Exploration
In the past few years, there has been a growing interest in automating refactoring activities using metaheuristic approaches. These current refactoring approaches involve source-to-source transformation. However, detailed information at source-code level makes precondition checking and source-level refactorings hard to perform. It also severely limits how extensively a program can be refactored. While design improvement tools can be used for a deep and fast design exploration, it is left to the programmer to manually apply the required refactorings to the source code, which is a burdensome task.
To tackle the above problems, our proposal is based on a multi-level refactoring approach that involves both design and source code in the refactoring process. Initially, the program design is extracted from the source code. Then, in a design exploration phase, using a metaheuristic approach, the design is transformed to a better one in terms of a metrics suite as well as the user perspective. The source code is then refactored based on both the improved design and the metrics suite. Using this approach, we expect a deeper and faster exploration of the program design space, that may result more opportunities for design improvement.
KeywordsMulti-level refactoring search-based refactoring design exploration
Unable to display preview. Download preview PDF.
- 2.Amoui, M., Mirarab, S., Ansari, S., Lucas, C.: A genetic algorithm approach to design evolution using design pattern transformation. International Journal of Information Technology and Intelligent Computing 1(2), 235–244 (2006)Google Scholar
- 4.Harman, M., Mansouri, S.A., Zhang, Y.: Search based software engineering: A comprehensive analysis and review of trends techniques and applications. Tech. Rep. TR-09-03 (April 2009)Google Scholar
- 5.Harman, M., Tratt, L.: Pareto optimal search based refactoring at the design level. In: Proceedings of the 9th Annual Conference on Genetic and Evolutionary Computation, GECCO 2007, pp. 1106–1113. ACM, New York (2007)Google Scholar
- 6.Hemati Moghadam, I., Ó Cinnéide, M.: Code-imp: a tool for automated search-based refactoring. In: Proceeding of the 4th Workshop on Refactoring Tools, WRT 2011, pp. 41–44. ACM, New York (2011)Google Scholar
- 7.Jensen, A.C., Cheng, B.H.: On the use of genetic programming for automated refactoring and the introduction of design patterns. In: Proceedings of the 12th Annual Conference on Genetic and Evolutionary Computation, pp. 1341–1348 (2010)Google Scholar
- 8.O’Keeffe, M., Ó Cinnéide, M.: Search-based software maintenance. In: Proceedings of the 10th Conference on Software Maintenance and Reengineering (CSMR 2006), pp. 249–260. IEEE, Italy (2006)Google Scholar
- 11.Roberts, D.B.: Practical Analysis for Refactoring. Ph.D. thesis, Department of Computer Science, Champaign, IL, USA (1999)Google Scholar
- 12.Seng, O., Stammel, J., Burkhart, D.: Search-based determination of refactorings for improving the class structure of object-oriented systems. In: Proceedings of the 8th Annual Conference on Genetic and Evolutionary Computation, GECCO 2006, pp. 1909–1916. ACM, New York (2006)Google Scholar