用AI助手辅助代码评审,提升学生自控学习与代码质量。
AI-Assisted Code Review as a Scaffold for Code Quality and Self-Regulated Learning: An Experience Report

- 将AI评审嵌入GitHub拉取请求,人机协同指导代码修改。
- 2024届学生迭代提交量翻倍,AI失败次数归零。
- 适合教育研究者和重视自主学习的开发团队参考。
代码评审是软件工程教育的核心,但在项目收官阶段因时间紧、反馈不均和经验不足而难以推广。本研究在两个学期(2023–2024)共超过100名学生中,将大模型作为评审工具直接集成于GitHub拉取请求中(人机协同),采用混合方法设计——结合GitHub数据、反思报告与定向问卷,分析参与度与响应性以衡量自我调节学习过程。量化结果显示,2024届学生产生1176次拉取请求,远超2023届的581次;2023年出现的227次AI失败情形,在工具与教学优化后完全消除。尽管使用率差异明显(93%对50%),成功被AI评审的请求中,后续提交比例稳定在32%(2023)与33%(2024)。定性分析表明,学生利用AI结构化评论聚焦代码质量讨论,教师引导有效降低过度依赖。研究贡献包括:(i) 一种融入工作流的AI评审设计,兼顾学习支持与认知卸载防控;(ii) 在真实环境中对两届学生的重复横断面比较;(iii) 结合客观数据与学生自述的混合方法分析;(iv) 基于证据的负责任、学生主导的AI辅助评审教学建议。
原文摘要 · Abstract (English)
Code review is central to software engineering education but hard to scale in capstone projects due to tight deadlines, uneven peer feedback, and limited prior experience. We investigate an LLM-as-reviewer integrated directly into GitHub pull requests (human-in-the-loop) across two cohorts (more than 100 students, 2023--2024). Using a mixed-methods design -- GitHub data, reflective reports, and a targeted survey -- we examine engagement and responsiveness as behavioral indicators of self-regulated learning processes. Quantitatively, the 2024 cohort produced more iterative activity (1176 vs. 581 PRs), while technical issues observed in 2023 (227 failed AI attempts) dropped to zero after tool and instructional refinements. Despite different adoption levels (93\% vs. 50\% of teams using the tool), responsiveness was stable: 32\% (2023) and 33\% (2024) of successfully AI-reviewed PRs were followed by subsequent commits on the same PR. Qualitatively, students used the LLM's structured comments to focus reviews and discuss code quality, while guidance reduced over-reliance. We contribute: (i) an in-workflow design for an AI reviewer that scaffolds learning while mitigating cognitive offloading; (ii) a repeated cross sectional comparison across two cohorts in authentic settings; (iii) a mixed-methods analysis combining objective GitHub metrics with student self-reports; and (iv) evidence-based pedagogical recommendations for responsible, student-led AI-assisted review.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。