arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2103.11599cs.SEcs.LG
收藏

神经系统Source Code子程序的项目级编码

Project-Level Encoding for Neural Source Code Summarization of Subroutines

University of Notre Dame(圣母大学)

Aakash Bansal, Sakib Haque, Collin McMillan

摘要:

子例程的源代码摘要是编写该子例程的简短自然语言描述的任务。这种描述通常用于针对程序员的文档中,即使是简短的短语(例如“将数据压缩到zip文件”)也可以帮助读者快速理解子例程的功能,而无需阅读代码本身。基于神经网络(特别是编码器-解码器模型设计)的技术已经成为最先进的技术。然而,这些模型普遍存在的一个问题是,它们假设创建摘要所需的信息存在于被摘要的代码本身中--这一假设与程序理解文献不一致。因此,当前的研究前沿在于将源代码上下文编码到摘要的神经模型中的问题。在本文中,我们提出了一个项目级的编码器,以改善模型的代码摘要。项目级是指我们在软件项目中创建选定代码文件的矢量化表示,并使用该表示来增强最先进的神经代码摘要技术的编码器。我们展示了我们的编码器如何改进几个现有的模型,并提供了最大限度地提高,同时控制模型大小的时间和资源成本的指导方针。

英文摘要:

Source code summarization of a subroutine is the task of writing a short, natural language description of that subroutine. The description usually serves in documentation aimed at programmers, where even brief phrase (e.g. "compresses data to a zip file") can help readers rapidly comprehend what a subroutine does without resorting to reading the code itself. Techniques based on neural networks (and encoder-decoder model designs in particular) have established themselves as the state-of-the-art. Yet a problem widely recognized with these models is that they assume the information needed to create a summary is present within the code being summarized itself - an assumption which is at odds with program comprehension literature. Thus a current research frontier lies in the question of encoding source code context into neural models of summarization. In this paper, we present a project-level encoder to improve models of code summarization. By project-level, we mean that we create a vectorized representation of selected code files in a software project, and use that representation to augment the encoder of state-of-the-art neural code summarization techniques. We demonstrate how our encoder improves several existing models, and provide guidelines for maximizing improvement while controlling time and resource costs in model size.

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

↑