The maintainability of software systems heavily relies on the clarity and quality of code comments, which bridge the gap between source code and developer understanding. Traditional approaches to comment evaluation focus primarily on syntactic attributes, often neglecting the semantic relevance and coherence crucial for effective maintenance. This review explores the integration of artificial intelligence, particularly natural language processing models like BERT and T5, into automated code comment generation and quality assessment. By analyzing 23 recent studies, this work categorizes advancements in comment generation, comment-code consistency, and complexity measurement tools. It highlights how high-quality comments can moderate software complexity when evaluated alongside metrics such as Cyclomatic Complexity and Internal Code Balance. The paper identifies key challenges—lack of standardized datasets, limited empirical validation, and real-time integration barriers—and proposes tentative solutions and future research directions. This survey provides a foundation for developing robust, semantically-aware tools that support developers in enhancing code comprehensibility and maintainability.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

AI-Driven Code Comment Quality Assessment and Its Impact on Software Complexity: A Review

  • J. C. N. Nagodavithana,
  • D. I. De Silva

摘要

The maintainability of software systems heavily relies on the clarity and quality of code comments, which bridge the gap between source code and developer understanding. Traditional approaches to comment evaluation focus primarily on syntactic attributes, often neglecting the semantic relevance and coherence crucial for effective maintenance. This review explores the integration of artificial intelligence, particularly natural language processing models like BERT and T5, into automated code comment generation and quality assessment. By analyzing 23 recent studies, this work categorizes advancements in comment generation, comment-code consistency, and complexity measurement tools. It highlights how high-quality comments can moderate software complexity when evaluated alongside metrics such as Cyclomatic Complexity and Internal Code Balance. The paper identifies key challenges—lack of standardized datasets, limited empirical validation, and real-time integration barriers—and proposes tentative solutions and future research directions. This survey provides a foundation for developing robust, semantically-aware tools that support developers in enhancing code comprehensibility and maintainability.