Source code documentation is an important artifact for efficient software development. Code documentation could greatly benefit from automation since manual documentation is often labouring, resource and time-intensive. In this paper, we employed Codex for automatic code documentation creation. Codex is a GPT-3 based model pre-trained on both natural and programming languages. We find that Codex outperforms existing techniques even with basic settings like one-shot learning (i.e., providing only one example for training). Codex achieves an overall BLEU score of 20.6 for six different programming languages (11.2% improvement over earlier state-of-the-art techniques). Thus, Codex shows promise and warrants in-depth future studies for automatic code documentation generation to support diverse development tasks.
翻译:源码文件是高效软件开发的重要手工艺品。代码文件可以极大地受益于自动化,因为人工文件往往耗费大量人力、资源和时间。在本文中,我们采用了自动代码文件制作的代码编码。代码是GPT-3基于的自然语言和编程语言的先期培训模式。我们发现,代码比现有技术要好,即使基本环境如一次性学习(即只提供一个培训的例子),代码文件也比现有技术好。代码文件在六种不同编程语言中的总比值为20.6(比以前最先进的技术提高11.2%)。因此,代码文件显示有希望,并需要在今后对自动代码文件生成进行深入研究,以支持多种发展任务。