Enhancing Programming Education using GPT-Based Code Review and Automatic Comment Generation
DOI:
https://doi.org/10.62643/Abstract
With the rapid growth of online and selfpaced programming education, providing accurate and timely feedback to learners has become a significant challenge. Traditional automated evaluation systems primarily rely on test-case execution and fail to deliver meaningful, explanatory feedback, while existing Large Language Model (LLM)-based tools often generate complete solutions, raising concerns regarding academic integrity and inefficient resource usage. To address these limitations, this paper proposes an intelligent GPT4o–based Code Review System designed to generate precise, feedback-oriented responses without revealing full solutions. The system incorporates a Code Review Module with a Review Necessity Chain and Code Correctness Check to focus evaluation on relevant code segments and reduce unnecessary computation. In addition, an NLP-based automatic comment generation module is introduced as an extension to enhance code readability by generating descriptive inline comments from source code structure and identifiers. The proposed system is evaluated using BERT-Score to measure semantic similarity between generated and reference review comments, achieving an F1-score of 88%, indicating strong alignment with expert feedback. A Flask-based web interface enables real-time interaction, allowing users to upload code and receive structured review comments along with automatically generated explanations. The results demonstrate that the proposed framework improves code comprehension, supports independent learning, and provides a scalable and educationally effective solution for automated programming feedback systems.
Downloads
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.













