跳到主要导航 跳到搜索 跳到主要内容

Modeling Hierarchical Syntax Structure with Triplet Position for Source Code Summarization

  • Juncai Guo
  • , Jin Liu
  • , Yao Wan
  • , Li Li
  • , Pingyi Zhou
  • Wuhan University
  • Huazhong University of Science and Technology
  • Monash University
  • Huawei Technologies Co., Ltd.

科研成果: 书/报告/会议事项章节会议稿件同行评审

摘要

Automatic code summarization, which aims to describe the source code in natural language, has become an essential task in software maintenance. Our fellow researchers have attempted to achieve such a purpose through various machine learning-based approaches. One key challenge keeping these approaches from being practical lies in the lacking of retaining the semantic structure of source code, which has unfortunately been overlooked by the state-of-the-art methods. Existing approaches resort to representing the syntax structure of code by modeling the Abstract Syntax Trees (ASTs). However, the hierarchical structures of ASTs have not been well explored. In this paper, we propose CODESCRIBE to model the hierarchical syntax structure of code by introducing a novel triplet position for code summarization. Specifically, CODESCRIBE leverages the graph neural network and Transformer to preserve the structural and sequential information of code, respectively. In addition, we propose a pointer-generator network that pays attention to both the structure and sequential tokens of code for a better summary generation. Experiments on two real-world datasets in Java and Python demonstrate the effectiveness of our proposed approach when compared with several state-of-the-art baselines.

源语言英语
主期刊名ACL 2022 - 60th Annual Meeting of the Association for Computational Linguistics, Proceedings of the Conference (Long Papers)
编辑Smaranda Muresan, Preslav Nakov, Aline Villavicencio
出版商Association for Computational Linguistics (ACL)
486-500
页数15
ISBN(电子版)9781955917216
DOI
出版状态已出版 - 2022
已对外发布
活动60th Annual Meeting of the Association for Computational Linguistics, ACL 2022 - Dublin, 爱尔兰
期限: 22 5月 202227 5月 2022

丛书

姓名Proceedings of the Annual Meeting of the Association for Computational Linguistics
1
ISSN(印刷版)0736-587X

会议

会议60th Annual Meeting of the Association for Computational Linguistics, ACL 2022
国家/地区爱尔兰
Dublin
时期22/05/2227/05/22

学术指纹

探究 'Modeling Hierarchical Syntax Structure with Triplet Position for Source Code Summarization' 的科研主题。它们共同构成独一无二的学术指纹。

引用此