Jun 20, 2023
DOI:
Published in: International Conference On Intelligent Computing, Communications, Networking And Services (ICCNS2023)
Publisher: IEEE
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.
Copyright © 2024 Al Ain University. All Rights Reserved.