Enhancing Source Code Comment Generation via Retrieval-Augmented Generation with Design Document Term Dictionary

Effective software development depends on clear code comments for better understanding. We introduce a method for generating automated source-code comments using retrieval-augmented generation (RAG) with a design document term dictionary. This method aligns terms and their meanings from design documents with lines of source code, producing comments that clearly reflect the source-code's intent and functionality. Our evaluations on the open-source software iDempiere show significant improvements: context precision increased by 22% and faithfulness by 17 % compared with conventional RAG methods These results confirm our method's validity. Therefore, we plan to explore its application to different software contexts in future work.

Authors

Institutions

Publication Details

Published
2024-12-03
DOI
https://doi.org/10.1109/apsec65559.2024.00061
Citations
1
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
0.78
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Enhancing Source Code Comment Generation via Retrieval-Augmented Generation with Design Document Term Dictionary

Kazu Nishikawa, Hideyuki Kanuka, Genta Koreki
1 citations
Software Engineering Research
0.78
article

Enhancing Source Code Comment Generation via Retrieval-Augmented Generation with Design Document Term Dictionary

Kazu Nishikawa, Hideyuki Kanuka, Genta Koreki
article en
1 citations

Abstract

Effective software development depends on clear code comments for better understanding. We introduce a method for generating automated source-code comments using retrieval-augmented generation (RAG) with a design document term dictionary. This method aligns terms and their meanings from design documents with lines of source code, producing comments that clearly reflect the source-code's intent and functionality. Our evaluations on the open-source software iDempiere show significant improvements: context precision increased by 22% and faithfulness by 17 % compared with conventional RAG methods These results confirm our method's validity. Therefore, we plan to explore its application to different software contexts in future work.

Hitachi (Japan) (JP)
Openalex Percentile: Top 16%
Software Engineering Research
0.78
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.