Code documentation is a critical aspect of software development, serving as a bridge between human understanding and machine-readable code. Beyond assisting developers in understanding and maintaining code, documentation also plays a critical role in automating various software engineering tasks, such as test oracle generation (TOG). In Java, Javadoc comments provide structured, natural language documentation embedded directly in the source code, typically detailing functionality, usage, parameters, return values, and exceptions. While prior research has utilized Javadoc comments in test oracle generation (TOG), there has not been a thorough investigation into their impact when combined with other contextual information, nor into identifying the most relevant components for generating correct and strong test oracles, or understanding their role in detecting real bugs. In this study, we dive deep into investigating the impact of Javadoc comments on TOG.
翻译:代码文档是软件开发的关键环节,在人类理解与机器可读代码之间架起了桥梁。除了帮助开发者理解与维护代码外,文档在自动化各类软件工程任务(如测试预言生成)中也发挥着关键作用。在Java语言中,Javadoc注释以结构化自然语言的形式直接嵌入源代码,通常详细描述功能、用法、参数、返回值及异常信息。尽管已有研究将Javadoc注释应用于测试预言生成,但尚未深入探究其与其他上下文信息结合时产生的影响,亦未系统识别生成正确且强健测试预言所需的最相关文档组件,或理解其在检测真实缺陷中的作用。本研究深入探究了Javadoc注释对测试预言生成的影响。