Lune

EMNLP Findings2020

Towards Context-Aware Code Comment Generation

Xiaohan Yu, Quzhe Huang, Zheng Wang, Yansong Feng, Dongyan Zhao

摘要

Code comments are vital for software maintenance and comprehension, but many software projects suffer from the lack of meaningful and up-to-date comments in practice. This paper presents a novel approach to automatically generate code comments at a function level by targeting object-oriented programming languages. Unlike prior work that only uses information locally available within the target function, our approach leverages broader contextual information by considering all other functions of the same class. To propagate and integrate information beyond the scope of the target function, we design a novel learning framework based on the bidirectional gated recurrent unit and a graph attention network with a pointer mechanism. We apply our approach to produce code comments for Java methods and compare it against four strong baseline methods. Experimental results show that our approach outperforms most methods by a large margin and achieves a comparable result with the state-of-the-art method.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper3

  1. Reassessing automatic evaluation metrics for code summarization tasksDevjeet Roy, Sarah Fakhoury, Venera ArnaoudovaFSE 2021 · 103 次引用
  2. CAST: Enhancing Code Summarization with Hierarchical Splitting and Reconstruction of Abstract Syntax TreesEnsheng Shi, Yanlin Wang, Lun Du, Hongyu Zhang 等EMNLP 2021 · 42 次引用
  3. What's Done Is Not What's Claimed: Detecting and Interpreting Inconsistencies in App BehaviorsChang Yue, Kai Chen, Zhixiu Guo, Jun Dai 等NDSS 2025

相关 Paper

  1. Automating Just-In-Time Comment UpdatingZhongxin Liu, Xin Xia, Meng Yan, Shanping LiASE 2020 · 46 次引用
  2. Retrieve and Refine: Exemplar-based Neural Comment GenerationBolin Wei, Yongmin Li, Ge Li, Xin Xia 等ASE 2020 · 68 次引用
  3. Developer-Intent Driven Code Comment GenerationFangwen Mu, Xiao Chen, Lin Shi, Song Wang 等ICSE 2023 · 25 次引用
  4. Retrieval-Augmented Generation for Code Summarization via Hybrid GNNShangqing Liu, Yu Chen, Xiaofei Xie, Jing Kai Siow 等ICLR 2021 · 194 次引用
  5. Modeling Hierarchical Syntax Structure with Triplet Position for Source Code SummarizationJuncai Guo, Jin Liu, Yao Wan, Li Li 等ACL 2022
黄昏的海面,两侧是细线勾勒的悬崖