USING NLP AND AI TO ENHANCE SOFTWARE DOCUMENTATION AND CODE COMPREHENSION - Abdulmalik Ibrahim,; Muhammad Baryal,; Asad Ullah,; Muhammad Shoaib,; Muhammad Ghayas Khan, (Spectrum of Engineering Sciences, 2025)
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.