Skip to main content

Code Smells Survival Analysis in Web Apps

  • Conference paper
  • First Online:
Quality of Information and Communications Technology (QUATIC 2019)

Abstract

Web applications are heterogeneous, both in their target platform (split across client and server sides) and on the formalisms they are built with, usually a mixture of programming and formatting languages. This heterogeneity is perhaps an explanation why software evolution of web applications (apps) is a poorly addressed topic in the literature. In this paper we focus on web apps built with PHP, the most widely used server-side programming language.

We analyzed the evolution of 6 code smells in 4 web applications, using the survival analysis technique. Since code smells are symptoms of poor design, it is relevant to study their survival, that is, how long did it take from their introduction to their removal. It is obviously desirable to minimize their survival.

In our analysis we split code smells in two categories: scattered smells and localized smells, since we expect the former to be more harmful than the latter. Our results provide some evidence that the survival of PHP code smells depends on their spreadness.

We have also analyzed whether the survival curve varies in the long term, for the same web application. Due to the increasing awareness on the potential harmfulness of code smells, we expected to observe a reduction in the survival rate in the long term. The results show that there is indeed a change, for all applications except one, which lead us to consider that other factors should be analyzed in the future, to explain the phenomenon.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 64.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 84.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://w3techs.com/technologies/overview/programming_language/all (accessed: June 2019).

  2. 2.

    Note: PHP can be used in a pure procedural way.

  3. 3.

    https://github.com/americorio/articledata/.

References

  1. Mens, T., Demeyer, S. (eds.): Software Evolution. Springer, Heidelberg (2006)

    MATH  Google Scholar 

  2. Madhavji, N.H. et al.: Software evolution and feedback. Wiley Online Library (2006)

    Google Scholar 

  3. Rossi, G., Pastor, O., Schwabe, D., Olsina, L.: Web Engineering: Modelling and Implementing Web Applications. Springer, London (2007). https://doi.org/10.1007/978-1-84628-923-1

    Book  MATH  Google Scholar 

  4. Mendes, E., Mosley, N.: Web Engineering. Springer, Heidelberg (2006). https://doi.org/10.1007/3-540-28218-1

    Book  MATH  Google Scholar 

  5. Rio, A., Brito e Abreu, F.: Analyzing web applications quality evolution. In: Iberian Conference on Information Systems and Technologies, CISTI, pp. 1–4. IEEE (2017)

    Google Scholar 

  6. Rio, A., Brito e Abreu, F.: Web systems quality evolution. In: QUATIC, pp. 248–253. IEEE (2016)

    Google Scholar 

  7. Herraiz, I., Rodriguez, D., Robles, G., Gonzalez-Barahona, J.M.: The evolution of the laws of software evolution: a discussion based on a systematic literature review. ACM Comput. Surv. 46, 28 (2013)

    Article  Google Scholar 

  8. Radjenović, D., Heričko, M., Torkar, R., Živkovič, A.: Software fault prediction metrics: a systematic literature review. Inf. Softw. Technol. 55, 1397–1418 (2013)

    Article  Google Scholar 

  9. Zhang, M., Hall, T., Baddoo, N.: Code bad smells: a review of current knowledge. J. Softw. Maint. Evol. Res. Pract. 23, 179–202 (2011)

    Article  Google Scholar 

  10. Fernandes, E., Oliveira, J., Vale, G., Paiva, T., Figueiredo, E.: A review-based comparative study of bad smell detection tools. In: Proceedings of the 20th International Conference on Evaluation and Assessment in Software Engineering, p. 18. ACM (2016)

    Google Scholar 

  11. Kyriakakis, P., Chatzigeorgiou, A.: Maintenance patterns of large-scale PHP web applications. In: 2014 IEEE International Conference on Software Maintenance and Evolution, pp. 381–390 (2014). https://doi.org/10.1109/icsme.2014.60

  12. Amanatidis, T., Chatzigeorgiou, A.: Studying the evolution of PHP web applications. Inf. Softw. Technol. 72, 48–67 (2016). https://doi.org/10.1016/j.infsof.2015.11.009

    Article  Google Scholar 

  13. Tufano, M., et al.: When and why your code starts to smell bad (2015)

    Google Scholar 

  14. Clark, T.G., Bradburn, M.J., Love, S.B., Altman, D.G.: Survival analysis part I: basic concepts and first analyses. Br. J. Cancer 89, 232 (2003)

    Article  Google Scholar 

  15. Schuette, D.: Survival analysis in R tutorial (article) – DataCamp. https://www.datacamp.com/community/tutorials/survival-analysis-R

  16. Chatzigeorgiou, A., Manakos, A.: Investigating the evolution of bad smells in object-oriented code. In: 2010 Seventh International Conference on the Quality of Information and Communications Technology (QUATIC), pp. 106–115. IEEE (2010)

    Google Scholar 

  17. Tufano, M., et al.: An empirical investigation into the nature of test smells. In: 2016 31st IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 4–15 (2016)

    Google Scholar 

  18. Saboury, A., Musavi, P., Khomh, F., Antoniol, G.: An empirical study of code smells in JavaScript projects. In: 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER), pp. 294–305 (2017)

    Google Scholar 

Download references

In Memoriam Acknowledgment

We are grateful to the late Professor Rui Menezes (deceased 14 May 2019), whose contribution to this work was of great significance. He encouraged and supported us on the usage of survival analysis techniques and inspired us with his enthusiasm.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Américo Rio .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Rio, A., Brito e Abreu, F. (2019). Code Smells Survival Analysis in Web Apps. In: Piattini, M., Rupino da Cunha, P., García Rodríguez de Guzmán, I., Pérez-Castillo, R. (eds) Quality of Information and Communications Technology. QUATIC 2019. Communications in Computer and Information Science, vol 1010. Springer, Cham. https://doi.org/10.1007/978-3-030-29238-6_19

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-29238-6_19

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-29237-9

  • Online ISBN: 978-3-030-29238-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics