开发者在GitHub拉取请求和问题中与ChatGPT共享对话的实证研究
An Empirical Study on Developers Shared Conversations with ChatGPT in GitHub Pull Requests and Issues
AI总结:
本研究通过分析GitHub PR和问题中共享的ChatGPT对话,揭示了开发者寻求帮助的16种咨询类型、多轮对话模式及角色特定贡献,为理解人机协作开发提供了实证基础。
摘要:
ChatGPT显著影响了软件开发实践,在编码、测试和调试等多种任务中为开发者提供了大量帮助。尽管其被广泛采用,但ChatGPT作为协作编码助手的影響在很大程度上仍未得到探索。在本文中,我们分析了开发者在GitHub拉取请求(PRs)和问题(issues)中共享的210个和370个与ChatGPT的对话数据集。我们手动检查了对话内容,并刻画了共享行为的动态特征,即理解共享背后的动机,识别对话被共享的位置,以及确定共享对话的开发者的角色。我们的主要观察结果是:(1)开发者在16种软件工程咨询类型中寻求ChatGPT的帮助。在PRs和问题中共享的对话中,最常见的咨询类别包括代码生成、概念性问题、操作指南、问题解决和代码审查。(2)开发者经常通过多轮对话与ChatGPT互动,其中每个提示可以扮演各种角色,例如揭示初始或新任务、迭代跟进和提示优化。多轮对话占PRs中共享对话的33.2%,占问题中共享对话的36.9%。(3)在协作编码中,开发者利用与ChatGPT的共享对话来促进其特定角色的贡献,无论是作为PRs或问题的作者、代码审查者,还是问题的协作者。我们的工作是理解开发者在协作软件开发中与ChatGPT动态互动的第一步,并为该主题的未来研究开辟了新方向。
英文摘要:
ChatGPT has significantly impacted software development practices, providing substantial assistance to developers in a variety of tasks, including coding, testing, and debugging. Despite its widespread adoption, the impact of ChatGPT as an assistant in collaborative coding remains largely unexplored. In this paper, we analyze a dataset of 210 and 370 developers shared conversations with ChatGPT in GitHub pull requests (PRs) and issues. We manually examined the content of the conversations and characterized the dynamics of the sharing behavior, i.e., understanding the rationale behind the sharing, identifying the locations where the conversations were shared, and determining the roles of the developers who shared them. Our main observations are: (1) Developers seek ChatGPT assistance across 16 types of software engineering inquiries. In both conversations shared in PRs and issues, the most frequently encountered inquiry categories include code generation, conceptual questions, how-to guides, issue resolution, and code review. (2) Developers frequently engage with ChatGPT via multi-turn conversations where each prompt can fulfill various roles, such as unveiling initial or new tasks, iterative follow-up, and prompt refinement. Multi-turn conversations account for 33.2% of the conversations shared in PRs and 36.9% in issues. (3) In collaborative coding, developers leverage shared conversations with ChatGPT to facilitate their role-specific contributions, whether as authors of PRs or issues, code reviewers, or collaborators on issues. Our work serves as the first step towards understanding the dynamics between developers and ChatGPT in collaborative software development and opens up new directions for future research on the topic.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。