Multi-level Automated Refactoring Using Design Exploration

  • Iman Hemati Moghadam
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6956)


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.


Multi-level refactoring search-based refactoring design exploration 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Brito e Abreu, F., Carapuça, R.: Candidate metrics for object-oriented software within a taxonomy framework. Journal of Systems and Software 26, 87–96 (1994)CrossRefGoogle Scholar
  2. 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
  3. 3.
    Bansiya, J., Davis, C.: A hierarchical model for object-oriented design quality assessment. IEEE Transactions on Software Engineering 28, 4–17 (2002)CrossRefGoogle Scholar
  4. 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. 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. 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. 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. 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
  9. 9.
    O’Keeffe, M., Ó Cinnéide, M.: Search-based refactoring for software maintenance. Journal of Systems and Software 81(4), 502–516 (2008)CrossRefGoogle Scholar
  10. 10.
    Raiha, O., Koskimies, K., Mkinen, E.: Genetic Synthesis of Software Architecture. In: Li, X., et al. (eds.) SEAL 2008. LNCS, vol. 5361, pp. 565–574. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  11. 11.
    Roberts, D.B.: Practical Analysis for Refactoring. Ph.D. thesis, Department of Computer Science, Champaign, IL, USA (1999)Google Scholar
  12. 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
  13. 13.
    Simons, C., Parmee, I., Gwynllyw, R.: Interactive, evolutionary search in upstream object-oriented class design. IEEE Transactions on Software Engineering 36(6), 798–816 (2010)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Iman Hemati Moghadam
    • 1
  1. 1.School of Computer Science and InformaticsUniversity CollegeDublinIreland

Personalised recommendations