APSEC 2024
Tue 3 - Fri 6 December 2024 China

Effective software development depends on clear code comments for better understanding. We introduce a new method for generating automated source code comments using Retrieval-Augmented Generation (RAG) with a Design Document Term Dictionary (DDTD). This method aligns terms and their meanings from design documents with lines of source code, producing comments that clearly reflect the code’s intent and functionality. Our evaluations on the open-source ERP software iDempiere show significant improvements: Context Precision increased by 22% and Faithfulness by 17% compared to conventional RAG methods These results confirm our method’s validity. Therefore, we plan to explore its application to different software contexts in future work.