Abstract
Web applications (web apps) have become one of the largest parts of the current software market over years. Modern web apps offer several business benefits over other traditional and standalone applications. Mainly, cross-platform compatibility and data integration are some of the critical features that encouraged businesses to shift towards the adoption of Web apps. Web apps are evolving rapidly to acquire new features, correct errors or adapt to new environment changes especially with the volatile context of the web development. These ongoing amends often affect software quality due to poor coding and bad design practices, known as code smells or anti-patterns. The presence of code smells in a software project is widely considered as form of technical debt and makes the software harder to understand, maintain and evolve, besides leading to failures and unforeseen costs. Therefore, it is critical for web apps to monitor the existence and spread of such anti-patterns. In this paper, we specifically target web apps built with PHP being the most used server-side programming language. We conduct the first empirical study to investigate the diffuseness of code smells in Web apps and their relationship with the change proneness of affected code. We detect 12 types of common code smells across a total of 223 releases of 5 popular and long-lived open-source web apps. The key findings of our study include: 1) complex and large classes and methods are frequently committed in PHP files, 2) smelly files are more prone to change than non-smelly files, and 3) Too Many Methods and High Coupling are the most associated smells with files change-proneness.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
References
Replication package. https://github.com/Narjes-b/SmellsAnalysis-WebApps
Aniche, M., Bavota, G., Treude, C., Gerosa, M.A., van Deursen, A.: Code smells for model-view-controller architectures. Empirical Soft. Eng. 23(4), 2121–2157 (2018)
Boukharata, S., Ouni, A., Kessentini, M., Bouktif, S., Wang, H.: Improving web service interfaces modularity using multi-objective optimization. Autom. Sofw. Eng. 26(2), 275–312 (2019)
Brown, W.H., Malveau, R.C., McCormick, H.W., Mowbray, T.J.: AntiPatterns: Refactoring Software, Architectures, and Projects In Crisis. Wiley, New York (1998)
Chatzigeorgiou, A., Manakos, A.: Investigating the evolution of bad smells in object-oriented code. In: Seventh International Conference on the Quality of Information and Communications Technology, pp. 106–115. IEEE (2010)
Cohen, J.: Statistical Power Analysis for The Behavioral Sciences. Erihaum, Hillsdale (1988)
Delchev, M., Harun, M.F.: Investigation of code smells in different software domains. Full-scale Softw. Eng. 31, 31–36 (2015)
Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional, Boston (2018)
Hecht, G., Benomar, O., Rouvoy, R., Moha, N., Duchien, L.: Tracking the software quality of android applications along their evolution (t). In: International Conference on Automated Software Engineering (ASE), pp. 236–247 (2015)
Hosmer, D.W., Lemeshow, S., Cook, E.: Applied Logistic Regression, 2nd edn. Wiley, New York (2000)
Kampstra, P., et al.: Beanplot: a boxplot alternative for visual comparison of distributions. J. Stat. Softw. 28(1), 1–9 (2008)
Khomh, F., Di Penta, M., Gueheneuc, Y.G.: An exploratory study of the impact of code smells on software change-proneness. In: WCRE, pp. 75–84 (2009)
Khomh, F., Di Penta, M., Guéhéneuc, Y.G., Antoniol, G.: An exploratory study of the impact of antipatterns on class change-and fault-proneness. Empirical Softw. Eng. 17(3), 243–275 (2012). https://doi.org/10.1007/s10664-011-9171-y
Kim, T.K.: T test as a parametric statistic. Korean J. Anesthesiol. 68(6), 540 (2015)
Liu, X., Zhang, C.: The detection of code smell on software development: a mapping study. In: 5th International Conference on Machinery, Materials and Computing Technology (ICMMCT 2017). Atlantis Press (2017)
Mannan, U.A., Ahmed, I., Almurshed, R.A.M., Dig, D., Jensen, C.: Understanding code smells in android applications. In: IEEE/ACM International Conference on Mobile Software Engineering and Systems (MOBILESoft), pp. 225–236 (2016)
Martin, R.C.: Clean Code: A Handbook of Agile Software Craftsmanship. Pearson Education, London (2009)
Mon, C.T., Hlaing, S., Tin, M., Khin, M., Lwin, T.M., Myo, K.M.: Code readability metric for PHP. In: IEEE 8th Global Conference on Consumer Electronics (GCCE), pp. 929–930 (2019)
Nguyen, H.V., Nguyen, H.A., Nguyen, T.T., Nguyen, A.T., Nguyen, T.N.: Detection of embedded code smells in dynamic web applications. In: IEEE/ACM International Conference on Automated Software Engineering, pp. 282–285 (2012)
Olbrich, S., Cruzes, D.S., Basili, V., Zazworka, N.: The evolution and impact of code smells: a case study of two open source systems. In: International Symposium on Empirical Software Engineering and Measurement, pp. 390–400 (2009)
Olbrich, S.M., Cruzes, D.S., Sjøberg, D.I.: Are all code smells harmful? A study of god classes and brain classes in the evolution of three open source systems. In: International Conference on Software Maintenance, pp. 1–10 (2010)
Ouni, A., Gaikovina Kula, R., Kessentini, M., Inoue, K.: Web service antipatterns detection using genetic programming. In: Annual Conference on Genetic and Evolutionary Computation (GECCO), pp. 1351–1358 (2015)
Ouni, A., Kessentini, M., Bechikh, S., Sahraoui, H.: Prioritizing code-smells correction tasks using chemical reaction optimization. Softw. Qual. J. 23(2), 323–361 (2015)
Ouni, A., Kessentini, M., Inoue, K., Cinnéide, M.O.: Search-based web service antipatterns detection. IEEE Trans. Serv. Comput. 10(4), 603–617 (2017)
Ouni, A., Kessentini, M., Ó cinnéide, M., Sahraoui, H., Deb, K., Inoue, K.: MORE: a multi-objective refactoring recommendation approach to introducing design patterns and fixing code smells. Softw. Evol. Process 29(5), e1843 (2017)
Ouni, A., Kessentini, M., Sahraoui, H., Inoue, K., Deb, K.: Multi-criteria code refactoring using search-based software engineering: an industrial case study. ACM Trans. Softw. Eng. Methodol. 25(3), 1–53 (2016)
Ouni, A., Kessentini, M., Sahraoui, H., Inoue, K., Hamdi, M.S.: Improving multi-objective code-smells correction using development history. J. Syst. Softw. 105, 18–39 (2015)
Palomba, F., Bavota, G., Di Penta, M., Fasano, F., Oliveto, R., De Lucia, A.: On the diffuseness and the impact on maintainability of code smells: a large scale empirical investigation. Empirical Softw. Eng. 23(3), 1188–1221 (2018). https://doi.org/10.1007/s10664-017-9535-z
PHPMD (2020). https://phpmd.org
Pressman, R.S.: Software engineering: a practitioner’s approach. Palgrave Macmillan, London (2005)
Rio, A., Brito e Abreu, F.: 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.) QUATIC 2019. CCIS, vol. 1010, pp. 263–271. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-29238-6_19
Saboury, A., Musavi, P., Khomh, F., Antoniol, G.: An empirical study of code smells in Javascript projects. In: International Conference on Software Analysis, Evolution and Reengineering, pp. 294–305 (2017)
Spadini, D., Palomba, F., Zaidman, A., Bruntink, M., Bacchelli, A.: On the relation of test smells to software code quality. In: IEEE International Conference on Software Maintenance and Evolution (ICSME), pp. 1–12. IEEE (2018)
Tufano, M., et al.: An empirical investigation into the nature of test smells. In: International Conference on Automated Software Engineering, pp. 4–15 (2016)
Tufano, M., et al.: When and why your code starts to smell bad. In: IEEE International Conference on Software Engineering, vol. 1, pp. 403–414 (2015)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Bessghaier, N., Ouni, A., Mkaouer, M.W. (2020). On the Diffusion and Impact of Code Smells in Web Applications. In: Wang, Q., Xia, Y., Seshadri, S., Zhang, LJ. (eds) Services Computing – SCC 2020. SCC 2020. Lecture Notes in Computer Science(), vol 12409. Springer, Cham. https://doi.org/10.1007/978-3-030-59592-0_5
Download citation
DOI: https://doi.org/10.1007/978-3-030-59592-0_5
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-59591-3
Online ISBN: 978-3-030-59592-0
eBook Packages: Computer ScienceComputer Science (R0)