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注释对测试预言生成的影响。