Issue Retrieval and Verification Enhanced Supplementary Code Comment Generation

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Zou, Yanzhen, Zhao, Xianlin, Pan, Xinglu, Xie, Bing
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866912436501610496
author Zou, Yanzhen
Zhao, Xianlin
Pan, Xinglu
Xie, Bing
author_facet Zou, Yanzhen
Zhao, Xianlin
Pan, Xinglu
Xie, Bing
contents Issue reports have been recognized to contain rich information for retrieval-augmented code comment generation. However, how to minimize hallucinations in the generated comments remains significant challenges. In this paper, we propose IsComment, an issue-based LLM retrieval and verification approach for generating method's design rationale, usage directives, and so on as supplementary code comments. We first identify five main types of code supplementary information that issue reports can provide through code-comment-issue analysis. Next, we retrieve issue sentences containing these types of supplementary information and generate candidate code comments. To reduce hallucinations, we filter out those candidate comments that are irrelevant to the code or unverifiable by the issue report, making the code comment generation results more reliable. Our experiments indicate that compared with LLMs, IsComment increases the coverage of manual supplementary comments from 33.6% to 72.2% for ChatGPT, from 35.8% to 88.4% for GPT-4o, and from 35.0% to 86.2% for DeepSeek-V3. Compared with existing work, IsComment can generate richer and more useful supplementary code comments for programming understanding, which is quantitatively evaluated through the MESIA metric on both methods with and without manual code comments.
format Preprint
id arxiv_https___arxiv_org_abs_2506_14649
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Issue Retrieval and Verification Enhanced Supplementary Code Comment Generation
Zou, Yanzhen
Zhao, Xianlin
Pan, Xinglu
Xie, Bing
Software Engineering
Issue reports have been recognized to contain rich information for retrieval-augmented code comment generation. However, how to minimize hallucinations in the generated comments remains significant challenges. In this paper, we propose IsComment, an issue-based LLM retrieval and verification approach for generating method's design rationale, usage directives, and so on as supplementary code comments. We first identify five main types of code supplementary information that issue reports can provide through code-comment-issue analysis. Next, we retrieve issue sentences containing these types of supplementary information and generate candidate code comments. To reduce hallucinations, we filter out those candidate comments that are irrelevant to the code or unverifiable by the issue report, making the code comment generation results more reliable. Our experiments indicate that compared with LLMs, IsComment increases the coverage of manual supplementary comments from 33.6% to 72.2% for ChatGPT, from 35.8% to 88.4% for GPT-4o, and from 35.0% to 86.2% for DeepSeek-V3. Compared with existing work, IsComment can generate richer and more useful supplementary code comments for programming understanding, which is quantitatively evaluated through the MESIA metric on both methods with and without manual code comments.
title Issue Retrieval and Verification Enhanced Supplementary Code Comment Generation
topic Software Engineering
url https://arxiv.org/abs/2506.14649