开发者为何在问题追踪器中使用ChatGPT?探究对ChatGPT生成代码的使用与依赖情况
Why Do Developers Engage with ChatGPT in Issue-Tracker? Investigating Usage and Reliance on ChatGPT-Generated Code
AI总结:
本研究通过分析GitHub上的开发者-ChatGPT对话,探究了ChatGPT在问题追踪中的使用场景、代码复用率及开发者满意度,发现其多用于构思且后端场景占比高,仅少量代码被直接复用,不同场景满意度差异显著,为开发任务专属的LLM解决方案提供了参考。
摘要:
ChatGPT等大语言模型(LLM)已展现出辅助开发者完成编码与调试任务的潜力,但其在协作式问题解决中的作用仍未得到充分探究。本研究分析了GitHub上1012个问题对应的1152段开发者与ChatGPT的对话,以考察ChatGPT的多样化使用场景及开发者对其生成代码的依赖情况,研究贡献分为四方面。第一,我们人工分析了289段对话,以了解ChatGPT在GitHub Issues中的使用情况。分析显示,ChatGPT主要用于创意构思,而用于验证(如代码文档准确性)的场景极少。第二,我们在全量数据集上应用BERTopic主题建模,识别出核心使用领域。结果显示,后端问题(如API管理)在对话中占主导,而测试相关内容的占比出人意料地低。第三,我们使用CPD克隆检测工具,核查ChatGPT生成的代码是否被用于解决问题。结果表明,仅5.83%的问题直接原样采用了ChatGPT生成的代码来解决。第四,我们使用基于RoBERTa的情感分析模型评估情感倾向,以判断开发者对不同使用场景和参与领域的满意度。结果显示,开发者对使用ChatGPT进行重构、解决数据分析(如表格数据分类)问题持积极情感(即满意度高);相反,在使用ChatGPT调试问题、处理自动化任务(如GUI交互)时,开发者表现出消极情感。研究结果揭示了开发者未被满足的需求与日益增长的不满,研究者和ChatGPT开发者应聚焦于开发任务专属解决方案,以助力解决各类问题,提升软件开发中的用户满意度与问题解决效率。
英文摘要:
Large language models (LLMs) like ChatGPT have shown the potential to assist developers with coding and debugging tasks. However, their role in collaborative issue resolution is underexplored. In this study, we analyzed 1,152 Developer-ChatGPT conversations across 1,012 issues in GitHub to examine the diverse usage of ChatGPT and reliance on its generated code. Our contributions are fourfold. First, we manually analyzed 289 conversations to understand ChatGPT's usage in the GitHub Issues. Our analysis revealed that ChatGPT is primarily utilized for ideation, whereas its usage for validation (e.g., code documentation accuracy) is minimal. Second, we applied BERTopic modeling to identify key areas of engagement on the entire dataset. We found that backend issues (e.g., API management) dominate conversations, while testing is surprisingly less covered. Third, we utilized the CPD clone detection tool to check if the code generated by ChatGPT was used to address issues. Our findings revealed that ChatGPT-generated code was used as-is to resolve only 5.83\% of the issues. Fourth, we estimated sentiment using a RoBERTa-based sentiment analysis model to determine developers' satisfaction with different usages and engagement areas. We found positive sentiment (i.e., high satisfaction) about using ChatGPT for refactoring and addressing data analytics (e.g., categorizing table data) issues. On the contrary, we observed negative sentiment when using ChatGPT to debug issues and address automation tasks (e.g., GUI interactions). Our findings show the unmet needs and growing dissatisfaction among developers. Researchers and ChatGPT developers should focus on developing task-specific solutions that help resolve diverse issues, improving user satisfaction and problem-solving efficiency in software development.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。