Empirical Software Engineering

, Volume 22, Issue 2, pp 670–715 | Cite as

Search-based detection of model level changes

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


Software models, defined as code abstractions, are iteratively refined, restructured, and evolved due to many reasons such as reflecting changes in requirements or modifying a design to enhance existing features. For understanding the evolution of a model a-posteriori, change detection approaches have been proposed for models. The majority of existing approaches are successful to detect atomic changes. However, composite changes, such as refactorings, are difficult to detect due to several possible combinations of atomic changes or eventually hidden changes in intermediate model versions that may be no longer available. Moreover, a multitude of refactoring sequences may be used to describe the same model evolution. In this paper, we propose a multi-objective approach to detect model changes as a sequence of refactorings. Our approach takes as input an exhaustive list of possible types of model refactoring operations, the initial model, and the revised model, and generates as output a list of refactoring applications representing a good compromise between the following two objectives (i) maximize the similarity between the expected revised model and the generated model after applying the refactoring sequence on the initial model, and (ii) minimize the number of atomic changes used to describe the evolution. In fact, minimizing the number of atomic changes can important since it is maybe easier for a designer to understand and analyze a sequence of refactorings (composite model changes) rather than an equivalent large list of atomic changes (Weissgerber and Diehl 2006). Due to the huge number of possible refactoring sequences, a metaheuristic search method is used to explore the space of possible solutions. To this end, we use the non-dominated sorting genetic algorithm (NSGA-II) to find the best trade-off between our two objectives. The paper reports on the results of an empirical study of our multi-objective model changes detection technique as applied on various versions of real-world models taken from open source projects and one industrial project. We compared our approach to the simple deterministic greedy algorithm, multi-objective particle swarm optimization (MOPSO), an existing mono-objective changes detection approach, and two model changes detection tools not based on computational search. The statistical test results provide evidence to support the claim that our proposal enables the generation of changes detection solutions with correctness higher than 85 %, in average, using a variety of real-world scenarios.


Search-based software engineering Software maintenance Multi-objective optimization Model changes detection 


  1. Alanen M, Porres I (2003) Difference and union of models. Proc Int Conf Unified Model Language (UML’03) LNCS 2863:2–17, SpringerGoogle Scholar
  2. Arcuri A, Briand LC (2011) A practical guide for using statistical tests to assess randomized algorithms in software engineering. Proc 33rd Int Conf Software Eng (ICSE ’11)Google Scholar
  3. Bechikh S, Ben Said L, Ghédira K (2010) Estimating nadir point in multi-objective optimization using mobile reference points. Proc IEEE Congress Evolution Comput (CEC’10): 2129–2137Google Scholar
  4. Ben Fadhel A, Kessentini M, Langer P, Wimmer M (2012) Search-based detection of high-level model changes. Proc 28th IEEE Int Conf Software Maintenance, ItalyGoogle Scholar
  5. Briand LC, Labiche Y, Soccar G (2002) “Automating impact analysis and regression test selection based on UML designs”. Proc Int Conf Software Maintenance. IEEE: 251–260Google Scholar
  6. Brosch P, Langer P, Seidl M, Wieland K, Wimmer M, Kappel G, Retschitzegger W, Schwinger W (2009) An example is worth a thousand words: composite operation modeling by-example. Proc MoDELS’09, Springer, 271–285Google Scholar
  7. Brosch P, Seidl M, Wimmer M, Kappel G (2012) Conflict visualization for evolving UML models. J Object Technol 11(3):2, 1-30CrossRefGoogle Scholar
  8. Brown WJ, Malveau RC, Brown WH, Mowbray TJ (1998) “Anti patterns: refactoring software, architectures, and projects in crisis,”. John Wiley & Sons, ISBN 978-0471197133Google Scholar
  9. Brun C, Pierantonio A (2008) Model differences in the eclipse modeling framework. UPGRADE, Europ J Inform Prof 9(2):29–34Google Scholar
  10. Cicchetti D, Di Ruscio A (2007) Pierantonio: a metamodel independent approach to difference representation. J Object Technol 6(9):165–185CrossRefGoogle Scholar
  11. Deb K, Pratap A, Agarwal S, Meyarivan T (2002) A fast and elitist multiobjective genetic algorithm: NSGA-II. IEEE Trans Evol Comput 6:182–197CrossRefGoogle Scholar
  12. Demeyer S, Ducasse S, Nierstrasz O (2000) Finding refactorings via change metrics. Proc Conf Object-Orient Prog, Syst, Languages, Appl (OOPSLA’00), ACM. 166–177Google Scholar
  13. Dig D, Comertoglu C, Marinov D, Johnson R (2006) Automated detection of refactorings in evolving components. Proc Europ Conf Object-Orient Prog (ECOOP’06), vol. 4067 of LNCS, Springer 404–428Google Scholar
  14. Dig D, Manzoor K, Johnson RE, Nguyen TN (2008) Effective software merging in the presence of object-oriented refactorings. IEEE Trans Softw Eng 34(3):321–335CrossRefGoogle Scholar
  15. Eiben AE, Smit SK (2011) Parameter tuning for configuring and analyzing evolutionary algorithms. Swarm Evol Comput 1(1):19–31CrossRefGoogle Scholar
  16. Ekman T, Asklund U (2004) Refactoring-aware versioning in eclipse. Electronic Notes Theor Comput Sci 107:57–69CrossRefGoogle Scholar
  17. Fluri B, Würsch M, Pinzger M, Gall H (2007) Change distilling: tree differencing for fine-grained source code change extraction. IEEE Trans Software Eng 33(11):725–743CrossRefGoogle Scholar
  18. Fonseca CM, Fleming PJ (1993) Genetic algorithms for multi-objective optimization: formulation, discussion and generalization. In: Forrest S (ed) Proceedings of the fifth international conference on genetic algorithms. Morgan Kauffman, San Mateo, pp 416–423Google Scholar
  19. Fowler M, Beck K, Brant J, Opdyke W, Roberts D (1999) Refactoring – improving the design of existing code; 1st ed. Addison-WesleyGoogle Scholar
  20. France R, Rumpe B (2007) Model-driven development of complex software: a research roadmap. Proc Int Conf Software Eng (ICSE’07): Future Software Eng; IEEE Comput Soc PressGoogle Scholar
  21. Friedman M (1937) The use of ranks to avoid the assumption of normality implicit in the analysis of variance. J Am Stat Assoc (American Statistical Association) 32(200):675–701. doi: 10.2307/2279372.JSTOR2279372 zbMATHGoogle Scholar
  22. Gasevic D, Djuric D, Devedzic V (2009) Model driven engineering and ontology development; 2. edition, SpringerGoogle Scholar
  23. Gîrba T, Ducasse S (2006) Modeling history to analyze software evolution. J Softw Maint Evol Res Pract 18(3):207–236CrossRefGoogle Scholar
  24. Harman M, Jones BF (2001) Search-based software engineering. Inform Software Technol 43(14):833–839CrossRefGoogle Scholar
  25. Harman M, Tratt L (2007) Pareto optimal search based refactoring at the design level. Proc Genet Evolution Comput Conf (GECCO’07): 1106–1113Google Scholar
  26. Harman M, Mansouri SA, Zhang Y (2009) Search based software engineering: a comprehensive analysis and review of trends techniques and applications. Technical report TR-09-03, King’s CollegeGoogle Scholar
  27. T. Kehrer, U. Kelter, G. Taentzer (2011) A rule-based approach to the semantic lifting of model differences in the context of model versioning. Proc Int Conf Automated Software Eng (ASE’11), IEEE, 163–172Google Scholar
  28. Kehrer T, Kelter U, Ohrndorf M, Sollbach T (2012) Understanding model evolution through semantically lifting model differences with SiLift. Proc 28th Int Conf Software Maintenance (ICSM’12), IEEE Comput SocGoogle Scholar
  29. Kessentini M, Sahraoui H, Boukadoum M (2008) Model transformation as an optimization problem. Proc MoDELS’08, vol. 5301 of Springer LNCS, 159–173Google Scholar
  30. Kim M, Notkin D, Grossman DG Jr. (2012) Wilson: identifying and summarizing systematic code changes via rule inference. IEEE Trans Software Eng, early access articleGoogle Scholar
  31. Koegel M, Herrmannsdoerfer M, Li Y, Helming J, Joern D (2010) Comparing state- and operation-based change tracking on models. Proc IEEE Int EDOC ConfGoogle Scholar
  32. Koza JR (1992) Genetic programming: on the programming of computers by means of natural selection. MIT Press, CambridgezbMATHGoogle Scholar
  33. Küster JM, Gerth C, Förster A, Engels G (2008) Detecting and resolving process modeling differences in the absence of a change log. Proc Int Conf Business Process Manag (BPM’08), LNCS, Springer, 244–260Google Scholar
  34. Langer P, Wimmer M, Brosch P, Herrmannsdoerfer M, Seidl M, Wieland K, Kappel G (2012) A posteriori operation detection in evolving software models. J Syst SoftwareGoogle Scholar
  35. Li X (2003) A non-dominated sorting particle swarm optimizer for multiobjective optimization. Proc 2003 Int Conf Genet Evolution Comput (GECCO’03): 37–48Google Scholar
  36. Lin Y, Gray J, Jouault F (2007) DSMDiff: a differentiation tool for domain-specific models. Eur J Inf Syst 16(4):349–361CrossRefGoogle Scholar
  37. Liu H, Yang L, Niu Z, Ma Z, Shao W (2009) Facilitating software refactoring with appropriate resolution order of bad smells. Proc ESEC/FSE’09: 265–268Google Scholar
  38. Mansoor U, Kessentini M, Langer P, Wimmer M, Bechikh S, Deb K (2015) “MOMM: Multi-objective model merging”. J Syst Software, TBD, TBD: 1–20Google Scholar
  39. Mansoor U, Kessentini M, Langer P, Wimmer M, Bechikh S, Deb K (2015b) MOMM: multi-objective model merging. J Syst Softw 103:423–439CrossRefGoogle Scholar
  40. Maoz S, Ringert J, Rumpe B (2010) A manifesto for semantic model differencing. MoDELS workshops. LNCS 6627:194–203, SpringerGoogle Scholar
  41. Mens T, Tourwé T (2004) A survey of software refactoring. IEEE Trans Softw Eng 30(2):126–139CrossRefGoogle Scholar
  42. Moha N, Guéhéneuc Y-G, Duchien L, Meur A-FL (2009) DECOR: a method for the specification and detection of code and design smells. IEEE Trans Software Eng (TSE)Google Scholar
  43. Nejati S, Sabetzadeh M, Chechik M, Easterbrook S, Zave P (2007) Matching and merging of statecharts specifications. Proc Int Conf Software Eng (ICSE 2007): 54–64. IEEEGoogle Scholar
  44. O Cinnéide M (2001) Automated application of design patterns: a refactoring approach. Ph.D. Dissertation. Trinity College DublinGoogle Scholar
  45. Ó Cinnéide M, Tratt L, Harman M, Counsell S, Moghadam IH (2012) Experimental assessment of software metrics using automated refactoring. ESEM: 49–58Google Scholar
  46. Opdyke WF (1992) Refactoring object-oriented frameworks. Ph.D. Dissertation. University of Illinois at Urbana-Champaign, Champaign, IL, USA. UMI Order No. GAX93-05645Google Scholar
  47. Ouni A, Kessentini M, Sahraoui HA, Hamdi MS (2013) The use of development history in software refactoring using a multi-objective evolutionary algorithm. GECCO 1461–1468Google Scholar
  48. Pilskalns O, Uyan G, Andrews A (2006) Regression testing uml designs. 22nd IEEE Int Conf Software Maintenance. ICSM’06. IEEE: 254–264)Google Scholar
  49. Porres I (2003) Model refactorings as rule-based update transformations. Springer, Berlin Heidelberg, pp 159–174Google Scholar
  50. Prete K, Rachatasumrit N, Sudan N, Kim M (2010) Template-based reconstruction of complex refactorings. Proc Int Conf Software Maintenance (ICSM’10), IEEE 1–10Google Scholar
  51. Rivera J, Vallecillo A (2008) Representing and OPERATING WITH MODEL DIFFERENCES. Paige RF, Meyer B (eds.) TOOLS EUROPE 2008. LNBIP 11, 141–160. SpringerGoogle Scholar
  52. Robbes R (2007) Mining a change-based software repository. Proc Workshop Mining Software Repositories (MSR’07) IEEE Comput Soc: 15–23Google Scholar
  53. Roberts DB, Johnson R (1999) Practical analysis for refactoring. Ph.D. DissertationGoogle Scholar
  54. Ruiz R, Stützle T (2007) A simple and effective iterated greedy algorithm for the permutation flowshop scheduling problem. Eur J Oper Res 177(3):2033–2049CrossRefzbMATHGoogle Scholar
  55. Sahin D, Kessentini M, Wimmer M, Deb K (2015) Model transformation testing: a bi-level search-based software engineering approach. J Software: Evol Process 27(11):821–837Google Scholar
  56. Seng O, Stammel J, Burkhart D (2006) Search-based determination of refactorings for improving the class structure of object-oriented systems. Proc Genet Evolution Comput Conf (GECCO’06): 1909–1916Google Scholar
  57. Vermolen S, Wachsmuth G, Visser E (2011) Reconstructing complex metamodel evolution; Tech. Rep. TUD-SERG-2011-026, Delft University of TechnologyGoogle Scholar
  58. Weissgerber P, Diehl S (2006) Identifying refactorings from source-code changes. Proc Int Conf Automated Software Eng (ASE’06), IEEE 231–240Google Scholar
  59. Wieland K, Langer P, Seidl M, Wimmer M, Kappel G (2013) Turning conflicts into collaboration. Comput Supported Coop Work 22(2-3):181–240CrossRefGoogle Scholar
  60. Wohlin C, Runeson P, Höst M, Ohlsson MC, Regnell B, Wesslén A (2012) Experimentation in Software Engineering. SpringerGoogle Scholar
  61. Xing Z, Stroulia E (2005) UMLDiff: An algorithm for object-oriented design differencing. Proc Int Conf Automated Software Eng (ASE 2005): 54–65. ACMGoogle Scholar
  62. Xing Z, Stroulia E (2006) Refactoring detection based on UMLDiff change-facts queries. Proc 13th Work Conf Reverse Eng (WCRE’06), IEEE:263–274Google Scholar
  63. Zitzler E, Thiele L, Laumanns M, Fonseca CM, da Fonseca VG (2003) Performance assessment of multiobjective optimizers: an analysis and review. IEEE Trans Evol Comput 7(2):117–132CrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media New York 2016

Authors and Affiliations

  • Marouane Kessentini
    • 1
    Email author
  • Usman Mansoor
    • 1
  • Manuel Wimmer
    • 2
  • Ali Ouni
    • 3
  • Kalyanmoy Deb
    • 4
  1. 1.University of MichiganDearbornUSA
  2. 2.Vienna University of TechnologyWienAustria
  3. 3.Osaka UniversityOsakaJapan
  4. 4.Michigan State UniversityEast LansingUSA

Personalised recommendations