Using NLP and AI to Enhance Software Documentation and Code Comprehension

Software documentation plays a critical role in code comprehension, maintenance, and collaboration, yet it is often incomplete, outdated, or inconsistently written. This study explores the application of Artificial Intelligence (AI) and Natural Language Processing (NLP) techniques to automatically generate accurate and context-aware documentation for software code. Leveraging transformer-based models such as CodeT5, GraphCodeBERT, and GPT-3, we developed and evaluated a system capable of producing meaningful summaries of code functions and classes. A comparative analysis between human-written and AI-generated documentation was conducted using both quantitative metrics (BLEU, ROUGE, F1) and qualitative feedback from professional developers. The results indicate that AI-generated documentation significantly improves code readability and developer efficiency, reducing comprehension time and enhancing accuracy in understanding complex code. Additionally, real-time integration of the tool within development environments proved beneficial for continuous documentation support. While AI still faces challenges in handling domain-specific code and interpreting poorly written segments, the overall impact on documentation quality is substantial. This research underscores the potential of NLP-driven tools to automate and standardize documentation practices, offering a scalable solution to one of software engineering’s longstanding challenges. Future work aims to integrate context-awareness, multilingual support, and interactive querying features to further enhance developer experience.

Authors

Institutions

Publication Details

Journal
Physical Education Health and Social Sciences
Published
2025-04-25
DOI
https://doi.org/10.63163/jpehss.v3i2.292
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

Using NLP and AI to Enhance Software Documentation and Code Comprehension

Asad Ullah, Muhammad Shoaib, Ali Ibrahim, Muhammad Baryal et al.
Physical Education Health and Social Sciences
Software Engineering Research
article

Using NLP and AI to Enhance Software Documentation and Code Comprehension

Asad Ullah, Muhammad Shoaib, Ali Ibrahim, Muhammad Baryal, Muhammad Ghayas Khan
article en

Abstract

Software documentation plays a critical role in code comprehension, maintenance, and collaboration, yet it is often incomplete, outdated, or inconsistently written. This study explores the application of Artificial Intelligence (AI) and Natural Language Processing (NLP) techniques to automatically generate accurate and context-aware documentation for software code. Leveraging transformer-based models such as CodeT5, GraphCodeBERT, and GPT-3, we developed and evaluated a system capable of producing meaningful summaries of code functions and classes. A comparative analysis between human-written and AI-generated documentation was conducted using both quantitative metrics (BLEU, ROUGE, F1) and qualitative feedback from professional developers. The results indicate that AI-generated documentation significantly improves code readability and developer efficiency, reducing comprehension time and enhancing accuracy in understanding complex code. Additionally, real-time integration of the tool within development environments proved beneficial for continuous documentation support. While AI still faces challenges in handling domain-specific code and interpreting poorly written segments, the overall impact on documentation quality is substantial. This research underscores the potential of NLP-driven tools to automate and standardize documentation practices, offering a scalable solution to one of software engineering’s longstanding challenges. Future work aims to integrate context-awareness, multilingual support, and interactive querying features to further enhance developer experience.

Physical Education Health and Social SciencesVol. 3(2)
International Islamic University, Islamabad (PK), Kohat University of Science and Technology (PK), University of Haripur (PK), Heriot-Watt University (GB), Heriot-Watt University Malaysia (MY)
Openalex Percentile: Top 86%
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.