Automated Code Analysis and Bug Detection Using Graph-Based AI Models
Keywords:
Automated Code Analysis, Bug Detection, Graph Neural Networks, Abstract Syntax Tree, Control-Flow Graph, AI for Software Engineering, Code Security, Machine Learning, Static and Dynamic Analysis, Software Quality Assurance.Abstract
Automated code analysis and bug detection are critical in modern software development, ensuring code quality, security, and maintainability. Traditional static and dynamic analysis techniques, while effective, often struggle with scalability and accuracy when dealing with large codebases. This study explores the use of graph-based AI models for automated bug detection, leveraging abstract syntax trees (ASTs) and control-flow graphs (CFGs) to represent program structures. By applying Graph Neural Networks (GNNs) and Transformer-based models, the proposed framework effectively identifies syntax errors, security vulnerabilities, and logical inconsistencies in source code. Experimental evaluations on benchmark datasets, including CodeNet and Defects4J, demonstrate that the proposed AI model achieves a precision of 91.4% and recall of 87.6%, surpassing traditional machine learning-based approaches. The findings highlight the potential of graph-based AI techniques in enhancing the accuracy and efficiency of automated software debugging.