RePurr: Automated Repair of Block-Based Learners' Programs
Sebastian Schweikl, Gordon Fraser
Abstract
Programming is increasingly taught using dedicated block-based programming environments such as Scratch. While the use of blocks instead of text prevents syntax errors, learners can still make semantic mistakes implying a need for feedback and help. Since teachers may be overwhelmed by help requests in a classroom, may not have the required programming education themselves, and may simply not be available in independent learning scenarios, automated hint generation is desirable. Automated program repair can provide the foundation for automated hints, but relies on multiple assumptions: (1) Program repair usually aims to produce localized patches for fixing single bugs, but learners may fundamentally misunderstand programming concepts and tasks or request help for substantially incomplete programs. (2) Software tests are required to guide the search and to localize broken statements, but test suites for block-based programs are different to those considered in past research on fault localization and repair: They consist of system tests, where very few tests are sufficient to fully cover the code. At the same time, these tests have vastly longer execution times caused by the use of animations and interactions on Scratch programs, thus inhibiting the applicability of metaheuristic search. (3) The plastic surgery hypothesis assumes that the code necessary for repairs already exists in the codebase. Block-based programs tend to be small and may lack this necessary redundancy. In order to study whether automated program repair of block-based programs is nevertheless feasible, in this paper we introduce, to the best of our knowledge, the first automated program repair approach for Scratch programs based on evolutionary search. Our RePurr prototype includes novel refinements of fault localization to improve the lack of guidance of the test suites, recovers the plastic surgery hypothesis by exploiting that a learning scenario provides model and student solutions as alternatives, and uses parallelization and accelerated executions to reduce the costs of fitness evaluations. Empirical evaluation of RePurr on a set of real learners' programs confirms the anticipated challenges, but also demonstrates that the repair can nonetheless effectively improve and fix learners' programs, thus enabling automated generation of hints and feedback for learners.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext ecdf22c1-76af-418b-a97d-6a2c48cccc8bBuilds on5
- Automated Program Repair in the Era of Large Pre-trained Language ModelsChunqiu Steven Xia, Yuxiang Wei, Lingming ZhangICSE 2023 · 321 citations
- Synthesizing Tasks for Block-based ProgrammingUmair Z. Ahmed, Maria Christakis, Aleksandr Efremov, Nigel Fernandez et al.NeurIPS 2020 · 26 citations
- Evaluating the Impact of Experimental Assumptions in Automated Fault LocalizationEzekiel O. Soremekun, Lukas Kirschner, Marcel Böhme, Mike PapadakisICSE 2023 · 9 citations
- ErrorCLR: Semantic Error Classification, Localization and Repair for Introductory Programming AssignmentsSiqi Han, Yu Wang, Xuesong LuSIGIR 2023 · 9 citations
- On the Applicability of Language Models to Block-Based ProgramsElisabeth Griebl, Benedikt Fein, Florian Obermüller, Gordon Fraser et al.ICSE 2023 · 5 citations
Related papers
- VisionScratch: LLM-Based Automated Feedback Generation using Code-Produced Videos for Scratch ProgramsYuan Si, Daming Li, Hanyuan Shi, Jialu ZhangFSE 2026 · 1 citation
- The Plastic Surgery Hypothesis in the Era of Large Language ModelsChunqiu Steven Xia, Yifeng Ding, Lingming ZhangASE 2023 · 26 citations
- Verified from Scratch: Program Analysis for Learners' ProgramsAndreas Stahlbauer, Christoph Frädrich, Gordon FraserASE 2020 · 7 citations
- On the efficiency of test suite based program repair: A Systematic Assessment of 16 Automated Repair Systems for Java ProgramsKui Liu, Shangwen Wang, Anil Koyuncu, Kisub Kim et al.ICSE 2020 · 116 citations
- NuzzleBug: Debugging Block-Based Programs in ScratchAdina Deiner, Gordon FraserICSE 2024 · 14 citations
