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.
翻译:ChatGPT已对软件开发实践产生显著影响,在编码、测试和调试等多种任务中为开发者提供了实质性协助。尽管其应用广泛,但ChatGPT作为协作编程助手的实际作用仍鲜有探讨。本文分析了210条与370条开发者在GitHub拉取请求(PR)和议题中共享的ChatGPT对话数据。我们通过人工审查对话内容,刻画了共享行为的动态特征——即理解共享动机、定位共享位置,并判定共享者的角色。主要发现如下:(1)开发者就16类软件工程问题寻求ChatGPT协助。在PR和议题共享的对话中,最常见的问题类别包括代码生成、概念性问题、操作指南、问题解决和代码审查。(2)开发者常通过多轮对话与ChatGPT交互,其中每轮提示可承担不同功能,如揭示初始或新任务、迭代追问及提示优化。多轮对话分别占PR和议题中共享对话的33.2%和36.9%。(3)在协作编程中,开发者利用共享的ChatGPT对话辅助其角色特定贡献——无论是作为PR/议题作者、代码审查者,还是议题协作者。本研究首次揭示了协作软件开发中开发者与ChatGPT的互动机制,为后续相关研究开辟了新方向。