Author Affiliations
Student , Dept. of Computer Science and Engineering, Er. Perumal Manimekalai College of Engineering Hosur, Tamilnadu, India.
Abstract
An important part of current software development is software quality assurance, especially for dynamically written languages like Python, where undetected bugs can result in serious system failures. In order to detect and categorize bugs in software, this paper introduces an AI-assisted Python code quality and bug risk analysis platform that combines machine learning with static code analysis. The proposed approach uses a collection of 20,000 labelled samples representing 100 different categories of bugs to evaluate Python source code. Code characteristics are represented by extracting static code metrics like Lines of Code (LOC), cyclomatic complexity, and maintainability index. A Random Forest classifier for bug prediction is trained using these features. The model's accuracy of almost 92% shows how well it can spot possible bugs. The solution improves developer insight and efficiency by offering severity assessment, thorough explanations, and recommended fixes for bugs found in addition to classification. An interactive and user-friendly interface is made feasible by the platform's design, which uses a web-based frontend created using HTML, CSS, and JavaScript and a Flask-based backend. According to the results of experiments, the suggested method improves the efficiency of bug detection and supports proactive code quality control.
Keywords - Python Code Analysis, Bug Prediction, Machine Learning, Random Forest, Static Code Analysis, Software Quality, Cyclomatic Complexity, Maintainability Index, Flask
How to Cite This Article
Srilakshmi S, Vandhana V, Nithyasree R, Manisha N, Pamila A (2026). AI-Assisted Python Code Quality and Bug Risk Analysis Platform. International Journal of Innovative Research in Multidisciplinary Education & Technology (IJIRMET), 11(3).