当前位置: X-MOL 学术J. Syst. Softw. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
SeCNN: A semantic CNN parser for code comment generation
Journal of Systems and Software ( IF 3.7 ) Pub Date : 2021-07-13 , DOI: 10.1016/j.jss.2021.111036
Zheng Li 1 , Yonghao Wu 1 , Bin Peng 1 , Xiang Chen 2, 3 , Zeyu Sun 4, 5 , Yong Liu 1 , Deli Yu 1
Affiliation  

A code comment generation system can summarize the semantic information of source code and generate a natural language description, which can help developers comprehend programs and reduce time cost spent during software maintenance. Most of state-of-the-art approaches use RNN (Recurrent Neural Network)-based encoder–decoder neural networks. However, this kind of method may not generate high-quality description when summarizing the information among several code blocks that are far from each other (i.e., the long-dependency problem). In this paper, we propose a novel Semantic CNN parser SeCNN for code comment generation. In particular, we use a CNN (Convolutional Neural Network) to alleviate the long-dependency problem and design several novel components, including source code-based CNN and AST-based CNN, to capture the semantic information of the source code. The evaluation is conducted on a widely-used large-scale dataset of 87,136 Java methods. Experimental results show that SeCNN achieves better performance (i.e., 44.69% in terms of BLEU and 26.88% in terms of METEOR) and has lower execution time cost when compared with five state-of-the-art baselines.



中文翻译:

SeCNN:用于代码注释生成的语义 CNN 解析器

代码注释生成系统可以汇总源代码的语义信息,生成自然语言描述,可以帮助开发者理解程序,减少软件维护的时间成本。大多数最先进的方法使用基于 RNN(循环神经网络)的编码器 - 解码器神经网络。然而,这种方法在对几个相距很远的代码块之间的信息进行汇总时可能无法产生高质量的描述(即长依赖问题)。在本文中,我们提出了一个新颖的mantic CNN用于代码注释生成的解析器 SeCNN。特别是,我们使用 CNN(卷积神经网络)来缓解长期依赖问题,并设计了几个新颖的组件,包括基于源代码的 CNN 和基于 AST 的 CNN,以捕获源代码的语义信息。评估是在一个广泛使用的大规模数据集上进行的,该数据集包含 87,136 个 Java 方法。实验结果表明,SeCNN 取得了更好的性能(即 44.69%蓝蓝 和 26.88% 流星) 并且与五个最先进的基线相比具有更低的执行时间成本。

更新日期:2021-07-13
down
wechat
bug