AI-based code assistants are increasingly popular as a means to enhance productivity and improve code quality. This study compares four AI-based code assistants, GitHub Copilot, Tabnine, ChatGPT, and Google Bard, in method generation tasks, assessing their ability to produce accurate, correct, and efficient code. Results show that code assistants are useful, with complementary capabilities, although they rarely generate ready-to-use correct code.
翻译:基于AI的代码助手正日益成为提升生产力和改善代码质量的流行工具。本研究比较了GitHub Copilot、Tabnine、ChatGPT和Google Bard这四种基于AI的代码助手在方法生成任务中的表现,评估其生成准确、正确且高效代码的能力。结果表明,代码助手虽具有互补功能且颇具实用性,但很少能直接生成立即可用的正确代码。