一句话:InFix 通过基于错误消息的模板与随机变异自动修复新手程序的输入错误,无需测试用例或注解,修复率达 94.5%。
新手编程中的许多错误源于输入数据不当而非源代码缺陷,但现有自动调试与维护技术通常修复源码、依赖测试用例或需要特殊注解。InFix 转而自动修复程序输入:它利用新手常见的编程模式,迭代地应用基于错误消息的模板和随机变异来生成修复。作者为 Python 实现了 InFix,并在 Python Tutor 四年数据中收集的 29,995 个含输入错误的唯一场景上评估,能修复 94.5% 的确定性输入错误。研究还包含 97 人的人类实验,结果表明这一简单方法生成的修复质量高,被判定与人工修复同样有帮助,质量差距在 4% 以内。
This paper presents InFix, a technique for automatically fixing erroneous program inputs for novice programmers. Unlike comparable existing approaches for automatic debugging and maintenance tasks, InFix repairs input data rather than source code, does not require test cases, and does not require special annotations. Instead, we take advantage of patterns commonly used by novice programmers to automatically create helpful, high quality input repairs. InFix iteratively applies error-message based templates and random mutations based on insights about the debugging behavior of novices. This paper presents an implementation of InFix for Python. We evaluate on 29,995 unique scenarios with input-related errors collected from four years of data from Python Tutor, a free online programming tutoring environment. Our results generalize and scale; compared to previous work, we consider an order of magnitude more unique programs. Overall, InFix is able to repair 94.5% of deterministic input errors. We also present the results of a human study with 97 participants. Surprisingly, this simple approach produces high quality repairs; humans judged the output of InFix to be equally helpful and within 4% of the quality of human-generated repairs.
DOI 原文 ·
@inproceedings{paperbot5213,
title = {InFix: Automatically Repairing Novice Program Inputs},
author = {Madeline Endres and Georgios Sakkas and Benjamin Cosman and Ranjit Jhala and Westley Weimer},
booktitle = {ASE},
year = {2019},
doi = {10.1109/ase.2019.00045}
}