Automated Code Comments Generation Using Large Language Models: Empirical Evaluation of T5 and BART

Source code documentation plays a significant role in the software development lifecycle, substantially improving the comprehensibility and maintainability of software projects. Despite its importance, documentation is usually dismissed or fails to satisfy the envisaged standards. Recently, Large Language Models (LLMs) have demonstrated the ability to address these challenges by automating code comments generation. Nevertheless, the empirical evaluation of these models is essential to assess their capabilities to produce accurate, contextually relevant and coherent documentation. In this paper, we have conducted an empirical study to investigate the capabilities of two prominent open-source LLMs, such as T5 and BART, developed by Google AI and Facebook AI, respectively, in automating the code comments generation for Python and Java code snippets. We have rigorously evaluated the performance of these models against four key metrics, such as BLEU, ROUGE, METEOR, and Smoothed BLEU. The comprehensive analysis of the evaluation results clearly highlights BART as the superior model over T5 for single-intent code comment generation.

Authors

Institutions

Publication Details

Journal
IEEE Access
Published
2025-01-01
DOI
https://doi.org/10.1109/access.2025.3597601
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Automated Code Comments Generation Using Large Language Models: Empirical Evaluation of T5 and BART

Mohammad Dabbagh, Dhan Prasad Ghale
IEEE Access
Software Engineering Research
article

Automated Code Comments Generation Using Large Language Models: Empirical Evaluation of T5 and BART

Mohammad Dabbagh, Dhan Prasad Ghale
article en

Abstract

Source code documentation plays a significant role in the software development lifecycle, substantially improving the comprehensibility and maintainability of software projects. Despite its importance, documentation is usually dismissed or fails to satisfy the envisaged standards. Recently, Large Language Models (LLMs) have demonstrated the ability to address these challenges by automating code comments generation. Nevertheless, the empirical evaluation of these models is essential to assess their capabilities to produce accurate, contextually relevant and coherent documentation. In this paper, we have conducted an empirical study to investigate the capabilities of two prominent open-source LLMs, such as T5 and BART, developed by Google AI and Facebook AI, respectively, in automating the code comments generation for Python and Java code snippets. We have rigorously evaluated the performance of these models against four key metrics, such as BLEU, ROUGE, METEOR, and Smoothed BLEU. The comprehensive analysis of the evaluation results clearly highlights BART as the superior model over T5 for single-intent code comment generation.

IEEE AccessVol. 13
University of Technology Sydney (AU)
Openalex Percentile: Top 69%
Software Engineering Research
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.

Automated Code Comments Generation Using Large Language Models: Empirical Evaluation of T5 and BART — Mohammad Dabbagh, Dhan Prasad Ghale · IEEE Access (2025) | TGRS Research Map | TGRS