节点文献

基于神经网络融合模型的源代码注释自动生成

A Neural Network Fusion Model for Source Code Comments Generation

  • 推荐 CAJ下载
  • PDF下载
  • 不支持迅雷等下载工具,请取消加速工具后下载。

【作者】 周其林王旭刘旭东

【Author】 ZHOU Qilin;WANG Xu;LIU Xudong;Journalism and Communication Laboratory Center,Renmin University of China;School of Computer Science and Engineering,Beihang University;Beijing Advanced Innovation Center for Big Data and Brain Computing,Beihang University;

【通讯作者】 王旭;

【机构】 中国人民大学新闻传播实验中心北京航空航天大学计算机学院北京航空航天大学大数据科学与脑机智能高精尖创新中心

【摘要】 注释可以有效提高源代码的可读性、帮助开发者理解软件功能,对于软件的维护和演化起着关键作用.当前源代码注释自动生成方面的研究存在一定局限,一是没有深入挖掘词法信息;二是没能很好的融合词法和语法信息.因此,提出了基于神经网络融合模型的源代码注释自动生成方法,该方法利用编码器-解码器神经网络框架深度表征源代码的词法信息,结合基于语法树挖掘到的语法信息,使用融合机制形成更加全面的功能语义编码向量用于注释自动生成.通过在公开数据集上进行实验,该方法在BLEU4、METEOR等评价指标上均优于对比的模型,验证了方法的有效性.

【Abstract】 The comments are very helpful for understanding the source code and play an important role in software maintenance and evolution. Existing works show that the lack of source code comments is one common practice in real-world projects. Current studies on automatic source code comments generation have two limitations. Firstly,they only use much simple lexical information; secondly,they do not use the lexical and syntactic information well.In this work,we propose a neural network fusion model for source code comments generation based on the encoderdecoder framework. Our model can embed the lexical information better,represent the syntax information based on abstract syntax tree,and then produce a fusion encoder to learn both the lexical and syntactic information for source code comments generation. The experiments on the public benchmark indicate that our fusion model outperforms the previous models by the metrics such as BLEU4 and METEOR.

【基金】 国家自然科学基金资助项目(62072017)~~
  • 【文献出处】 空间控制技术与应用 ,Aerospace Control and Application , 编辑部邮箱 ,2021年02期
  • 【分类号】TP311.52;TP183
  • 【被引频次】2
  • 【下载频次】115
节点文献中: 

本文链接的文献网络图示:

本文的引文网络