TECHNOLOGY OF IDENTIFYING ANTIPATTERNS IN ANDROID PROJECTS WRITTEN IN KOTLIN LANGUAGE
DOI:
https://doi.org/10.20998/2079-0023.2020.01.19Keywords:
antipattern, identification, graph model, low-quality code, Kotlin, Android, Adapter patternAbstract
The problem of the lack of instruments for identifying the characteristics of low-quality code in Android projects that are written in the Kotlin language is determined. A review of modern approaches for identifying antipatterns in program code is accomplished. The analysis of the methods used to find problems with code in Android projects is performed. DECOR and Paprika approaches are considered. Conclusions are drawn about the importance of finding design flaws in program code for the mobile software development and its further support. An antipatterns identification approach for Kotlin language program code in Android projects is proposed. An algorithm for identifying low-quality Kotlin code is presented. The technology for detecting poor quality code characteristics consists of four stages: collecting metrics about an analyzed software system, building a quality model, converting a quality model into a graph representation, and identifying predefined antipatterns. The collection of metrics, including the search for both Androidspecific and object-oriented metrics of Chidamber and Kamerer, is proposed to be implemented through parsing source code and converting it into an abstract syntax tree using the KASTree library. The implementation of KASTree library usage is offered through the Adapter design pattern. The construction of a quality model is implemented using the Paprika tool, supplemented by a number of introduced metrics. Conversion of quality model exactly into graph representation is used to identify antipatterns in order to ensure the speed and quality of complex queries execution for identifying antipatterns. Antipatterns identification using database queries is based on various template rules, including the Catolino rules. Different features of applying the Cypher query language to a graph database are used to represent the rules in form of queries. Results of the work can be used in development of software for poor quality code identification in mobile applications written in Kotlin language, as well as in studies of mobile development antipatterns for this language.References
Counsell S., Rob M. H., Hamza H., Black S. Exploring the eradication of code smells: An empirical and theoretical perspective. Advances in Software Engineering. 2010, vol. 2010, p. 12. doi:10.1155/2010/820103.
Fowler M. Refactoring: Improving the Design of Existing Code. Boston: Addison-Wesley Professional, 2018. 448 p.
Rashedul I., Rofiqul I., Tahidul Arafhin M. Mobile application and its global impact. International Journal of Engineering and Technology. 2010, vol. 10, iss. 6, pp. 72–78.
Reimann J., Brylski M. A tool-supported quality smell catalogue for Android developers. Softwaretechnik-Trends. 2015, vol. 34, no. 2, pp. 44-46.
Hecht G., Rouvoy R., Moha N., Duchien L. Detecting antipatterns in Android apps. Lille: INRIA, 2015. 24 p.
Kessentini M., Ouni A. Detecting Android smells using multiobjective genetic programming. ICMSES. 2017, pp. 122–132. doi:10.1109/MOBILESoft.2017.29.
Palomba F., Di Nucci D., Panichella A. Lightweight detection of Android-specific code smells: the aDoctor project. ICSAER. 2017, 12 p. doi:10.1109/SANER.2017.7884659.
Linarez-Vasquez M., Klock S., McMillan C. Domain matters: bringing further evidence of the relationships among antipatterns, application domains, and quality-related metrics in Java mobile apps. ICPC. 2014, pp. 232–243. doi: 10.1145/2597008.2597144.
Moha N., Duchien L., Gueheneuc Y. DECOR: a method for the specification and detection of code and design smells. IEEE Transactions on Software Engineering. 2010, vol. 36, pp. 20–36. doi: 10.1109/TSE.2009.50.
Rasool G., Ali Arab A. Recovering Android Bad Smells from Android Applications. Springer Berlin Heidelberg. 2020, pp. 1–27. doi: 10.1007/s13369-020-04365-1.
Mannan A. M., Ahmed I., Almurshed R. A. M. Understanding code smells in Android applications. ICMSES. 2016, pp. 225–236. doi: 10.1109/MobileSoft.2016.048.
Azeem M.I., Palomba F., Shi, L., Wang, Q. Machine learning techniques for code smell detection: A systematic literature review and meta-analysis. Information & Software Technology. 2019, vol. 108, pp. 115–138.
Kotlin 2019 the state of Developer Ecosystem in 2019 Infographic. Available at: https://www.jetbrains.com/lp/devecosystem2019/kotlin/ (accessed 04.02.2020).
Chidamber S. R., Kemerer C. F. A metric suite for object oriented design. IEEE Transactions on Software Engineering. 1994, vol. 20, pp. 476–493.
Catolino G. Improving change prediction models with code smellrelated information. Empir Software. 2019, p. 42.
Downloads
How to Cite
Issue
Section
License
Copyright (c) 2020 Bulletin of National Technical University "KhPI". Series: System Analysis, Control and Information TechnologiesAuthors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).