全部 标题 作者
关键词 摘要

OALib Journal期刊
ISSN: 2333-9721
费用:99美元

查看量下载量

相关文章

更多...

基于深度学习的过度耦合的消息链异味检测方法
Message Chain Odor Caused by Excessive Coupling Based on Deep Learning

DOI: 10.12677/airr.2024.134091, PP. 891-900

Keywords: 深度学习,代码异味,异味检测
Deep Learning
, Code Smell, Smell Detection

Full-Text   Cite this paper   Add to My Lib

Abstract:

随着移动应用的快速发展,代码异味问题日益凸显,严重影响了软件的质量和性能。本文提出了一种基于深度学习的过度耦合的消息链异味检测方法,旨在提高代码异味的检测效率和准确性。为了自动获取深度学习模型所需的大量标签数据,提出一种基于静态程序分析的正负样本自动生成方法,并实现自动化工具ASSD。然后,使用程序文本信息作为特征集训练三种深度学习模型,实现异味检测。实验结果表明,使用深度学习模型可以检测过度耦合的消息链异味。卷积神经网络模型在查准率、查全率和F1值上均表现优异,其次是循环神经网络模型。本研究的方法和结果为Android应用开发中代码异味的自动检测提供了有效的技术支持。
With the rapid development of mobile applications, the problem of code odor has become increasingly prominent, seriously affecting the quality and performance of software. This article proposes a deep learning based over coupled message chain odor detection method aimed at improving the efficiency and accuracy of code odor detection. In order to automatically obtain the large amount of labeled data required for deep learning models, a method for generating positive and negative samples based on static program analysis is proposed, and the automation tool ASSD is implemented. Then, three deep learning models were trained using program text information as the feature set to achieve odor detection. The experimental results indicate that using deep learning models can detect the odor of over coupled message chains. Convolutional neural network models perform well in precision, recall, and F1 score, followed by recurrent neural network models. The methods and results of this study provide effective technical support for automatic detection of code smells in Android application development.

References

[1]  Zhang, Y., Ge, C., Liu, H. and Zheng, K. (2024) Code Smell Detection Based on Supervised Learning Models: A Survey. Neurocomputing, 565, Article 127014.
https://doi.org/10.1016/j.neucom.2023.127014
[2]  Wu, Z., Chen, X. and Lee, S.U. (2023) A Systematic Literature Review on Android-Specific Smells. Journal of Systems and Software, 201, Article 111677.
https://doi.org/10.1016/j.jss.2023.111677
[3]  Habchi, S., Rouvoy, R. and Moha, N. (2019) On the Survival of Android Code Smells in the Wild. 2019 IEEE/ACM 6th International Conference on Mobile Software Engineering and Systems, Montreal, 25 May 2019, 87-98.
https://doi.org/10.1109/mobilesoft.2019.00022
[4]  Cedrim, D., Garcia, A., Mongiovi, M., Gheyi, R., Sousa, L., de Mello, R., et al. (2017) Understanding the Impact of Refactoring on Smells: A Longitudinal Study of 23 Software Projects. Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering, New York, 4-8 September 2017, 465-475.
https://doi.org/10.1145/3106237.3106259
[5]  Bavota, G., De Lucia, A., Di Penta, M., Oliveto, R. and Palomba, F. (2015) An Experimental Investigation on the Innate Relationship between Quality and Refactoring. Journal of Systems and Software, 107, 1-14.
https://doi.org/10.1016/j.jss.2015.05.024
[6]  马丁·福勒. 重构: 改善既有代码的设计[M]. 第2版. 北京: 人民邮电出版社, 2019.
[7]  Iannone, E., Pecorelli, F., Di Nucci, D., Palomba, F. and De Lucia, A. (2020) Refactoring Android-Specific Energy Smells. Proceedings of the 28th International Conference on Program Comprehension, New York, 13-15 July 2020, 451-455.
https://doi.org/10.1145/3387904.3389298
[8]  Tufano, M., Palomba, F., Bavota, G., Oliveto, R., Di Penta, M., De Lucia, A., et al. (2015) When and Why Your Code Starts to Smell Bad. 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering, Florence, 16-24 May 2015, 403-414.
https://doi.org/10.1109/icse.2015.59
[9]  Khomh, F., Vaucher, S., Guéhéneuc, Y. and Sahraoui, H. (2009) A Bayesian Approach for the Detection of Code and Design Smells. 2009 9th International Conference on Quality Software, Jeju, 24-25 August 2009, 305-314.
https://doi.org/10.1109/qsic.2009.47
[10]  Mannan, U.A., Ahmed, I., Almurshed, R.A.M., Dig, D. and Jensen, C. (2016) Understanding Code Smells in Android Applications. Proceedings of the International Conference on Mobile Software Enginee ring and Systems, New York, 14-22 May 2016, 225-234.
https://doi.org/10.1145/2897073.2897094
[11]  Nucci, D.D., Palomba, F., Tamburri, D.A., et al. (2018) Detecting Code Smells Using Machine Learning Techniques: Are We There Yet? IEEE International Conference on Software Analysis, Campobasso, 20-23 March 2018, 612-621.
https://doi.org/10.1109/SANER.2018.8330266
[12]  卜依凡, 刘辉, 李光杰. 一种基于深度学习的上帝类检测方法[J]. 软件学报, 2019, 30(5): 1359-1374.
[13]  田迎晨, 李柯君, 王太明, 等. 代码坏味研究综述[J]. 软件学报, 2023, 34(1): 150-170.
[14]  Saca, M.A. (2017) Refactoring Improving the Design of Existing Code. 2017 IEEE 37th Central America and Panama Convention, Managua, 15-17 November 2017, 1-3.
https://doi.org/10.1109/concapan.2017.8278488
[15]  Sharma, T., Efstathiou, V., Louridas, P. and Spinellis, D. (2021) Code Smell Detection by Deep Direct-Learning and Transfer-Learning. Journal of Systems and Software, 176, Article 110936.
https://doi.org/10.1016/j.jss.2021.110936
[16]  Tao, Z., Huiling, L., Wenwen, W. and Xia, Y. (2019) GA-SVM Based Feature Selection and Parameter Optimization in Hospitalization Expense Modeling. Applied Soft Computing, 75, 323-332.
https://doi.org/10.1016/j.asoc.2018.11.001

Full-Text

Contact Us

service@oalib.com

QQ:3279437679

WhatsApp +8615387084133