Skip to main content
Top
Published in: Arabian Journal for Science and Engineering 2/2022

01-09-2021 | Research Article-Computer Engineering and Computer Science

A Severity-Based Classification Assessment of Code Smells in Kotlin and Java Application

Authors: Aakanshi Gupta, Nidhi Kumari Chauhan

Published in: Arabian Journal for Science and Engineering | Issue 2/2022

Log in

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

Code smells instigate due to the consistent adoption of bad programming and implementation styles during the evolution of the software which adversely affects the software quality. They are essentially focused and prioritized for their effective removal based on their severity. The study proposed a hybrid approach for inspecting the severity based on the code smell intensity in Kotlin language and comparing the code smells which are found equivalent in Java language. The research work is examined on five common code smells that are complex method, large class long method, long parameter list, string literal duplication, and too many methods over 30 open-source systems (15 Kotlin/15 Java). The experiment compares different machine learning algorithms for the computation of human-readable code smell detection rules for Kotlin, where the JRip algorithm proved to be the best machine learning algorithm with 96% and 97% of overall precision and accuracy, validated at 10-fold cross-validation. Further, the severity of code smell at the class level is evaluated for prioritization of applications written in Kotlin and Java language. Moreover, the process of severity computation is semiautomated using the CART model, and thus, metric-based severity classification rules are achieved. The experimentation provides a complete understanding of prioritization of code smells in Kotlin and Java and helps to attain prioritized refactoring which will enhance the utilization of resources and minimize the overhead rework cost.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Literature
1.
2.
go back to reference Parikh, G.: The Guide to Software Maintenance. Winthrop, Cambridge (1982) Parikh, G.: The Guide to Software Maintenance. Winthrop, Cambridge (1982)
3.
go back to reference Flauzino, M.; Veríssimo, J.; Terra, R.; Cirilo, E.; Durelli, V.H.S.; Durelli, R.S.: Are you still smelling it? In: Proceedings of the VII Brazilian Symposium on Software Components, Architectures, and Reuse on SBCARS ’18. ACM Press (2018) Flauzino, M.; Veríssimo, J.; Terra, R.; Cirilo, E.; Durelli, V.H.S.; Durelli, R.S.: Are you still smelling it? In: Proceedings of the VII Brazilian Symposium on Software Components, Architectures, and Reuse on SBCARS ’18. ACM Press (2018)
4.
go back to reference Tufano, M.; Palomba, F.; Bavota, G.; Oliveto, R.; Di Penta, M.; De Lucia, A.; Poshyvanyk, D.: When and why your code starts to smell bad. In: 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering. IEEE (2015). https://doi.org/10.1109/icse.2015.59 Tufano, M.; Palomba, F.; Bavota, G.; Oliveto, R.; Di Penta, M.; De Lucia, A.; Poshyvanyk, D.: When and why your code starts to smell bad. In: 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering. IEEE (2015). https://​doi.​org/​10.​1109/​icse.​2015.​59
6.
go back to reference Fowler, M. (2018). Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional. Fowler, M. (2018). Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional.
19.
go back to reference Sundin, E.: Perception and effects of implementing Kotlin in existing projects: a case study about language adoption (2018). Sundin, E.: Perception and effects of implementing Kotlin in existing projects: a case study about language adoption (2018).
20.
go back to reference Schwermer, P.: Performance Evaluation of Kotlin and Java on Android Runtime (2018). Schwermer, P.: Performance Evaluation of Kotlin and Java on Android Runtime (2018).
21.
go back to reference Coppola, R.; Ardito, L.; Torchiano, M.: Characterizing the transition to Kotlin of Android apps: a study on F-Droid, Play Store, and GitHub. In: Proceedings of the 3rd ACM SIGSOFT International Workshop on App Market Analytics - WAMA 2019. the 3rd ACM SIGSOFT International Workshop (2019). https://doi.org/10.1145/3340496.3342759 Coppola, R.; Ardito, L.; Torchiano, M.: Characterizing the transition to Kotlin of Android apps: a study on F-Droid, Play Store, and GitHub. In: Proceedings of the 3rd ACM SIGSOFT International Workshop on App Market Analytics - WAMA 2019. the 3rd ACM SIGSOFT International Workshop (2019). https://​doi.​org/​10.​1145/​3340496.​3342759
24.
go back to reference Palomba, F.; Di Nucci, D.; Panichella, A.; Zaidman, A.; De Lucia, A.: Lightweight detection of Android-specific code smells: the aDoctor project. In: 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER). 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER) (2017). https://doi.org/10.1109/saner.2017.7884659 Palomba, F.; Di Nucci, D.; Panichella, A.; Zaidman, A.; De Lucia, A.: Lightweight detection of Android-specific code smells: the aDoctor project. In: 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER). 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER) (2017). https://​doi.​org/​10.​1109/​saner.​2017.​7884659
25.
go back to reference Kumar, N.A.; Krishna, K.H.; Manjula, R.: Challenges and best practices in mobile application development. Imp. J. Interdiscip. Res. 2(12), 1607–1611 (2016) Kumar, N.A.; Krishna, K.H.; Manjula, R.: Challenges and best practices in mobile application development. Imp. J. Interdiscip. Res. 2(12), 1607–1611 (2016)
26.
go back to reference Hecht, G.; Benomar, O.; Rouvoy, R.; Moha, N.; Duchien, L.: Tracking the software quality of android applications along their evolution (T). In: 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE (2015). https://doi.org/10.1109/ase.2015.46 Hecht, G.; Benomar, O.; Rouvoy, R.; Moha, N.; Duchien, L.: Tracking the software quality of android applications along their evolution (T). In: 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE (2015). https://​doi.​org/​10.​1109/​ase.​2015.​46
30.
31.
go back to reference Pecorelli, F.; Palomba, F.; Di Nucci, D.; De Lucia, A.: Comparing heuristic and machine learning approaches for metric-based code smell detection. In: 2019 IEEE/ACM 27th International Conference on Program Comprehension (ICPC). IEEE (2019). https://doi.org/10.1109/icpc.2019.00023 Pecorelli, F.; Palomba, F.; Di Nucci, D.; De Lucia, A.: Comparing heuristic and machine learning approaches for metric-based code smell detection. In: 2019 IEEE/ACM 27th International Conference on Program Comprehension (ICPC). IEEE (2019). https://​doi.​org/​10.​1109/​icpc.​2019.​00023
39.
go back to reference Guggulothu, T.; Moiz, S.A.: An approach to suggest code smell order for refactoring. In: Somani, A.; Ramakrishna, S.; Chaudhary, A.; Choudhary, C.; Agarwal, B. (Eds.) Emerging Technologies in Computer Engineering: Microservices in Big Data Analytics: ICETCE 2019: Communications in Computer and Information Science, Vol. 985. Springer, Singapore (2019). https://doi.org/10.1007/978-981-13-8300-7_21CrossRef Guggulothu, T.; Moiz, S.A.: An approach to suggest code smell order for refactoring. In: Somani, A.; Ramakrishna, S.; Chaudhary, A.; Choudhary, C.; Agarwal, B. (Eds.) Emerging Technologies in Computer Engineering: Microservices in Big Data Analytics: ICETCE 2019: Communications in Computer and Information Science, Vol. 985. Springer, Singapore (2019). https://​doi.​org/​10.​1007/​978-981-13-8300-7_​21CrossRef
40.
go back to reference Sharma, M.; Kumari, M.; Singh, R.K.; Singh, V.B.: Multiattribute based machine learning models for severity prediction in cross project context. In: Murgante, B., et al. (Eds.) Computational Science and Its Applications: ICCSA 2014. ICCSA 2014: Lecture Notes in Computer Science, Vol. 8583. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-09156-3_17CrossRef Sharma, M.; Kumari, M.; Singh, R.K.; Singh, V.B.: Multiattribute based machine learning models for severity prediction in cross project context. In: Murgante, B., et al. (Eds.) Computational Science and Its Applications: ICCSA 2014. ICCSA 2014: Lecture Notes in Computer Science, Vol. 8583. Springer, Cham (2014). https://​doi.​org/​10.​1007/​978-3-319-09156-3_​17CrossRef
42.
go back to reference Gnanambal, S.; Thangaraj, M.; Meenatchi, V.T.; Gayathri, V.: Classification algorithms with attribute selection: an evaluation study using weka. Int. J. Adv. Netw. Appl. 9(6), 3640–3644 (2018) Gnanambal, S.; Thangaraj, M.; Meenatchi, V.T.; Gayathri, V.: Classification algorithms with attribute selection: an evaluation study using weka. Int. J. Adv. Netw. Appl. 9(6), 3640–3644 (2018)
46.
go back to reference Breiman, L.; Friedman, J.; Stone, C.J.; Olshen, R.A.: Classification and Regression Trees. CRC press. (1984) Breiman, L.; Friedman, J.; Stone, C.J.; Olshen, R.A.: Classification and Regression Trees. CRC press. (1984)
Metadata
Title
A Severity-Based Classification Assessment of Code Smells in Kotlin and Java Application
Authors
Aakanshi Gupta
Nidhi Kumari Chauhan
Publication date
01-09-2021
Publisher
Springer Berlin Heidelberg
Published in
Arabian Journal for Science and Engineering / Issue 2/2022
Print ISSN: 2193-567X
Electronic ISSN: 2191-4281
DOI
https://doi.org/10.1007/s13369-021-06077-6

Other articles of this Issue 2/2022

Arabian Journal for Science and Engineering 2/2022 Go to the issue

Research Article-Computer Engineering and Computer Science

A Model-Driven Framework for the Development of MVC-Based (Web) Application

Research Article-Computer Engineering and Computer Science

Research on Behavior of Two New Random Entity Mobility Models in 3-D Space

Research Article-Computer Engineering and Computer Science

Hand Gesture Recognition from 2D Images by Using Convolutional Capsule Neural Networks

Premium Partners