Lune

ICSE2023顶会

Developer-Intent Driven Code Comment Generation

Fangwen Mu, Xiao Chen, Lin Shi, Song Wang, Qing Wang

摘要

Existing automatic code comment generators mainly focus on producing a general description of functionality for a given code snippet without considering developer intentions. However, in real-world practice, comments are complicated, which often contain information reflecting various intentions of developers, e.g., functionality summarization, design rationale, implementation details, code properties, etc. To bridge the gap between automatic code comment generation and real-world comment practice, we define Developer-Intent Driven Code Comment Generation, which can generate intent-aware comments for the same source code with different intents. To tackle this challenging task, we propose DOME, an approach that utilizes Intent-guided Selective Attention to explicitly select intent-relevant information from the source code, and produces various comments reflecting different intents. Our approach is evaluated on two real-world Java datasets, and the experimental results show that our approach outperforms the state-of-the-art baselines. A human evaluation also confirms the significant potential of applying DOME in practical usage, enabling developers to comment code effectively according to their own needs.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Atomizer: An LLM-based Collaborative Multi-Agent Framework for Intent-Driven Commit Untangling 引用了 CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation
  • Atomizer: An LLM-based Collaborative Multi-Agent Framework for Intent-Driven Commit Untangling 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Atomizer: An LLM-based Collaborative Multi-Agent Framework for Intent-Driven Commit Untangling 引用了 MiSum: Multi-modality Heterogeneous Code Graph Learning for Multi-intent Binary Code Summarization
  • Source Code Summarization in the Era of Large Language Models 引用了 Retrieval-based neural source code summarization
  • Source Code Summarization in the Era of Large Language Models 引用了 Retrieval-Augmented Generation for Code Summarization via Hybrid GNN
  • MAGIS: LLM-Based Multi-Agent Framework for GitHub Issue Resolution 引用了 CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation
  • Testora: Using Natural Language Intent to Detect Behavioral Regressions 引用了 Retrieval-based neural source code summarization
  • MiSum: Multi-modality Heterogeneous Code Graph Learning for Multi-intent Binary Code Summarization 引用了 CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation
  • MiSum: Multi-modality Heterogeneous Code Graph Learning for Multi-intent Binary Code Summarization 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Retrieval-Augmented Generation for Code Summarization via Hybrid GNN 引用了 Retrieval-based neural source code summarization
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper6

  1. MAGIS: LLM-Based Multi-Agent Framework for GitHub Issue ResolutionWei Tao, Yucheng Zhou, Yanlin Wang, Wenqiang Zhang 等NeurIPS 2024 · 210 次引用
  2. Source Code Summarization in the Era of Large Language ModelsWeisong Sun, Yun Miao, Yuekang Li, Hongyu Zhang 等ICSE 2025 · 37 次引用
  3. MiSum: Multi-modality Heterogeneous Code Graph Learning for Multi-intent Binary Code SummarizationKangchen Zhu, Zhiliang Tian, Shangwen Wang, Weiguo Chen 等FSE 2025 · 2 次引用
  4. Testora: Using Natural Language Intent to Detect Behavioral RegressionsMichael PradelICSE 2026 · 1 次引用
  5. Atomizer: An LLM-based Collaborative Multi-Agent Framework for Intent-Driven Commit UntanglingKangchen Zhu, Zhiliang Tian, Shangwen Wang, Mingyue Leng 等ICSE 2026

它引用的 Paper16

  1. CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
  2. GraphCodeBERT: Pre-training Code Representations with Data FlowDaya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng 等ICLR 2021 · 1,644 次引用
  3. CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and GenerationYue Wang, Weishi Wang, Shafiq R. Joty, Steven C. H. HoiEMNLP 2021 · 1,224 次引用
  4. Retrieval-based neural source code summarizationJian Zhang, Xu Wang, Hongyu Zhang, Hailong Sun 等ICSE 2020 · 242 次引用
  5. Retrieval-Augmented Generation for Code Summarization via Hybrid GNNShangqing Liu, Yu Chen, Xiaofei Xie, Jing Kai Siow 等ICLR 2021 · 194 次引用

相关 Paper

  1. Towards Context-Aware Code Comment GenerationXiaohan Yu, Quzhe Huang, Zheng Wang, Yansong Feng 等EMNLP Findings 2020 · 18 次引用
  2. Automatic Comment Generation via Multi-Pass DeliberationFangwen Mu, Xiao Chen, Lin Shi, Song Wang 等ASE 2022 · 10 次引用
  3. From Draft to Precision: Iterative Agentic Framework for Intent-Aware Code SummarizationYifei Ge, Chunrong Fang, Zhenyu Chen, Juan ZhaiISSTA 2026
  4. Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context LearningMingyang Geng, Shangwen Wang, Dezun Dong, Haotian Wang 等ICSE 2024 · 124 次引用
  5. Retrieve and Refine: Exemplar-based Neural Comment GenerationBolin Wei, Yongmin Li, Ge Li, Xin Xia 等ASE 2020 · 68 次引用
黄昏的海面,两侧是细线勾勒的悬崖