测量源代码圈复杂度的机器学习模型

A. Odeh, Munther Odeh, Nada Odeh, Hussein Odeh
{"title":"测量源代码圈复杂度的机器学习模型","authors":"A. Odeh, Munther Odeh, Nada Odeh, Hussein Odeh","doi":"10.1109/ICCNS58795.2023.10193630","DOIUrl":null,"url":null,"abstract":"Software developers strive to build high-performance and quality software with a very high degree of coherence among its components, simplified structure, and reduced complexity. A cyclomatic complexity measure is used to identify areas of code that are difficult to maintain or debug by determining how many independent paths, conditional and iteration statements there are through the source code. Using AI, it is possible to estimate and measure the cyclomatic complexity of source code by analyzing the structure of the code and identifying any potential areas where complexity could arise. This research aims to utilize deep learning methodologies, specifically for text classification, to measure the Cyclomatic Complexity of source code, it presents a method for measuring source code Cyclomatic Complexity using Multinomial Naive Bayes Machine Learning Model trained on 3270 samples collected from programs written in Python, Java, and C++. The results show an average accuracy of 96% and precision, recall, and f1-score were calculated for different levels of complexity.","PeriodicalId":158016,"journal":{"name":"2023 International Conference on Intelligent Computing, Communication, Networking and Services (ICCNS)","volume":"27 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-06-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Machine Learning Model for Measuring Cyclomatic Complexity of Source Code\",\"authors\":\"A. Odeh, Munther Odeh, Nada Odeh, Hussein Odeh\",\"doi\":\"10.1109/ICCNS58795.2023.10193630\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Software developers strive to build high-performance and quality software with a very high degree of coherence among its components, simplified structure, and reduced complexity. A cyclomatic complexity measure is used to identify areas of code that are difficult to maintain or debug by determining how many independent paths, conditional and iteration statements there are through the source code. Using AI, it is possible to estimate and measure the cyclomatic complexity of source code by analyzing the structure of the code and identifying any potential areas where complexity could arise. This research aims to utilize deep learning methodologies, specifically for text classification, to measure the Cyclomatic Complexity of source code, it presents a method for measuring source code Cyclomatic Complexity using Multinomial Naive Bayes Machine Learning Model trained on 3270 samples collected from programs written in Python, Java, and C++. The results show an average accuracy of 96% and precision, recall, and f1-score were calculated for different levels of complexity.\",\"PeriodicalId\":158016,\"journal\":{\"name\":\"2023 International Conference on Intelligent Computing, Communication, Networking and Services (ICCNS)\",\"volume\":\"27 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2023-06-19\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2023 International Conference on Intelligent Computing, Communication, Networking and Services (ICCNS)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ICCNS58795.2023.10193630\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2023 International Conference on Intelligent Computing, Communication, Networking and Services (ICCNS)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICCNS58795.2023.10193630","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

软件开发人员努力构建具有组件之间高度一致性、简化结构和降低复杂性的高性能和高质量的软件。圈复杂度度量用于通过确定源代码中有多少独立路径、条件和迭代语句来识别难以维护或调试的代码区域。使用AI,可以通过分析代码结构和识别可能出现复杂性的任何潜在区域来估计和测量源代码的圈复杂度。本研究旨在利用深度学习方法,特别是文本分类,来测量源代码的圈复杂度,它提出了一种测量源代码圈复杂度的方法,该方法使用多项式朴素贝叶斯机器学习模型对3270个样本进行训练,这些样本来自于用Python、Java和c++编写的程序。结果表明,平均准确率为96%,并计算了不同复杂程度的准确率、召回率和f1分数。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Machine Learning Model for Measuring Cyclomatic Complexity of Source Code
Software developers strive to build high-performance and quality software with a very high degree of coherence among its components, simplified structure, and reduced complexity. A cyclomatic complexity measure is used to identify areas of code that are difficult to maintain or debug by determining how many independent paths, conditional and iteration statements there are through the source code. Using AI, it is possible to estimate and measure the cyclomatic complexity of source code by analyzing the structure of the code and identifying any potential areas where complexity could arise. This research aims to utilize deep learning methodologies, specifically for text classification, to measure the Cyclomatic Complexity of source code, it presents a method for measuring source code Cyclomatic Complexity using Multinomial Naive Bayes Machine Learning Model trained on 3270 samples collected from programs written in Python, Java, and C++. The results show an average accuracy of 96% and precision, recall, and f1-score were calculated for different levels of complexity.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书