Dergiler / Sakarya University Journal of Computer and Information Sciences / 2026 / Volume: 9 Issue: 4

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

Kapil Sharma(National Institute of Technology, Kurukshetra, Haryana, India)0009-0009-5016-6627
Jitender Kumar Chhabra(National Institute of Technology)0000-0002-2257-0982
Sayfa
—
Yayın Tarihi
2026-09-30
🏛️Bu makalenin bibliyografik verileri ve tam metin bağlantısı DergiPark üzerinden sağlanmıştır.
DergiPark Kaydı ↗
✨

Yapay Zeka Hızlı Bakış & Çıkarımlar

AI Insight
⚡ TL;DR(1 Cümlede Hızlı Çıkarım)

These results highlight the importance of metaheuristic optimization for improved detection of God Class code smells.

📌 3 Maddede Bu Makale

🎯
Amaç & Hipotez:The detection of God Class code smells is necessary for maintaining the quality, maintainability, and evolution of the software.
📊
Temel Bulgular & Veri: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.
💡
Sonuç & Katkı:These results highlight the importance of metaheuristic optimization for improved detection of God Class code smells.
🔬Tür:Modelleme & Sayısal Simülasyon
📍Kapsam:Genişletilmiş Akademik Örneklem
⚙️Değişkenler:Code smell · God Class · Software maintainability

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.

🔖

Bu Makaleye Atıf Yap

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, Volume: 9 Issue: 4. https://doi.org/10.35377/saucis...1797149

📄 Tam Metin PDF Okuyucu

📄

PDF görüntüleyici hazırlanıyor...

Kaynakça (52)

  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.
  9. W. Kessentini, M. Kessentini, H. Sahraoui, S. Bechikh, and A. Ouni, “A cooperative parallel search-based software engineering approach for code-smells detection,” IEEE Trans. Softw. Eng., vol. 40, no. 9, pp. 841–861, 2014.
  10. J. Pereira dos Reis, F. Brito e Abreu, G. de Figueiredo Carneiro, and C. Anslow, “Code smells detection and visualization: A systematic literature review,” Arch. Comput. Methods Eng., vol. 29, no. 1, pp. 47–94, 2022, doi:10.1007/s11831-021-09566-x.
  11. Ö. F. Arar and K. Ayan, “Deriving thresholds of software metrics to predict faults on open source software: Replicated case studies,” Expert Syst. Appl., vol. 61, pp. 106–121, 2016, doi:10.1016/j.eswa.2016.05.018.
  12. T. J. McCabe, “A complexity measure,” IEEE Trans. Softw. Eng., vol. SE-2, no. 4, pp. 308–320, 1976.
  13. F. Brito e Abreu and R. Carapuça, “Object-oriented software engineering: Measuring and controlling the development process,” Proc. 4th Int. Conf. Softw. Qual., pp. 3–5, Oct. 1994.
  14. J. Bansiya and C. G. Davis, “A hierarchical model for object-oriented design quality assessment,” IEEE Trans. Softw. Eng., vol. 28, no. 1, pp. 4–17, 2002.
  15. S. R. Chidamber and C. F. Kemerer, “A metrics suite for object oriented design,” IEEE Trans. Softw. Eng., vol. 20, no. 6, pp. 476–493, 1994.
  16. M. Lanza and R. Marinescu, Object-Oriented Metrics in Practice: Using Software Metrics to Characterize, Evaluate, and Improve the Design of Object-Oriented Systems. Springer, 2006.
  17. T. L. Alves, C. Ypma, and J. Visser, “Deriving metric thresholds from benchmark data,” in 2010 IEEE International Conference on Software Maintenance, pp. 1–10, 2010.
  18. R. Shatnawi, W. Li, J. Swain, and T. Newman, “Finding software metrics threshold values using ROC curves,” J. Softw. Maint. Evol. Res. Pract., vol. 22, no. 1, pp. 1–16, 2010.
  19. M. Alenezi, “Internal quality evolution of open-source software systems,” Appl. Sci., vol. 11, no. 12, p. 5690, 2021.
  20. N. Tsantalis, T. Chaikalis, and A. Chatzigeorgiou, “JDeodorant: Identification and removal of type-checking bad smells,” in 2008 12th European Conference on Software Maintenance and Reengineering, pp. 329–331, 2008.
  21. J. E. Sandberg and L. A. Skår, How to Sell the Idea of XP to Managers, Customers and Peers, vol. 3556, 2005, doi:10.1007/11499053 58.
  22. P. Godefroid, Lecture Notes in Computer Science: Preface, vol. 3639, 2005.
  23. N. Moha, Y.-G. Guéhéneuc, and P. Leduc, “Automatic generation of detection algorithms for design defects,” Proc. 21st IEEE/ACM Int. Conf. Autom. Softw. Eng. (ASE 2006), pp. 297–300, 2006, doi:10.1109/ASE.2006.22.
  24. M. Boussaa, W. Kessentini, M. Kessentini, S. Bechikh, and S. Ben Chikha, “Competitive coevolutionary code-smells detection,” Lect. Notes Comput. Sci. (including Subser. Lect. Notes Artif. Intell. Lect. Notes Bioinformatics), vol. 8084 LNCS, pp. 50–65, 2013, doi:10.1007/978-3-642-39742-4 6.
  25. T. Gerlitz, Q. M. Tran, and C. Dziobek, “Detection and handling of model smells for MATLAB/Simulink models,” CEUR Workshop Proc., vol. 1487, pp. 13–22, 2015.
  26. D. Jiang, P. Ma, X. Su, and T. Wang, “Detecting bad smells with weight based distance metrics theory,” Proc. 2012 2nd Int. Conf. Instrum. Meas. Comput. Commun. Control (IMCCC 2012), pp. 299–304, 2012, doi:10.1109/IMCCC.2012.74.
  27. R. Marinescu, “Detection strategies: Metrics-based rules for detecting design flaws,” in 20th IEEE International Conference on Software Maintenance Proceedings.,pp. 350–359, 2004.
  28. N. Moha, Y.-G. Guéhéneuc, L. Duchien, and A.-F. Le Meur, “DECOR: A method for the specification and detection of code and design smells,” IEEE Trans. Softw. Eng., vol. 36, no. 1, pp. 20–36, 2009.
  29. D. Di Nucci, F. Palomba, D. A. Tamburri, A. Serebrenik, and A. De Lucia, “Detecting code smells using machine learning techniques: Are we there yet?,” in 2018 IEEE 25th International Conference on Software Analysis, Evolution and Reengineering (SANER), pp. 612–621, 2018.
  30. M. A. S. Bigonha, K. Ferreira, P. Souza, B. Sousa, M. Januário, and D. Lima, “The usefulness of software metric thresholds for detection of bad smells and fault prediction,” Inf. Softw. Technol., vol. 115, pp. 79–92, 2019.
  31. D. Radjenović, M. Heričko, R. Torkar, and A. Živkovič, “Software fault prediction metrics: A systematic literature review,” Inf. Softw. Technol., vol. 55, no. 8, pp. 1397–1418, 2013.
  32. V. R. Basili, L. C. Briand, and W. L. Melo, “A validation of object-oriented design metrics as quality indicators,” IEEE Trans. Softw. Eng., vol. 22, no. 10, pp. 751–761, 1996.
  33. L. C. Briand, J. W. Daly, and J. Wüst, “A unified framework for cohesion measurement in object-oriented systems,” Empir. Softw. Eng., vol. 3, no. 1, pp. 65–117, 1998, doi:10.1023/A:1009783721306.
  34. L. Rosenberg, “Applying and interpreting object oriented metrics,” in Software Technology Conference, Utah, Apr. 1998.
  35. R. Bender, “Quantitative risk assessment in epidemiological studies investigating threshold effects,” Biometrical J., vol. 41, no. 3, pp. 305–319, 1999.
  36. M. Singh and J. K. Chhabra, “Improved software fault prediction model based on optimal features set and threshold values using metaheuristic approach,” SN Comput. Sci., vol. 4, no. 6, p. 770, 2023.
  37. R. Malhotra and A. J. Bansal, “Fault prediction considering threshold effects of object-oriented metrics,” Expert Syst., vol. 32, no. 2, pp. 203–219, 2015.
  38. A. Boucher and M. Badri, “Using software metrics thresholds to predict fault-prone classes in object-oriented software,” in 2016 4th Intl. Conf. on Applied Computing and Information Technology / 3rd Intl. Conf. on Computational Science / Intelligence and Applied Informatics / 1st Intl. Conf. on Big Data, Cloud Computing, Data Science & Engineering (ACIT-CSII-BCD), pp. 169–176, 2016.
  39. A. Kumar, A. Sinhal, and B. Verma, “A novel technique of optimization for software metric using PSO,” Int. J. Soft Comput. Softw. Eng., vol. 3, no. 10, pp. 2251–7545, 2013.
  40. M. Harman and B. F. Jones, “Search-based software engineering,” Inf. Softw. Technol., vol. 43, no. 14, pp. 833–839, 2001.
  41. D. K. K. Reddy and H. S. Behera, “Software effort estimation using particle swarm optimization: Advances and challenges,” Comput. Intell. Pattern Recognit. Proc. CIPR 2020, pp. 243–258, 2020.
  42. M. Harman and P. McMinn, “A theoretical and empirical study of search-based testing: Local, global, and hybrid search,” IEEE Trans. Softw. Eng., vol. 36, no. 2, pp. 226–247, 2010, doi:10.1109/TSE.2009.71.
  43. M. Singh and J. K. Chhabra, “Identification of fault prone components in multimedia software based on optimal threshold values decided using genetic algorithm,” J. Univers. Comput. Sci., vol. 31, no. 5, pp. 469–493, 2025, doi:10.3897/jucs.129859.
  44. M. Nasar, P. Johri, and U. Chanda, “A differential evolution approach for software testing effort allocation,” J. Ind. Intell. Inf., vol. 1, no. 2, 2013.
  45. S. S. Dahiya, J. K. Chhabra, and S. Kumar, “Application of artificial bee colony algorithm to software testing,” in 2010 21st Australian Software Engineering Conference, pp. 149–154, 2010.
  46. A. Tahir, S. Counsell, and S. G. MacDonell, “An empirical study into the relationship between class features and test smells,” in 23rd Asia-Pacific Software Engineering Conference (APSEC), pp. 137–144, 2016.
  47. E. Okike, “A pedagogical evaluation and discussion about the lack of cohesion in method (LCOM) metric using field experiment,” vol. 7, no. 2, pp. 1–8, 2010.
  48. K. Erni and C. Lewerentz, “Applying design-metrics to object-oriented frameworks,” in Proceedings of the 3rd International Software Metrics Symposium, pp. 64–74, 1996.
  49. B. Sotto-Mayor, A. Elmishali, M. Kalech, and R. Abreu, “Exploring design smells for smell-based defect prediction,” Eng. Appl. Artif. Intell., vol. 115, p. 105240, 2022.
  50. E. Tempero et al., “The Qualitas Corpus: A curated collection of Java code for empirical studies,” in 2010 Asia Pacific Software Engineering Conference, pp. 336–345, 2010.
  51. A. Vexler, X. Gao, and J. Zhou, “How to implement signed-rank wilcox.test() type procedures when a center of symmetry is unknown,” Comput. Stat. Data Anal., vol. 184, p. 107746, 2023, doi:10.1016/j.csda.2023.107746.
  52. M. E. Bakr, B. M. G. Kibria, and A. M. Gadallah, “A new non-parametric hypothesis testing with reliability analysis applications to model some real data,” J. Radiat. Res. Appl. Sci., vol. 16, no. 4, p. 100724, 2023, doi:10.1016/j.jrras.2023.100724.