arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.05829cs.SE
收藏

利用动态生成的文档层次结构支持软件维护

Supporting Software Maintenance with Dynamically Generated Document Hierarchies

Katherine R. Dearstyne, Alberto D. Rodriguez, Jane Cleland-Huang

AI总结:

本文提出全自动文档生成流水线HGEN,通过LLM将源代码经六阶段转换为多层次文档,并在多个开源与工业项目中验证其质量接近人工文档且覆盖率更高。

摘要:

软件文档支持广泛的软件维护任务;然而,创建和维护高质量、多层次的软件文档可能极其耗时,因此许多代码库缺乏足够的文档。我们通过提出HGEN来解决这一问题,HGEN是一个完全自动化的流水线,利用LLM(大语言模型)将源代码通过六个阶段的转换,生成组织良好的格式化文档层次结构。我们从定量和定性两个角度对HGEN进行了评估。首先,我们使用HGEN为三个不同的项目生成文档,并邀请关键开发人员将生成文档的质量与他们自己先前手工编写的文档进行比较。然后,我们在九个不同的工业项目中试用了HGEN,使用每个项目提供的多样化数据集。我们收集了项目利益相关者的反馈,并采用归纳方法对其进行分析,以识别反复出现的主题。结果表明,HGEN生成的工件层次结构在质量上与手工构建的文档相似,并且对核心概念的覆盖率远高于基线方法。利益相关者的反馈强调了HGEN作为加速代码理解和维护任务的工具所具有的商业影响潜力。结果及相关的补充材料可在 https://zenodo.org/records/11403244 找到。

英文摘要:

Software documentation supports a broad set of software maintenance tasks; however, creating and maintaining high-quality, multi-level software documentation can be incredibly time-consuming and therefore many code bases suffer from a lack of adequate documentation. We address this problem through presenting HGEN, a fully automated pipeline that leverages LLMs to transform source code through a series of six stages into a well-organized hierarchy of formatted documents. We evaluate HGEN both quantitatively and qualitatively. First, we use it to generate documentation for three diverse projects, and engage key developers in comparing the quality of the generated documentation against their own previously produced manually-crafted documentation. We then pilot HGEN in nine different industrial projects using diverse datasets provided by each project. We collect feedback from project stakeholders, and analyze it using an inductive approach to identify recurring themes. Results show that HGEN produces artifact hierarchies similar in quality to manually constructed documentation, with much higher coverage of the core concepts than the baseline approach. Stakeholder feedback highlights HGEN's commercial impact potential as a tool for accelerating code comprehension and maintenance tasks. Results and associated supplemental materials can be found at https://zenodo.org/records/11403244

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑