论文标题

使用堆栈溢出帖子提供实时帮助以修复运行时例外

Providing Real-time Assistance for Repairing Runtime Exceptions using Stack Overflow Posts

论文作者

Mahajan, Sonal, Prasad, Mukul R.

论文摘要

运行时异常(RES)是代码开发过程中经常发生的重要类别。在此“开发”用例中,传统的自动程序维修(APR)工具的用途有限,因为它们需要用于修补甲骨文的测试套件。因此,通常是通过参考技术论坛(例如堆栈溢出(SO))来手动解析其内部开发项目。为了自动化此手动过程,我们扩展了以前的工作Maestro,通过建议使用相关的补丁程序来为开发人员提供实时帮助,以便在此帖子中发布并合成修复补丁,以将RE修复在开发人员的代码中。 Maestro通过相对便宜的,一次性的增量过程来利用从SO帖子中开采的运行时异常模式(REP)的库。 rep是触发给定的RE的陈述的抽象序列。代表用于索引,因此帖子,检索与开发人员代码展示的RE实例最相关的帖子,然后调解从SO帖子中提取具体维修的过程,从SO帖子中抽象出特定的后细节,并将维修材料固定在开发人员的Buggy代码中。我们在由78个实例组成的公开基准中评估了大师。 Maestro能够在27%的情况下在40%的案件中在前3个案件中生成正确的维修贴片,总体上返回81%的案件中有用的伪像。此外,销售代表的使用证明了Maestro绩效的各个方面的作用,从对SO帖子的排名和搜索到从给定帖子的综合补丁。特别是,即使在Maestro的如此良好的排名中,Maestro产生的45%的正确贴片也不能由不使用REP的基线技术产生。大师也很快,平均需要大约1秒钟才能产生其产出。

Runtime Exceptions (REs) are an important class of bugs that occur frequently during code development. Traditional Automatic Program Repair (APR) tools are of limited use in this "in-development" use case, since they require a test-suite to be available as a patching oracle. Thus, developers typically tend to manually resolve their in-development REs, often by referring to technical forums, such as Stack Overflow (SO). To automate this manual process we extend our previous work, MAESTRO, to provide real-time assistance to developers for repairing Java REs by recommending a relevant patch-suggesting SO post and synthesizing a repair patch from this post to fix the RE in the developer's code. MAESTRO exploits a library of Runtime Exception Patterns (REPs) semi-automatically mined from SO posts, through a relatively inexpensive, one-time, incremental process. An REP is an abstracted sequence of statements that triggers a given RE. REPs are used to index SO posts, retrieve a post most relevant to the RE instance exhibited by a developer's code and then mediate the process of extracting a concrete repair from the SO post, abstracting out post-specific details, and concretizing the repair to the developer's buggy code. We evaluate MAESTRO on a published RE benchmark comprised of 78 instances. MAESTRO is able to generate a correct repair patch at the top position in 27% of the cases, within the top-3 in 40% of the cases and overall return a useful artifact in 81% of the cases. Further, the use of REPs proves instrumental to all aspects of MAESTRO's performance, from ranking and searching of SO posts to synthesizing patches from a given post. In particular, 45% of correct patches generated by MAESTRO could not be produced by a baseline technique not using REPs, even when provided with MAESTRO's SO-post ranking. MAESTRO is also fast, needing around 1 second, on average, to generate its output.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源