Advertisement

Metrics in Software Development and Evolution with Design Patterns

  • Anna Derezińska
Conference paper
Part of the Advances in Intelligent Systems and Computing book series (AISC, volume 763)

Abstract

Software metrics are employed in software development and maintenance to assess different quality attributes, support processes of software design, testing, and reengineering. We overview software metrics used with regard to design patterns, especially these dealing with object-oriented program features. Metrics of this kind have also supported certain approaches to refactoring to design patterns. However, code refactoring to design patterns requires selection of suitable code parts and taking decisions about pattern application. In order to make this process partially or fully automated, specialized relevance metrics have been proposed. They were designed as a structure-based assessment of an adequacy of code to be transformed into a given design pattern. Relevance metrics for refactoring to selected design patterns (Replace Type Code with Class, Replace State-Altering Conditions with State) are presented in the paper. The metrics were tested in a prototype tool for automated refactoring of Java programs to design patterns, giving satisfactory results.

Keywords

Design patterns Code refactoring Software metrics Object-oriented metrics 

References

  1. 1.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Boston (1995)zbMATHGoogle Scholar
  2. 2.
    Kan, S.H.: Metrics and Models in Software Quality Engineering. Addison-Wesley, Boston (1998)zbMATHGoogle Scholar
  3. 3.
    e Abreu, B.F.: The MOOD metrics set. In: Proceedings of the Ninth European Conference Object-Oriented Programming (ECOOP 1995) Workshop Metrics, August 1995Google Scholar
  4. 4.
    Chidamber, S.R., Kemerer, C.F.: A metrics suite for object oriented design. IEEE Trans. Software Eng. 20(6), 476–493 (1994).  https://doi.org/10.1109/32.295895CrossRefGoogle Scholar
  5. 5.
    Bansiya, J., Davis, C.G.: A hierarchical model for object-oriented design quality assessment. IEEE Trans. Softw. Eng. 28(1), 4–17 (2002).  https://doi.org/10.1109/32.979986CrossRefGoogle Scholar
  6. 6.
    Mayvan, B.B., Rasoolzadegan, A., Yazdi, Z.G.: The state of the art on design patterns: a systematic mapping of the literature. J. Syst. Softw. 125, 93–118 (2017).  https://doi.org/10.1016/j.jss.2016.11.030CrossRefGoogle Scholar
  7. 7.
    Kierevsky, J.: Refactoring to Patterns. Addison Wesley, Boston (2004)CrossRefGoogle Scholar
  8. 8.
    Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: Refactoring: Improving the Design of Existing Code. Addison Wesley, Boston (1999)Google Scholar
  9. 9.
    Sommerville, I.: Software Engineering, 10th edn. Pearson Education, New York (2015)zbMATHGoogle Scholar
  10. 10.
    Tsantalis, N., Chatzigeorgiou, A.: Identification of move method refactoring opportunities. IEEE Trans. Softw. Eng. 35(3), 347–367 (2009).  https://doi.org/10.1109/TSE.2009.1CrossRefGoogle Scholar
  11. 11.
    Silva, D., Terra, R., Valente, M.T.: Recommending automated extract method refactorings. In: 22nd International Conference on Program Comprehension (ICPC), pp. 146–156. ACM, New York (2014).  https://doi.org/10.1145/2597008.2597141
  12. 12.
    Bavota, G., Lucia, A.D., Marcus, A., Oliveto, R.: Recommending refactoring operations in large software systems. In: Robillard, M.P., Maalej, W., Walker, R.J., Zimmermann, T. (eds.) Recommendation Systems in Software Engineering (RSSE), chap. 15, pp 387–419. Springer, Heidelberg (2014).  https://doi.org/10.1007/978-3-642-45135-5Google Scholar
  13. 13.
    Vakilian, M., Chen, N., Negara, S., Rajkumar, B.A., Bailey, B.P., Johnson, R.E.: Use, disuse, and misuse of automated refactorings. In: 34th International Conference on Software Engineering (ICSE), pp. 233–243 (2012).  https://doi.org/10.1109/icse.2012.6227190
  14. 14.
    Derezinska, A.: A structure-driven process of automated refactoring to design patterns. In: Świątek, J., Borzemski, L., Wilamowska, Z. (eds.) Information Systems Architecture and Technology: Proceedings of 38th International Conference on Information Systems Architecture and Technology – ISAT 2017: PART II, AISC, vol. 656, pp. 39–48. Springer, Cham (2018).  https://doi.org/10.1007/978-3-319-67229-8_4Google Scholar
  15. 15.
    Bluemke, I., Stępień, A.: Selection of metrics for the defect prediction. In: Zamojski, W., et al. (ed.) Dependability Engineering and Complex Systems, DepCoS-RELCOMEX 2016, AISC, vol. 470, pp. 39–50. Springer (2016).  https://doi.org/10.1007/978-3-319-39639-2_4Google Scholar
  16. 16.
    Ali, M., Elish, M.O.: A comparative literature survey of design patterns impact on software quality. In: Proceedings of International Conference on Information Science and Applications (ICISA), pp. 1–7 (2013).  https://doi.org/10.1109/icisa.2013.6579460
  17. 17.
    Pradhan, P., Dwivedi, A.K., Rath, S.K.: Impact of design patterns on quantitative assessment of quality parameters. In: Second International Conference on Advances in Computing and Communication Engineering (ICACCE), pp. 577–582 (2015).  https://doi.org/10.1109/icacce.2015.102
  18. 18.
    Hsueh, N.-L., Chu, P.-H., Chu, W.: A quantitative approach for evaluating the quality of design patterns. J. Syst. Softw. 81, 1430–1439 (2008).  https://doi.org/10.1016/j.jss.2007.11.724CrossRefGoogle Scholar
  19. 19.
    Ampatzoglou, A., Chatzigeorgiou, A.: Evaluation of object-oriented design patterns in game development. Inf. Softw. Technol. 49(5), 445–454 (2007).  https://doi.org/10.1016/j.infsof.2006.07.003CrossRefGoogle Scholar
  20. 20.
    Mariani, T., Vergilio, S.R.: A systematic review on search-based refactoring. Inf. Softw. Technol. 83, 14–34 (2017).  https://doi.org/10.1016/j.infsof.2016.11.009CrossRefGoogle Scholar
  21. 21.
    Amoui, M., Mirarab, S., Ansari, S., Lucas, C.: A genetic algorithm approach to design evolution using design pattern transformation. Int. J. Inf. Technol. Intell. Comput., 1–10 (2006)Google Scholar
  22. 22.
    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 (GECCO), pp. 1341–1348. ACM (2010).  https://doi.org/10.1145/1830483.1830731
  23. 23.
    Shimomura, T., Ikeda, K., Takahashi, M.: An approach to GA-driven automatic refactoring based on design patterns. In: 5th International Conference on Software Engineering Advances (ICSEA), pp. 213–218 (2010).  https://doi.org/10.1109/icsea.2010.39
  24. 24.
    Kim, J., Batory, D., Dig, D.: Scripting parametric refactorings in Java to retrofit design patterns. In: 31st IEEE International Conference on Software Maintenance and Evolution (ICSME), pp. 211–220. IEEE (2015).  https://doi.org/10.1109/icsm.2015.7332467

Copyright information

© Springer International Publishing AG, part of Springer Nature 2019

Authors and Affiliations

  1. 1.Institute of Computer ScienceWarsaw University of TechnologyWarsawPoland

Personalised recommendations