Automated Program Repair for Introductory Programming Assignments

IF 2.9 3区 教育学 Q2 COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS IEEE Transactions on Learning Technologies Pub Date : 2024-03-21 DOI:10.1109/TLT.2024.3403710
Han Wan;Hongzhen Luo;Mengying Li;Xiaoyan Luo
{"title":"Automated Program Repair for Introductory Programming Assignments","authors":"Han Wan;Hongzhen Luo;Mengying Li;Xiaoyan Luo","doi":"10.1109/TLT.2024.3403710","DOIUrl":null,"url":null,"abstract":"Automatic program repair (APR) tools are valuable for students to assist them with debugging tasks since program repair captures the code modification to make a buggy program pass the given test-suite. However, the process of manually generating catalogs of code modifications is intricate and time-consuming. This article proposes contextual error model repair (CEMR), an automated program repair tool for introductory programming assignments. CEMR is designed to learn program code modifications from incorrect–correct code pairs automatically. Then, it utilizes these code modifications along with CodeBERT, a generative AI, to repair students' new incorrect programs in the same programming assignment. CEMR builds on the observation that code edits performed by students in pairs of incorrect–correct code can be used as input–output examples for learning code modifications. The key idea of CEMR is to leverage the \n<italic>wisdom of the crowd</i>\n: it uses the existing code modifications of incorrect–correct student code pairs to repair the new incorrect student attempts. We chose three of the most related APR tools, Refazer, Refactory, and AlphaRepair, as the baselines to compare against CEMR. The experimental results demonstrate that, on public and real classroom datasets, CEMR achieves higher repair rates than the baselines. Through further analysis, CEMR has demonstrated promising effectiveness in addressing semantical and logical errors while its performance in fixing syntactical errors is limited. In terms of time for repairing buggy programs, CEMR costs approximately half as much as AlphaRepair requires. We opine that CEMR not only be seen as a program repair method that achieves good results with incorrect–correct code pairs but also be further utilized to generate hints to better assist students in learning programming.","PeriodicalId":49191,"journal":{"name":"IEEE Transactions on Learning Technologies","volume":"17 ","pages":"1745-1760"},"PeriodicalIF":2.9000,"publicationDate":"2024-03-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Transactions on Learning Technologies","FirstCategoryId":"95","ListUrlMain":"https://ieeexplore.ieee.org/document/10535720/","RegionNum":3,"RegionCategory":"教育学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS","Score":null,"Total":0}
引用次数: 0

Abstract

Automatic program repair (APR) tools are valuable for students to assist them with debugging tasks since program repair captures the code modification to make a buggy program pass the given test-suite. However, the process of manually generating catalogs of code modifications is intricate and time-consuming. This article proposes contextual error model repair (CEMR), an automated program repair tool for introductory programming assignments. CEMR is designed to learn program code modifications from incorrect–correct code pairs automatically. Then, it utilizes these code modifications along with CodeBERT, a generative AI, to repair students' new incorrect programs in the same programming assignment. CEMR builds on the observation that code edits performed by students in pairs of incorrect–correct code can be used as input–output examples for learning code modifications. The key idea of CEMR is to leverage the wisdom of the crowd : it uses the existing code modifications of incorrect–correct student code pairs to repair the new incorrect student attempts. We chose three of the most related APR tools, Refazer, Refactory, and AlphaRepair, as the baselines to compare against CEMR. The experimental results demonstrate that, on public and real classroom datasets, CEMR achieves higher repair rates than the baselines. Through further analysis, CEMR has demonstrated promising effectiveness in addressing semantical and logical errors while its performance in fixing syntactical errors is limited. In terms of time for repairing buggy programs, CEMR costs approximately half as much as AlphaRepair requires. We opine that CEMR not only be seen as a program repair method that achieves good results with incorrect–correct code pairs but also be further utilized to generate hints to better assist students in learning programming.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
程序设计入门作业的自动程序修复
自动程序修复(APR)工具对于协助学生完成调试任务非常有价值,因为程序修复可以捕捉代码修改,使有错误的程序通过给定的测试套件。然而,手动生成代码修改目录的过程复杂而耗时。本文提出了上下文错误模型修复(CEMR)--一种用于编程入门作业的自动程序修复工具。CEMR 的设计目的是从错误-正确代码对中自动学习程序代码修改。然后,它利用这些代码修改和生成式人工智能 CodeBERT,修复学生在同一编程作业中的新错误程序。CEMR 基于以下观察结果:学生在错误-正确代码对中执行的代码编辑可用作学习代码修改的输入-输出示例。CEMR 的关键理念是利用群众的智慧:它使用错误-正确学生代码对的现有代码修改来修复新的错误学生尝试。我们选择了三个最相关的 APR 工具 Refazer、Refactory 和 AlphaRepair 作为基准与 CEMR 进行比较。实验结果表明,在公共和真实教室数据集上,CEMR 的修复率高于基线工具。通过进一步分析,CEMR 在解决语义和逻辑错误方面表现出了良好的效果,而在修复语法错误方面的表现却很有限。就修复错误程序所需的时间而言,CEMR 的成本约为 AlphaRepair 的一半。我们认为,CEMR 不仅可以作为一种程序修复方法,在修复错误代码对时取得良好效果,还可以进一步用于生成提示,以更好地帮助学生学习编程。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
IEEE Transactions on Learning Technologies
IEEE Transactions on Learning Technologies COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS-
CiteScore
7.50
自引率
5.40%
发文量
82
审稿时长
>12 weeks
期刊介绍: The IEEE Transactions on Learning Technologies covers all advances in learning technologies and their applications, including but not limited to the following topics: innovative online learning systems; intelligent tutors; educational games; simulation systems for education and training; collaborative learning tools; learning with mobile devices; wearable devices and interfaces for learning; personalized and adaptive learning systems; tools for formative and summative assessment; tools for learning analytics and educational data mining; ontologies for learning systems; standards and web services that support learning; authoring tools for learning materials; computer support for peer tutoring; learning via computer-mediated inquiry, field, and lab work; social learning techniques; social networks and infrastructures for learning and knowledge sharing; and creation and management of learning objects.
期刊最新文献
Exploring EFL Learners’ Integration and Perceptions of ChatGPT's Text Revisions: A Three-Stage Writing Task Study Adaptive Question–Answer Generation With Difficulty Control Using Item Response Theory and Pretrained Transformer Models Empowering Instructors: Augmented Reality Authoring Toolkit for Aviation Weather Education The Impact of Artificial General Intelligence-Assisted Project-Based Learning on Students’ Higher Order Thinking and Self-Efficacy Embedding Test Questions in Educational Mobile Virtual Reality: A Study on Hospital Hygiene Procedures
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1