代码注释质量评估的推测分析
Speculative Analysis for Quality Assessment of Code Comments
摘要:
以前的研究表明,高质量的代码注释有助于开发人员理解和维护程序。然而,评论的半结构化性质,编写好评论的不明确约定,以及缺乏针对评论各个方面的质量评估工具,使得评论的评估和维护成为一个重要问题。为了实现高质量的注释,我们需要更深入地理解代码注释的特征和开发人员遵循的实践。在这篇论文中,我们从三个不同的角度来探讨评价评论质量的问题:开发人员对评论实践的要求,他们在评论中写了什么,以及研究人员如何支持他们评价评论质量。我们的初步发现表明,开发人员在跨程序设计语言的类注释中嵌入了各种信息。尽管如此,他们仍然面临着寻找相关指南以撰写一致和信息丰富的评论,验证他们的评论是否符合指南以及评估评论质量的整体状态的问题。为了帮助开发人员和研究人员构建评论质量评估工具,我们提供:(i)来自各种社区论坛的评论约定相关问题的经验验证的分类法,(ii)来自各种程序设计语言的评论信息类型的经验验证的分类法,(iii)自动识别信息类型的独立于语言的方法,以及(iv)从系统的文献综述中准备的评论质量分类。
英文摘要:
Previous studies have shown that high-quality code comments assist developers in program comprehension and maintenance tasks. However, the semi-structured nature of comments, unclear conventions for writing good comments, and the lack of quality assessment tools for all aspects of comments make their evaluation and maintenance a non-trivial problem. To achieve high-quality comments, we need a deeper understanding of code comment characteristics and the practices developers follow. In this thesis, we approach the problem of assessing comment quality from three different perspectives: what developers ask about commenting practices, what they write in comments, and how researchers support them in assessing comment quality. Our preliminary findings show that developers embed various kinds of information in class comments across programming languages. Still, they face problems in locating relevant guidelines to write consistent and informative comments, verifying the adherence of their comments to the guidelines, and evaluating the overall state of comment quality. To help developers and researchers in building comment quality assessment tools, we provide: (i) an empirically validated taxonomy of comment convention-related questions from various community forums, (ii) an empirically validated taxonomy of comment information types from various programming languages, (iii) a language-independent approach to automatically identify the information types, and (iv) a comment quality taxonomy prepared from a systematic literature review.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。