| تعداد نشریات | 33 |
| تعداد شمارهها | 877 |
| تعداد مقالات | 8,582 |
| تعداد مشاهده مقاله | 54,472,053 |
| تعداد دریافت فایل اصل مقاله | 10,102,870 |
Bad Code Smells in iOS Apps: An Empirical Investigation and Automated Detection Approach | ||
| Computational Sciences and Engineering | ||
| مقاله 4، دوره 5، شماره 1، تیر 2025، صفحه 39-70 اصل مقاله (1.08 M) | ||
| نوع مقاله: Original Article | ||
| شناسه دیجیتال (DOI): 10.22124/cse.2025.30818.1109 | ||
| نویسندگان | ||
| AmirHossein Kohansal؛ Farid Feyzi* | ||
| University of Guilan | ||
| چکیده | ||
| Performance issues in mobile applications significantly degrade user experience and increase abandonment rates. This study investigates poor development practices in iOS apps through analysis of 193 performance reports from four applications and 56 Stack Overflow discussions, identifying four critical anti-patterns: (1) ignoring memory warnings, (2) main-thread database operations, (3) table updates within loops, and (4) UI access from background threads. Analysis of 427 iOS projects revealed 52% contained at least one such issue, with memory warning neglect being most prevalent (63%), followed by main-thread database calls (34%), while loop-based table updates and improper UI thread access each appeared in 2% of cases. To automate detection, we developed a static analysis tool for Swift codebases. The tool achieved 96% accuracy for memory warnings, 87% for main-thread database operations, and 100% for loop-internal table updates. Detection of background thread UI access proved more challenging (50% accuracy). These results demonstrate both the widespread nature of performance-hindering practices in iOS development and the effectiveness of automated detection for most anti-patterns. The findings provide developers with actionable insights to improve app performance during development, while highlighting areas needing more sophisticated detection approaches. Our work contributes to better understanding and mitigation of performance issues in mobile applications. | ||
| کلیدواژهها | ||
| Bad Smell؛ Anti-pattern؛ performance؛ iOS | ||
| مراجع | ||
|
[1] BankMyCell. How many smartphones are in the world? https://www.bankmycell.com/blog/how-many-phones-are-in-the-world
[2] DemandSage. iPhone user statistics. https://www.demandsage.com/iphone-user-statistics/
[3] Business of Apps. App store data. https://www.businessofapps.com/data/app-stores/
[4] DazeInfo. (2016). Mobile app retention challenge. https://dazeinfo.com/2016/05/19/mobile-app-retention-churn-rate-smartphone-users/
[5] Khalid, H., Shihab, E., Nagappan, M., & Hassan, A. E. (2014). What do mobile app users complain about? IEEE Software, 32(3), 70–77.
[6] Reimann, J., Brylski, M., & Aßmann, U. (2014, March). A tool-supported quality smell catalogue for Android developers. In Proceedings of the Conference Modellierung 2014 in the Workshop Modellbasierte und modellgetriebene Softwaremodernisierung (MMSM) (Vol. 2014).
[7] Hecht, G., Moha, N., & Rouvoy, R. (2016, May). An empirical study of the performance impacts of Android code smells. In Proceedings of the International Conference on Mobile Software Engineering and Systems (pp. 59–69).
[8] Couto, M., Saraiva, J., & Fernandes, J. P. (2020, February). Energy refactorings for Android in the large and in the wild. In 2020 IEEE 27th International Conference on Software Analysis, Evolution and Reengineering (SANER) (pp. 217–228). IEEE.
[9] Carette, A., Younes, M. A. A., Hecht, G., Moha, N., & Rouvoy, R. (2017, February). Investigating the energy impact of Android smells. In 2017 IEEE 24th International Conference on Software Analysis and Reengineering (SANER) (pp. 115–126). IEEE.
[10] Mannan, U. A., Ahmed, I., Almurshed, R. A. M., Dig, D., & Jensen, C. (2016). Understanding code smells in Android applications. In 2016 IEEE/ACM International Conference on Mobile Software Engineering and Systems (MOBILESoft) (pp. 225–236). IEEE.
[11] Fowler, M. (1997, June). Refactoring: Improving the design of existing code. In 11th European Conference, Jyväskylä, Finland.
[12] Hecht, G., Moha, N., & Rouvoy, R. (2016, May). An empirical study of the performance impacts of Android code smells. In Proceedings of the International Conference on Mobile Software Engineering and Systems (pp. 59–69).
[13] Liu, Y., Xu, C., & Cheung, S. C. (2014, May). Characterizing and detecting performance bugs for smartphone applications. In Proceedings of the 36th International Conference on Software Engineering (pp. 1013–1024).
[14] Carette, A., Younes, M. A. A., Hecht, G., Moha, N., & Rouvoy, R. (2017, February). Investigating the energy impact of Android smells. In 2017 IEEE 24th International Conference on Software Analysis and Reengineering (SANER) (pp. 115–126). IEEE.
[15] Palomba, F., Di Nucci, D., Panichella, A., Zaidman, A., & De Lucia, A. (2019). On the impact of code smells on the energy consumption of mobile applications. Information and Software Technology, 105, 43–55.
[16] Carvalho, S. G., Aniche, M., Veríssimo, J., Durelli, R. S., & Gerosa, M. A. (2019). An empirical catalog of code smells for the presentation layer of Android apps. Empirical Software Engineering, 24, 3546–3586.
[17] Feitosa, D., Cruz, L., Abreu, R., Fernandes, J. P., Couto, M., & Saraiva, J. (2021). Patterns and energy consumption: Design, implementation, studies, and stories. In Software Sustainability (pp. 89–121).
[18] Anwar, H., Pfahl, D., & Srirama, S. N. (2019, August). Evaluating the impact of code smell refactoring on the energy consumption of Android applications. In 2019 45th Euromicro Conference on Software Engineering and Advanced Applications (SEAA) (pp. 82–86). IEEE.
[19] Morales, R., Saborido, R., Khomh, F., Chicano, F., & Antoniol, G. (2016). Anti-patterns and the energy efficiency of Android applications. arXiv preprint arXiv:1610.05711.
[20] dkhamsing. (2016). Collaborative list of open-source iOS apps [GitHub repository]. GitHub. https://github.com/dkhamsing/open-source-ios-apps
[21] Yanagiba. (n.d.). Swift-AST [GitHub repository]. GitHub. https://github.com/yanagiba/swift-ast
[22] Afjehei, S. S., Chen, T. H., & Tsantalis, N. (2019). iPerfDetector: Characterizing and detecting performance anti-patterns in iOS applications. Empirical Software Engineering, 24, 3484–3513.
[23] Habchi, S. (2019). Understanding mobile-specific code smells [Doctoral dissertation, Université de Lille].
[24] Mighty. (2017). Mobile app retention challenge. Medium. https://mightybranding.medium.com/3-reasons-people-delete-your-app-d2b84a1518b5
[25] Stack Overflow. (n.d.). Stack Overflow. https://stackoverflow.com
[26] Khomh, F., Di Penta, M., & Gueheneuc, Y.-G. (2009). An exploratory study of the impact of code smells on software change-proneness. In 2009 16th Working Conference on Reverse Engineering. IEEE.
[27] Olbrich, S., Cruzes, D. S., Basili, V., & Zazworka, N. (2009). The evolution and impact of code smells: A case study of two open source systems. In 2009 3rd International Symposium on Empirical Software Engineering and Measurement (pp. 390–400). IEEE.
[28] Habchi, S., Hecht, G., Rouvoy, R., & Moha, N. (2017). Code smells in iOS apps: How do they compare to Android? In 2017 IEEE/ACM 4th International Conference on Mobile Software Engineering and Systems (MOBILESoft) (pp. 110–121). IEEE.
[29] Rahkema, K., & Pfahl, D. (2020). Empirical study on code smells in iOS applications. In Proceedings of the IEEE/ACM 7th International Conference on Mobile Software Engineering and Systems.
[30] Apple. (n.d.). Apple developer documentation. https://developer.apple.com/documentation
[31] Afjehei, S. S., Chen, T. H., & Tsantalis, N. (2019). iPerfDetector: Characterizing and detecting performance anti-patterns in iOS applications. Empirical Software Engineering, 24(6), 3484–3513. | ||
|
آمار تعداد مشاهده مقاله: 397 تعداد دریافت فایل اصل مقاله: 718 |
||