International Research Journal of Engineering and Technology (IRJET)
e-ISSN: 2395-0056
Volume: 12 Issue: 03 | Mar 2025
p-ISSN: 2395-0072
www.irjet.net
AI-Based Code Review and Optimization System Nikhil Bhatnagar1, Anshika Shrivastava2, Harsh Daniel Xaxa3, Aneesh Sharma4, Anuyoksha Singh Rajput5 1,2,3,4B.Tech Student, Department of Computer Science and Engineering, LCIT Bilaspur, CG, India 5Assistant Professor, Dept. of Computer Science and Engineering, LCIT Bilaspur, CG, India
---------------------------------------------------------------------***---------------------------------------------------------------------
Abstract - Software development is becoming increasingly
development workflows. Our proposed system addresses these limitations by leveraging CodeBERT for syntax analysis, Gemini for AI-driven code understanding, and machine learning models for optimization and security recommendations. The system is designed to provide detailed feedback on code quality while minimizing false positives, thereby enhancing developer productivity.
complex, necessitating robust code review and optimization techniques to ensure code quality, security, and performance. Traditional manual code review methods are time-consuming, error-prone, and inconsistent. This paper presents an AI-based code review and optimization system that automates code analysis, detects vulnerabilities, and provides optimization suggestions. The system integrates modern AI and web technologies, utilizing Next.js and ShadCN for the front end, Flask for the backend, and Gemini, CodeBERT, and machine learning models from Hugging Face for intelligent code assessment. Additionally, Python libraries such as Pandas, NumPy, and Scikit-learn are leveraged for efficient data handling and analysis. Cloudinary is used for file storage, ensuring seamless management of code-related files. ESLint is incorporated for best analysis practices, improving the system’s ability to enforce coding standards and detect errors effectively. Our proposed system streamlines the code review process, reducing human effort while improving efficiency and accuracy. The system demonstrates high accuracy in detecting code defects through extensive testing, with a confusion matrix analysis validating its performance. This research highlights the system's architecture, implementation, and results, showing its potential to transform software development workflows.
To create an efficient and scalable solution, we integrate Next.js and ShadCN for a dynamic and user-friendly interface, while Flask serves as the backend, managing AI interactions and processing requests. ESLint is incorporated to enforce coding best practices, ensuring consistent and maintainable code. Additionally, Cloudinary is used for file storage, allowing developers to securely manage code files and related assets. This paper explores the methodologies, architecture, and implementation of the AI-based code review and optimization system. The results demonstrate significant improvements in defect detection and performance optimization, reducing the manual effort required for code review. The study also evaluates the system’s effectiveness using a confusion matrix, providing insights into its precision and recall.
2. LITERATURE REVIEW
Keywords: AI-powered code review, machine learning, CodeBERT, software optimization, Gemini API, Next.js, Flask, ESLint, Cloudinary.
The increasing reliance on artificial intelligence (AI) for software engineering tasks has led to significant advancements in automated code review, bug detection, and optimization. This section explores key research contributions that have influenced the development of AIbased code analysis systems, covering deep learning models, transformer-based architectures, and machine learning techniques applied to software quality assessment.
1. INTRODUCTION Code quality plays a crucial role in software development, impacting performance, maintainability, and security. Traditional code review methods rely heavily on manual inspection, which is time-consuming, prone to human error, and inconsistent across different reviewers. With the increasing complexity of modern applications, automated solutions powered by artificial intelligence (AI) and machine learning (ML) are essential to streamline the review process, ensuring efficiency and accuracy.
2.1 AI and Machine Learning in Code Analysis Several studies have highlighted the effectiveness of AIdriven models in automating software analysis. BERT was introduced as a transformer-based model capable of understanding natural language and code representations, laying the foundation for models like CodeBERT, which specializes in software development tasks [1,2]. Similarly, the naturalness of software has been explored, demonstrating that machine learning models can predict code structures with high accuracy [4].
In recent years, AI-driven tools have emerged to assist in various aspects of software engineering, including bug detection, code optimization, and security vulnerability assessment. However, existing solutions often lack flexibility, comprehensive analysis, or seamless integration into
© 2025, IRJET
|
Impact Factor value: 8.315
|
ISO 9001:2008 Certified Journal
|
Page 385