Modern development environments provide a widely used auto-correction facility for quickly repairing syntactic errors. Auto-correction cannot deal with semantic errors, which are much more difficult to repair. Automated program repair techniques, designed for repairing semantic errors, are not well-suited for interactive use while debugging, as they typically assume the existence of a high-quality test suite and take considerable time. To bridge the gap, we developed ROSE, a tool to suggest quick-yet-effective repairs of semantic errors during debugging. ROSE does not rely on a test suite. Instead, it assumes a debugger stopping point where a problem is observed. It asks the developer to quickly describe what is wrong, performs a light-weight fault localization to identify potential responsible locations, and uses a generate-and-validate strategy to produce and validate repairs. Finally, it presents the results so the developer can choose and make the appropriate repair. To assess its utility, we implemented a prototype of ROSE that works in the Eclipse IDE and applied it to two benchmarks, QuixBugs and Defects4J, for repair. ROSE was able to suggest correct repairs for 17 QuixBugs and 16 Defects4J errors in seconds.
翻译:现代开发环境为快速修复合成错误提供了广泛使用的自动校正设施。 自动校正无法处理语义错误, 这些错误更难修复。 用于修复语义错误的自动程序修理技术, 用于修复语义错误, 在调试时不适宜互动使用, 因为他们通常假设存在高质量的测试套件, 需要相当长的时间。 为了缩小差距, 我们开发了ROSE, 这是一种在调试过程中建议快速、 有效修复语义错误的工具。 ROSE 并不依赖测试套件。 相反, 它假设了观察到问题的调试停止点 。 它要求开发者快速描述什么是错的, 进行轻量级错误的本地化以确定潜在的负责地点, 并使用生成和有效战略来生产和验证修理。 最后, 它展示了结果, 使开发者能够选择和进行适当修理。 为了评估其效用, 我们采用了一个在 Eclipese IDE 运行并应用到两个基准的 ROSE 原型, QixBug4 和 Defriful AS 16 校正 和 RAUJ 17 。