An Empirical Investigation on the Effect of Code Smells on Resource Usage of Android Mobile Applications
Autor: | Mahmoud O. Elish, Mohammad Alkandari, Ali Kelkawi |
---|---|
Jazyk: | angličtina |
Rok vydání: | 2021 |
Předmět: |
General Computer Science
Computer science CPU time 02 engineering and technology computer.software_genre Resource (project management) Android 0502 economics and business 0202 electrical engineering electronic engineering information engineering General Materials Science Android (operating system) Database 05 social sciences General Engineering Code smell 020207 software engineering resource usage Software quality TK1-9971 Code refactoring Mobile phone Electrical engineering. Electronics. Nuclear engineering computer Mobile device Code smells 050203 business & management |
Zdroj: | IEEE Access, Vol 9, Pp 61853-61863 (2021) |
ISSN: | 2169-3536 |
Popis: | Code smells refer to suboptimal coding practices which impact software quality and software non-functional requirements such as performance, maintainability, and resource usage. Although desktop application code smells have been extensively studied in the literature, mobile applications are relatively new in nature, and the effect of code smells is only recently being studied on mobile devices. This paper investigates the effect of code refactoring on enhancing both CPU usage and Memory usage. It presents a study of three code smells: HashMap Usage, Member Ignoring Method and Slow Loop, and eight open-source applications were selected from Github for testing purposes. The three aforementioned code smells were refactored individually and cumulatively to study their effects on a mobile phone’s resource usage, with CPU usage and memory usage as the metrics of choice. The resource usage of five different versions of eight different mobile applications were measured to find the optimal refactoring strategy. The results obtained suggest that refactoring HashMap Usage and Member Ignoring Methods yielded significantly an average improvement in CPU usage of 12.7% and 13.7% respectively, while the refactoring of all three code smells yielded an improvement of up to 7.1% in memory usage. This research shows that certain refactoring methods have significant impacts on improving both the CPU usage and Memory usage. These statistically significant results can be used as the basis of guidelines to assist in writing codes which utilize smartphones’ resources more efficiently and enhance their quality. |
Databáze: | OpenAIRE |
Externí odkaz: |