بهبود دقت شناسایی بوی کد با استفاده از الگوریتم گرگ خاکستری مبتنی‌ بر فنون یادگیری ‌‌ماشین و رای‌گیری اکثریت

نوع مقاله : مقاله پژوهشی

نویسندگان

1 استادیار، دانشگاه جامع امام حسین (ع)، تهران، ایران

2 کارشناسی ارشد، دانشگاه جامع امام حسین، تهران، ایران

چکیده

بوی کد یک نشانه سطحی است که احتمالاً نشان‌دهنده یک مشکل عمیق‌تر در برنامه است. بوی ‌کد نگهداری، توسعه و تکامل برنامه را با مشکل مواجه می‌کند. وجود بوی کد قطعاً به معنی عدم کارکرد درست نرم‌افزار نیست، اما این موضوع ممکن است باعث کندی‌ پردازش، افزایش خطر خرابی و خطاهای نرم‌افزار شود. بدیهی است که یکی از روش‌های مؤثر در افزایش کیفیت نرم‌افزار، بازسازی و بازآرایی کد است که رابطه مستقیمی با بوی کد دارد. تاکنون تحقیقات زیادی در حوزه شناسایی و برطرف کردن بوهای کد سامانه‌های نرم‌افزاری انجام گرفته است. لیکن، از میان آنها چهار نوع بوی کد شامل؛ متد طولانی، خصیصه حسادت، کلاس خدا و کلاس داده بیشترین توجه محققین را به خود جلب کرده است. محققین برای افزایش دقت پیش‌بینی بوهای کد و کاهش ابعاد داده، از الگوریتم‌های انتخاب ویژگی استفاده می‌کنند. در این مقاله، جهت تعیین زیر‌مجموعه منتخب از ویژگی‌های بهینه، از الگوریتم گرگ خاکستری استفاده شده است. انتخاب ویژگی، باعث سادگی مدل، بهبود دقت و نیز موجب کاهش زمان آموزش آن می‌گردد. همچنین به‌منظور شناسایی و طبقه‌بندی بوهای کد، مدل شناسایی براساس سه الگوریتم یادگیری ماشین تحت عنوان؛ نزدیک‌ترین همسایه، درخت‌ تصمیم و ماشین ‌بردار ‌پشتیبان ساخته می‌شود. درنهایت، نتیجه نهایی حاصل از خروجی مدل، برمبنای سازوکار رای‌گیری اکثریت تعیین می‌گردد. در این مقاله، جهت ارزیابی روش پیشنهادی از نسخه‌ی بهبود یافته‌ی مجموعه ‌داده فونتانا استفاده شده ‌است. همچنین، جهت ارزیابی نتایج روش پیشنهادی از معیارهای آماری شامل دقت، صحت، فراخوان و معیار F استفاده شده است. در نهایت، نتایج روش پیشنهادی با نتایج دیگر روش‌های مرتبط، مورد مقایسه قرار گرفته است. نتایج بدست آمده از آزمون‌ها، نشان می‌دهد که‌ روش پیشنهادی عملکرد قابل قبولی نسبت به سایر روش‌ها ارایه کرده است.

کلیدواژه‌ها

موضوعات


Smiley face

 
[1] M. Tufano, F. Palomba, G. Bavota, R. Oliveto, M. Di Penta, A. De Lucia, D. Poshyvanyk, “When and Why Your Code Starts to Smell Bad,”  IEEE/ACM 37th IEEE International Conference on Software Engineering, vol. 1,  pp. 403–414, 2017.
[2] M. S. Haque, J. Carver, T. Atkison, “Causes, impacts, and detection approaches of code smell: A survey,” ACMSE '18: Proceedings of the ACMSE Conference, pp. 1-8, 2018.  
[3] M. Fowler, “Refactoring: Improving the Design of Existing Code,” Addison-Wesley Professional 2 Ed, pp. 40–48, 2018.
[4] F. Palomba, G. Bavota, M. Di Penta, F. Fasano, R. Oliveto, and A. De Lucia, “On the diffuseness and the impact on maintainability of code smells: A large scale empirical investigation,” in Proceedings of the 40th International Conference on Software Engineering (ICSE), pp. 1188–1221, ACM, 2018.
[5] A. Tahir, J. Dietrich, S. Counsell, S. Licorish, and A. Yamashita, “A large scale study on how developers discuss code smells and anti-pattern in stack exchange sites,” Information and Software Technology, vol. 125, pp. 30–36, 2020.
[6] X. Han, A. Tahir, P. Liang, S. Counsell, Y. Luo, “Understanding Code Smell Detection via Code Review: A Study of the OpenStack Community,” In: IEEE/ACM 29th International Conference on Program Comprehension (ICPC) [Internet]. IEEE, pp.323–34. 2021.
[7] M. Fowler, “Refactoring: Improving the Design of Existing Code,” Addison-Wesley Professional, pp. 25–33 2018.
[8] G. Langelier, H. Sahraoui, P. Poulin, “Visualization-based analysis of quality for large-scale software systems,”  in: Proceedings of the 20th IEEE/ACM International Conference on Automated Software Engineering, pp. 214–223, 2014.
[9] M. Hall, E. Frank, G. Holmes, B. Pfahringer, P. Reutemann, I.H. Witten, “The weka data mining software: an update,” ACM SIGKDD Explor. Newsl, vol. 11 (1), pp. 10–18, 2015.
[10] R. Marinescu, “Detection strategies: metrics-based rules for detecting design flaws,” in: 20th IEEE International Conference Proceedings on Software Maintenance, pp. 350–359. 2004.
[11] G. Ganea, I. Verebi, R. Marinescu, “Continuous quality assessment with incode,” Sci. Comput. Program, vol 134, pp. 19–36, 2017.
[12] M. Mantyla, “Bad smells in software-a taxonomy and an empirical study,” Helsinki University of Technology, pp. 303–314, 2003.
[13] B. Venkatesh, J. Anuradha, “A Review of Feature Selection and Its Methods,” Cybern Inf Technol [Internet], vol 19(1), pp.3–26, 2019.
[14] S. Umadevi, KSJ. Marseline, “A survey on data mining classification algorithms,” Proc IEEE Int Conf Signal Process Commun ICSPC, pp. 264–8, 2018.
[15] S. Kanj, F. Abdallah, “Editing training data for multi-label classification with the k-nearest neighbor rule,” Pattern Analysis and Applications, Vol 19(1), pp. 145-161, 2016.
[16] S. Archana, and K. Elangovan, “Survey of classification techniques in data mining,” International Journal of Computer Science and Mobile Applications, Vol 2(2): pp. 65-71. 2014.
[17] S. Roy, S. Mondal, A. Ekbal, MS. Desarkar, “Dispersion Ratio based Decision Tree Model for Classification,” Expert Syst Appl [Internet], vol 116, pp. 1–9, 2019.
[18] S .Huang, CAI. Nianguang, P. Penzuti, S. Narandes, Y. Wang, XU. Wayne, “Applications of support vector machine (SVM) learning in cancer genomics,” Cancer Genomics and Proteomics, vol 15(1), pp. 41–5, 2019.
[19] EO. Kiyak, D. Birant, KU. Birant, “Comparison of Multi-Label Classification Algorithms for Code Smell Detection,” In: 2019 3rd International Symposium on Multidisciplinary Studies and Innovative Technologies (ISMSIT) [Internet], IEEE, pp.1–6, 2019. 
[20] F. Pecorelli, D. Di Nucci, C. De Roover, A. De Lucia, “On the role of data balancing for machine learning-based code smell detection,” MaLTeSQuE 2019 - Proceedings of the 3rd ACM SIGSOFT International Workshop on Machine Learning Techniques for Software Quality Evaluation, co-located with ESEC/FSE. pp. 19–24, 2019.
[21] F. Pecorelli, F. Palomba, D. Di Nucci, A. De Lucia, “Comparing Heuristic and Machine Learning Approaches for Metric-Based Code Smell Detection,” In: IEEE/ACM 27th International Conference on Program Comprehension (ICPC) [Internet], pp. 93–104, 2019.
[22] R. Ibrahim, M. Ahmed, R. Nayak, S. Jamel, “Reducing redundancy of test cases generation using code smell detection and refactoring.” J King Saud Univ - Comput Inf Sci [Internet], vol 32(3) , pp. 367–74, 2020.
[23] T. Guggulothu, SA. Moiz, “Code smell detection using multi-label classification approach,” Software Quality Journal, Vol. 28,  pp. 63–86 , 2020.
[24] S. Jain, A. Saha, “Improving performance with hybrid feature selection and ensemble machine learning techniques for code smell detection.” Sci Comput Program [Internet]. Dec, vol 212, pp. 1–34, 2021. 
[25] Muhammad Ilyas Azeem, Fabio Palomba, Lin Shi, Qing Wang, “Machine Learning Techniques for Code Smell Detection:
A Systematic Literature Review and Meta-Analysis” Information & Software Technology. January 7, 2019.

مقالات آماده انتشار، پذیرفته شده
انتشار آنلاین از تاریخ 13 خرداد 1403
  • تاریخ دریافت: 13 خرداد 1402
  • تاریخ بازنگری: 23 تیر 1402
  • تاریخ پذیرش: 22 مرداد 1402
  • تاریخ انتشار: 13 خرداد 1403