arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2004.04881cs.SE
收藏

通过关注文件上下文改进子程序的自动摘要

Improved Automatic Summarization of Subroutines via Attention to File Context

Sakib Haque, Alexander LeClair, Lingfei Wu, Collin McMillan

摘要:

软件文档主要由软件中子程序的简短的、自然语言摘要组成。这些摘要可以帮助程序员快速理解子例程的功能,而无需亲自阅读源代码。编写这些描述的任务被称为“源代码摘要”,并且已经成为多年的研究目标。最近,基于人工智能的方法已经取代了旧的基于人工智能的方法。然而,到目前为止,这些基于人工智能的方法假设预测摘要所需的所有内容都在子例程本身内部。这个假设限制了性能,因为许多子程序没有上下文就无法理解。在本文中,我们提出了一种方法,模型的文件上下文的子程序(即在同一个文件中的其他子程序),并使用一个注意力机制,以找到单词和概念使用的摘要。我们在一个实验中表明,我们的方法扩展和改进了几个最近的基线。

英文摘要:

Software documentation largely consists of short, natural language summaries of the subroutines in the software. These summaries help programmers quickly understand what a subroutine does without having to read the source code him or herself. The task of writing these descriptions is called "source code summarization" and has been a target of research for several years. Recently, AI-based approaches have superseded older, heuristic-based approaches. Yet, to date these AI-based approaches assume that all the content needed to predict summaries is inside subroutine itself. This assumption limits performance because many subroutines cannot be understood without surrounding context. In this paper, we present an approach that models the file context of subroutines (i.e. other subroutines in the same file) and uses an attention mechanism to find words and concepts to use in summaries. We show in an experiment that our approach extends and improves several recent baselines.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑