Research Article

God Class Detection Using Thresholds of Software Code Metrics Derived from Metaheuristic Optimization

Volume: 9 Number: 4 September 30, 2026
EN

God Class Detection Using Thresholds of Software Code Metrics Derived from Metaheuristic Optimization

Abstract

The detection of God Class code smells is necessary for maintaining the quality, maintainability, and evolution of the software. Traditional code smell detection methods often rely on static and developer intuition-based thresholds of the software metrics, which may not be applicable to projects of different sizes and domains. This study proposes a new methodology for God Class detection by calculating thresholds of software metrics (Chidamber and Kemerer (CK) metrics suite), WMC, RFC, CBO, LCOM, and LOC for more accurate detection of God Class smells. The optimal thresholds for these metrics were derived using four metaheuristic algorithms: Genetic Algorithm (GA), Particle Swarm Optimization (PSO), Differential Evolution (DE) and Artificial Bee Colony (ABC), with the objective of maximizing the harmonic mean of sensitivity and specificity. Experimental findings compare the proposed approach with existing methods of threshold derivation, using evaluation parameters including accuracy, AUC, and the harmonic mean of sensitivity and specificity. Universal thresholds were also derived using weighted clustering for the software, where project-specific tuning is not possible. These results highlight the importance of metaheuristic optimization for improved detection of God Class code smells.

Keywords

Ethical Statement

As no human, animal, or sensitive data were involved in this study, ethical approval was not applicable. Thus, ethical approval was not requested or needed.

References

  1. A. Chatzigeorgiou and A. Manakos, “Investigating the evolution of code smells in object-oriented systems,” Innov. Syst. Softw. Eng., vol. 10, no. 1, pp. 3–18, 2014, doi:10.1007/s11334-013-0205-z.
  2. F. Khomh, M. Di Penta, and Y.-G. Gueheneuc, “An exploratory study of the impact of code smells on software change-proneness,” in 2009 16th Working Conference on Reverse Engineering, pp. 75–84, 2009.
  3. A. Yamashita and L. Moonen, “Do code smells reflect important maintainability aspects?,” in 2012 28th IEEE International Conference on Software Maintenance (ICSM), pp. 306–315, 2012.
  4. M. Fowler, Refactoring: Improving the Design of Existing Code. Boston, MA, USA: Addison-Wesley, 1999.
  5. S. M. Olbrich, D. S. Cruzes, and D. I. K. Sjøberg, “Are all code smells harmful? A study of God Classes and Brain Classes in the evolution of three open source systems,” in 2010 IEEE International Conference on Software Maintenance, pp. 1–10, 2010.
  6. J. A. M. Santos, M. G. De Mendonça, and C. V. A. Silva, “An exploratory study to investigate the impact of conceptualization in god class detection,” ACM Int. Conf. Proceeding Ser., pp. 48–59, 2013, doi:10.1145/2460999.2461007.
  7. S. Dewangan, R. S. Rao, A. Mishra, and M. Gupta, “A novel approach for code smell detection: An empirical study,” IEEE Access, vol. 9, pp. 162869–162883, 2021, doi:10.1109/ACCESS.2021.3133810.
  8. F. Arcelli Fontana, M. V. Mäntylä, M. Zanoni, and A. Marino, “Comparing and experimenting with machine learning techniques for code smell detection,” Empir. Softw. Eng., vol. 21, no. 3, pp. 1143–1191, 2016, doi:10.1007/s10664-015-9378-4.

Details

Primary Language

English

Subjects

Software Engineering (Other)

Journal Section

Research Article

Publication Date

September 30, 2026

Submission Date

October 6, 2025

Acceptance Date

April 9, 2026

Published in Issue

Year 2026 Volume: 9 Number: 4

APA
Sharma, K., & Chhabra, J. K. (2026). God Class Detection Using Thresholds of Software Code Metrics Derived from Metaheuristic Optimization. Sakarya University Journal of Computer and Information Sciences, 9(4), 1305-1317. https://doi.org/10.35377/saucis...1797149
AMA
1.Sharma K, Chhabra JK. God Class Detection Using Thresholds of Software Code Metrics Derived from Metaheuristic Optimization. SAUCIS. 2026;9(4):1305-1317. doi:10.35377/saucis.1797149
Chicago
Sharma, Kapil, and Jitender Kumar Chhabra. 2026. “God Class Detection Using Thresholds of Software Code Metrics Derived from Metaheuristic Optimization”. Sakarya University Journal of Computer and Information Sciences 9 (4): 1305-17. https://doi.org/10.35377/saucis. 1797149.
EndNote
Sharma K, Chhabra JK (September 1, 2026) God Class Detection Using Thresholds of Software Code Metrics Derived from Metaheuristic Optimization. Sakarya University Journal of Computer and Information Sciences 9 4 1305–1317.
IEEE
[1]K. Sharma and J. K. Chhabra, “God Class Detection Using Thresholds of Software Code Metrics Derived from Metaheuristic Optimization”, SAUCIS, vol. 9, no. 4, pp. 1305–1317, Sept. 2026, doi: 10.35377/saucis...1797149.
ISNAD
Sharma, Kapil - Chhabra, Jitender Kumar. “God Class Detection Using Thresholds of Software Code Metrics Derived from Metaheuristic Optimization”. Sakarya University Journal of Computer and Information Sciences 9/4 (September 1, 2026): 1305-1317. https://doi.org/10.35377/saucis. 1797149.
JAMA
1.Sharma K, Chhabra JK. God Class Detection Using Thresholds of Software Code Metrics Derived from Metaheuristic Optimization. SAUCIS. 2026;9:1305–1317.
MLA
Sharma, Kapil, and Jitender Kumar Chhabra. “God Class Detection Using Thresholds of Software Code Metrics Derived from Metaheuristic Optimization”. Sakarya University Journal of Computer and Information Sciences, vol. 9, no. 4, Sept. 2026, pp. 1305-17, doi:10.35377/saucis. 1797149.
Vancouver
1.Kapil Sharma, Jitender Kumar Chhabra. God Class Detection Using Thresholds of Software Code Metrics Derived from Metaheuristic Optimization. SAUCIS. 2026 Sep. 1;9(4):1305-17. doi:10.35377/saucis. 1797149

 

INDEXING & ABSTRACTING & ARCHIVING

 

31045 31044   Anadolu Türk Eğitim Dergisi  31047 

31043 28939 28938 34240
 

 

29070    The papers in this journal are licensed under a Creative Commons Attribution-NonCommercial 4.0 International License