Back to Search
Start Over
A code summarization generation model fusing multi-structure data.
- Source :
- Computer Engineering & Science / Jisuanji Gongcheng yu Kexue; Apr2024, Vol. 46 Issue 4, p667-675, 9p
- Publication Year :
- 2024
-
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. Existing code summarization generation models usually only use abstract syntax tree structure information to represent code, resulting in low-quality mode--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 Transformers encoder 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 dependences 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 models, the model improves the scores of BLEU, METEOR and ROUGEL on the Java and Python data-sets, and the generated summarization is also very readable. [ABSTRACT FROM AUTHOR]
Details
- Language :
- Chinese
- ISSN :
- 1007130X
- Volume :
- 46
- Issue :
- 4
- Database :
- Complementary Index
- Journal :
- Computer Engineering & Science / Jisuanji Gongcheng yu Kexue
- Publication Type :
- Academic Journal
- Accession number :
- 177129661
- Full Text :
- https://doi.org/10.3969/j.issn.1007-130X.2024.04.011