Software Quality Journal

, Volume 25, Issue 2, pp 473–501 | Cite as

Multi-view refactoring of class and activity diagrams using a multi-objective evolutionary algorithm

  • Usman Mansoor
  • Marouane KessentiniEmail author
  • Manuel Wimmer
  • Kalyanmoy Deb


To improve the quality of software systems, one of the widely used techniques is refactoring defined as the process of improving the design of an existing system by changing its internal structure without altering the external behavior. The majority of existing refactoring work focuses mainly on the source code level. The suggestion of refactorings at the model level is more challenging due to the difficulty to evaluate: (a) the impact of the suggested refactorings applied to a diagram on other related diagrams to improve the overall system quality, (b) their feasibility, and (c) interdiagram consistency. We propose, in this paper, a novel framework that enables software designers to apply refactoring at the model level. To this end, we used a multi-objective evolutionary algorithm to find a trade-off between improving the quality of class and activity diagrams. The proposed multi-objective approach provides a multi-view for software designers to evaluate the impact of suggested refactorings applied to class diagrams on related activity diagrams in order to evaluate the overall quality, and check their feasibility and behavior preservation. The statistical evaluation performed on models extracted from four open-source systems confirms the efficiency of our approach.


Search-based software engineering Software maintenance Multi-objective optimization 


  1. Arcelli, D., Cortellessa, V., & Trubiani, C. (2012). Antipattern-based model refactoring for software performance improvement. In QoSA, pp. 33–42.Google Scholar
  2. Arendt, T., & Taentzer, G. (2013). A tool environment for quality assurance based on the Eclipse modeling framework. Automated Software Engineering, 20(2), 141–184.CrossRefGoogle Scholar
  3. Bansiya, J., & Davis, C. G. (2002). A hierarchical model for object-oriented design quality assessment. IEEE Transactions on Software Engineering, 28(1), 4–17.CrossRefGoogle Scholar
  4. Biermann, E., Ehrig, K., Köhler, C., Kuhns, G., Taentzer, G., & Weiss, E. (2006). Graphical definition of in-place transformations in the Eclipse modeling framework. In MoDELS’06. LNCS (Vol. 4199, pp. 425–439). Springer.Google Scholar
  5. Bock, Conrad. (2003). UML 2 activity and action models, Part 2: Actions. Journal of Object Technology, 2(5), 41–56.CrossRefGoogle Scholar
  6. Boger, M., Sturm, T., & Fragemann, P. (2002). Refactoring browser for UML. In NetObjectDays’02. LNCS (Vol. 2591, pp. 366–377). Springer.Google Scholar
  7. Bottoni, P., Parisi-Presicce, F., & Taentzer, G. (2003). Specifying integrated refactoring with distributed graph transformations. In AGTIVE 2003, pp. 220–235.Google Scholar
  8. Cardoso, J., Mendling, J., Neumann, G., & Reijers, H. A. (2006). A discourse on complexity of process models. In BPM Workshops.Google Scholar
  9. Cicchetti, A., Ruscio, D. D., & Pierantonio, A. (2009). Managing dependent changes in coupled evolution. In ICMT’09. LNCS (Vol. 5563, pp. 35–51). Springer.Google Scholar
  10. Cohen, J. (1988). Statistical power analysis for the behavioral sciences. Mahwah: Lawrence Erlbaum Associates.zbMATHGoogle Scholar
  11. Correa, A., & Werner, C. (2004). Applying refactoring techniques to UML/OCL models. In Proceedings of Int’l Conference UML 2004. LNCS (Vol. 3273, pp. 173–187). Springer.Google Scholar
  12. Crane, M. L., & Dingel, J. (2008). Towards a formal account of a foundational subset for executable UML models. In Model driven engineering languages and systems (pp. 675–689). BerlIn Springer.Google Scholar
  13. Deb, K., Pratap, A., Agarwal, S., & Meyarivan, T. (2002). A fast and elitist multiobjective genetic algorithm: NSGA-II. IEEE Transactions on Evolutionary Computation, 6, 182–197.CrossRefGoogle Scholar
  14. Eramo, R., Pierantonio, A., Romero, J. R., & Vallecillo, A. (2008). Change management in multiviewpoint systems using ASP. In WODPEC’08. IEEE.Google Scholar
  15. Fenton, N., & Pfleeger, S. L. (1997). Software metrics: A rigorous and practical approach. London, UK: International Thomson Computer Press.Google Scholar
  16. Fowler, M., Beck, K., Brant, J., Opdyke, W., & Roberts, D. (1999). Refactoring: Improving the design of existing code. Boston, MA: Addison-Wesley. ISBN: 0-201-48567-2.Google Scholar
  17. France, R. B., Ghosh, S., Song, E., & Kim, D.-K. (2003). A metamodeling approach to pattern-based model refactoring. IEEE Software, 20(5), 52–58.CrossRefGoogle Scholar
  18. Ghannem, A., El Boussaidi, G., & Kessentini, M. (2013). Model refactoring using interactive genetic algorithm. In G. Ruhe & Y. Zhang (Eds.), Search based software engineering (pp. 96–110). Berlin, Heidelberg: Springer.CrossRefGoogle Scholar
  19. Goldberg, D. E. (1989). Genetic algorithms in search, optimization and machine learning. Boston: Addison-Wesley Longman Publishing Co., Inc.zbMATHGoogle Scholar
  20. Grundy, J., Hosking, J., & Mugridge, W. B. (1998). Inconsistency management for multiple-view software development environments. IEEE Transactions on Software Engineering, 24(11), 960–981.CrossRefGoogle Scholar
  21. Harman, M., & Tratt, L. (2007). Pareto optimal search based refactoring at the design level. In Proceedings of the 9th annual conference on genetic and evolutionary computation (pp. 1106–1113). ACM, 2007.Google Scholar
  22. Kessentini, M., Kessentini, W., Sahraoui, H., Boukadoum, M., & Ouni, A. (2011). Design defects detection and correction by example, In 19th IEEE ICPC11 (pp. 81–90), Kingston, Canada.Google Scholar
  23. Kolovos, D. S., Paige, R. F., Polack, F., & Rose, L. M. (2007). Update transformations in the small with the Epsilon wizard language. JOT, 6(9), 53–69.CrossRefGoogle Scholar
  24. Ma, H., Shao, W., Zhang, L., Ma, Z., & Jiang, Y. (2004). Applying OO metrics to assess UML meta-models. In «UML» 2004—The Unified Modeling Language. Modeling Languages and Applications (pp. 12–26). Berlin, Heidelberg: Springer.Google Scholar
  25. Markovic, S., & Baar, T. (2008). Refactoring OCL annotated UML class diagrams. Software and Systems Modeling, 7(1), 25–47.CrossRefGoogle Scholar
  26. Mens, T. (2006). On the use of graph transformations for model refactoring. In Generative and transformational techniques in software engineering. LNCS (Vol. 4143, pp. 219–257). Springer.Google Scholar
  27. Mens, T., Taentzer, G., & Müller, D. (2007a). Challenges in model refactoring. In Proceedings of 1st workshop on refactoring tools. University of Berlin.Google Scholar
  28. Mens, T., Taentzer, G., & Runge, O. (2007b). Analyzing refactoring dependencies using graph transformation. Journal on Software and Systems Modeling, 6, 269.CrossRefGoogle Scholar
  29. Mens, T., & Tourwé, T. (2004). A survey of software refactoring. IEEE Transactions on Software Engineering, 30(2), 126–139.CrossRefGoogle Scholar
  30. Moghadam, I. H., & Cinneide, M. O. (2012). Automated refactoring using design differencing. In Software maintenance and reengineering (CSMR), 2012 16th European conference on (pp. 43–52). IEEE. Google Scholar
  31. Moha, N., Mahé, V., Barais, O., & Jézéquel, J. M. (2009). Generic model refactorings. In Model driven engineering languages and systems (pp. 628–643). Berlin, Heidelberg: Springer.Google Scholar
  32. Mohamed, M., Romdhani, M., & Ghédira, K. (2009). Classification of model refactoring approaches. JOT, 8(6), 143–158.CrossRefGoogle Scholar
  33. Ó Cinnéide, M., Tratt, L., Harman, M., Counsell, S., & Hemati Moghadam, I. (2012, September). Experimental assessment of software metrics using automated refactoring. In Proceedings of the ACM-IEEE international symposium on empirical software engineering and measurement (pp. 49–58). ACM.Google Scholar
  34. Porres, I. (2005). Rule-based update transformations and their application to model refactorings. Software and Systems Modeling, 4(4), 368–385.CrossRefGoogle Scholar
  35. Rachmawati, L., & Srinivasan, D. (2009). Multiobjective evolutionary algorithm with controllable focus on the knees of the pareto front. IEEE Transactions on Evolutionary Computation, 13(4), 810–824.CrossRefGoogle Scholar
  36. Ráth, I., Varró, G., & Varró, D. (2009). Change-driven model transformations. In MODELS’09. LNCS (Vol. 5795, pp. 342–356). Springer.Google Scholar
  37. Reimann, J., Seifert, M., & Aßmann, U. (2010). Role-based generic model refactoring. In Model driven engineering languages and systems (pp. 78–92). Berlin, Heidelberg: Springer.Google Scholar
  38. Sjøberg, D. I. K., Yamashita, A. F., Anda, B. C. D., Mockus, A., & Dybå, T. (2013). Quantifying the effect of code smells on maintenance effort. IEEE Transactions on Software Engineering, 39(8), 1144–1156.CrossRefGoogle Scholar
  39. Steimann, F. (2011). Constraint-based model refactoring. In Model driven engineering languages and systems (pp. 440–454). Berlin, Heidelberg: Springer Google Scholar
  40. Sun, W., France, R. B., & Ray, I. (2013). Analyzing behavioral refactoring of class models. In ME@MoDELS 2013, pp. 70–79.Google Scholar
  41. Sunye, G., et al. (2001). Refactoring UML models. In Proceedings of UML.Google Scholar
  42. Sunyé, G., Pollet, D., Traon, Y. L., & Jézéquel, J. M. (2001). Refactoring UML models. In UML’01. LNCS, Vol. 2185 (pp. 134–148). Springer.Google Scholar
  43. Van Der Straeten, R., Jonckers, V., & Mens, T. (2004). Supporting model refactorings through behaviour inheritance consistencies, In UML. LNCS, Vol. 3273 (pp. 305–319), Springer.Google Scholar
  44. Van Gorp, P., Stenten, H., Mens, T., & Demeyer, S. (2003). Towards automating source-consistent UML refactorings, In UML. LNCS, Vol. 2863 (pp. 144–158). Heidelberg: Springer.Google Scholar
  45. Van Kempen, M., Chaudron, M., Koudrie, D., & Boake, A. (2005). Towards proving preservation of behaviour of refactoring of UML models. In Proceedings of SAICSIT 2005, pp. 111–118.Google Scholar
  46. von Pilgrim, J., Ulke, B., Thies, A., & Steimann, F. (2013). Model/code co-refactoring: An MDE approach. In ASE, pp. 682–687.Google Scholar
  47. Wimmer, M., Moreno, N., & Vallecillo, A. (2012). Viewpoint co-evolution through coarse-grained changes and coupled transformations. TOOLS, 50, 336–352.Google Scholar
  48. Zhang, J., Lin, Y., & Gray, J. (2005). Generic and domain-specific model refactoring using a model transformation engine. In Model-driven software development—research and practice in software engineering (pp. 199–217). Springer.Google Scholar

Copyright information

© Springer Science+Business Media New York 2015

Authors and Affiliations

  • Usman Mansoor
    • 1
  • Marouane Kessentini
    • 1
    Email author
  • Manuel Wimmer
    • 2
  • Kalyanmoy Deb
    • 3
  1. 1.University of MichiganDearbornUSA
  2. 2.Vienna University of TechnologyViennaAustria
  3. 3.Michigan State UniversityEast LansingUSA

Personalised recommendations