PHP code smells in web apps: survival and anomalies

12/31/2020
by   Américo Rio, et al.
0

Context: Code smells are considered symptoms of poor design, leading to future problems, such as reduced maintainability. Except for anecdotal cases (e. g. code dropout), a code smell survives until it gets explicitly refactored or removed. This paper presents a longitudinal study on the survival of code smells for web apps built with PHP. Objectives: RQ: (i) code smells survival depends on their scope? (ii) practitioners attitudes towards code smells removal in web apps have changed throughout time? (iii) how long code smells survive in web applications? (iv) are there sudden variations (anomalies) in the density of code smells through the evolution of web apps? Method: We analyze the evolution of 6 code smells in 8 web applications written in PHP at the server side, across several years, using the survival analysis technique. We classify code smells according to scope in two categories: scattered and localized. Scattered code smells are expected to be more harmful since their influence is not circumscribed as in localized code smells. We split the observations for each web app into two equal and consecutive timeframes, to test the hypothesis that code smells awareness has increased throughout time. As for the anomalies, we standardize their detection criteria. Results: We present some evidence that code smells survival depends on their scope: the average survival rate decreases in some of them, while the opposite is observed for the remainder. The survival of localized code smells is around 4 years, while the scattered ones live around 5 years. Around 60 are removed, and some live through all the application life. We also show how a graphical representation of anomalies found in the evolution of code smells allows unveiling the story of a development project and make managers aware of the need for enforcing regular refactoring practices.

READ FULL TEXT

page 8

page 9

page 10

page 11

page 21

page 23

research
08/31/2023

JavaScript Dead Code Identification, Elimination, and Empirical Assessment

Web apps are built by using a combination of HTML, CSS, and JavaScript. ...
research
10/09/2020

Nifty Web Apps: Build a Web App for Any Text-Based Programming Assignment

While many students now interact with web apps across a variety of smart...
research
08/10/2022

Determinants of Patent Survival in Emerging Economies: Evidence from Residential Patents in India

The purpose of this paper is to use patent level characteristics to esti...
research
10/14/2020

Android Code Smells: From Introduction to Refactoring

Object-oriented code smells are well-known concepts in software engineer...
research
12/19/2018

AnFlo: Detecting Anomalous Sensitive Information Flows in Android Apps

Smartphone apps usually have access to sensitive user data such as conta...
research
08/31/2020

A3Ident: A Two-phased Approach to Identify the Leading Authors of Android Apps

Authorship identification is the process of identifying and classifying ...

Please sign up or login with your details

Forgot password? Click here to reset