Source code documentation is an integral part of software development and maintenance, as it helps in understanding the code and facilitates communication among developers. However, existing documentation is often incomplete, outdated, or inaccurate, which can lead to misunderstandings and errors. In the era of large language models (LLMs), which are being extensively used for software engineering tasks, the quality of documentation becomes even more critical, as documentation provides important context for the models. In this paper, we introduce the notion of documentation-to-code equivalence, a novel property that captures whether documentation accurately and completely describes the code it documents. We present a novel approach, called Documentary, to automatically generate equivalent documentation for a given code snippet. Our evaluation shows that Documentary can generate equivalent documentation for 53.4% of the evaluated function-level code snippets. To show the benefits of documentation-to-code equivalence, we describe and evaluate two software engineering tasks: code understanding and code editing. Our results show that documentation-to-code equivalence allows an LLM to predict the output of a function with 12.8--24.5% higher accuracy, when compared to human-written documentation and documentation generated by a baseline approach. Furthermore, human developers consider documentation generated by Documentary to be more useful for understanding and editing code than the original human-written documentation.


翻译:暂无翻译

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
《基于大型语言模型的软件工程自动化研究》最新264页
专知会员服务
39+阅读 · 2025年7月14日
COLING2024 | 面向编程的自然语言处理综述
专知会员服务
28+阅读 · 2024年4月23日
【知识图谱@ACL2020】Knowledge Graphs in Natural Language Processing
专知会员服务
66+阅读 · 2020年7月12日
中文自然语言处理数据集:ChineseNLPCorpus
AINLP
35+阅读 · 2019年6月21日
自然语言处理精品资料
人工智能前沿讲习班
14+阅读 · 2019年3月13日
资源 | 《自然语言处理综论》中文版 PDF 高清版
AI科技评论
104+阅读 · 2019年2月23日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
自然语言处理(NLP)数据集整理
论智
20+阅读 · 2018年4月8日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 6月16日
Arxiv
0+阅读 · 6月8日
Arxiv
12+阅读 · 2022年1月26日
Arxiv
17+阅读 · 2022年1月11日
VIP会员
最新内容
无人机自主控制与人工智能:系统性综述
专知会员服务
5+阅读 · 今天7:25
巡飞弹与反无人机系统——现代战场的两大支柱
专知会员服务
2+阅读 · 今天6:54
《打造“黄金舰队”》57页报告
专知会员服务
1+阅读 · 今天6:52
《北约数字教官网络发展路径》128页报告
专知会员服务
1+阅读 · 今天6:33
ECCV 2026 | MIMFlow:MIM与归一化流统一图像生成
专知会员服务
6+阅读 · 6月25日
网状网络及其在军事领域的运用
专知会员服务
7+阅读 · 6月25日
无美国参与的欧洲战争方式(万字长文)
专知会员服务
8+阅读 · 6月25日
《国防领域敏感性分析白皮书》
专知会员服务
9+阅读 · 6月25日
综述 | 从问答到任务完成:Agent系统与Harness设计
专知会员服务
10+阅读 · 6月24日
Agentic RL:框架、实践与长程智能体训练
专知会员服务
10+阅读 · 6月24日
相关VIP内容
《基于大型语言模型的软件工程自动化研究》最新264页
专知会员服务
39+阅读 · 2025年7月14日
COLING2024 | 面向编程的自然语言处理综述
专知会员服务
28+阅读 · 2024年4月23日
【知识图谱@ACL2020】Knowledge Graphs in Natural Language Processing
专知会员服务
66+阅读 · 2020年7月12日
相关资讯
中文自然语言处理数据集:ChineseNLPCorpus
AINLP
35+阅读 · 2019年6月21日
自然语言处理精品资料
人工智能前沿讲习班
14+阅读 · 2019年3月13日
资源 | 《自然语言处理综论》中文版 PDF 高清版
AI科技评论
104+阅读 · 2019年2月23日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
自然语言处理(NLP)数据集整理
论智
20+阅读 · 2018年4月8日
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员