| 注册
首页|期刊导航|计算机工程与科学|融合多结构信息的代码注释生成模型

融合多结构信息的代码注释生成模型

余天赐 高尚

计算机工程与科学2024,Vol.46Issue(4):667-675,9.
计算机工程与科学2024,Vol.46Issue(4):667-675,9.DOI:10.3969/j.issn.1007-130X.2024.04.011

融合多结构信息的代码注释生成模型

A code summarization generation model fusing multi-structure data

余天赐 1高尚1

作者信息

  • 1. 江苏科技大学计算机学院,江苏 镇江 212100
  • 折叠

摘要

Abstract

Code summarization can help developers understand the function and implementation of the code.The code summarization generation model can automatically identify the key information in the code and generate relevant summarization to improve the readability and maintainability of the code.Ex-isting code summarization generation models usually only use abstract syntax tree structure information to represent code,resulting in low-quality model-generated summarization.Aiming at this problem,this paper proposes a code summarization generation model that integrates multi-structure data.Firstly,the model adds data flow graph structure information to represent code on the basis of abstract syntax tree.Secondly,in order to capture the global information of the code,the model uses Transformer's en-coder to encode the abstract syntax tree sequence.In addition,the model uses the graph neural network to extract features from the data flow graph and provide information such as the computational depen-dencies between variables.Finally,the model uses the cross-modal attention mechanism to fuse the two features of the abstract syntax tree and the data flow and generate corresponding summarization through the Transformer decoder.The experimental results show that,compared with the six mainstream mod-els,the model improves the scores of BLEU,METEOR and ROUGE-L on the Java and Python data-sets,and the generated summarization is also very readable.

关键词

代码理解/代码注释生成/图神经网络/多特征融合/自然语言处理

Key words

code understanding/code summarization generation/graph neural network/multi-feature fusion/natural language processing

分类

信息技术与安全科学

引用本文复制引用

余天赐,高尚..融合多结构信息的代码注释生成模型[J].计算机工程与科学,2024,46(4):667-675,9.

基金项目

国家自然科学基金(62176107,62376109) (62176107,62376109)

计算机工程与科学

OA北大核心CSTPCD

1007-130X

访问量0
|
下载量0
段落导航相关论文