Skip to main content
QUICK REVIEW

[论文解读] Source Code Recommender Systems: The Practitioners' Perspective

Matteo Ciniselli, Luca Pascarella|arXiv (Cornell University)|Feb 8, 2023
Software Engineering ResearchComputer Science被引用 3
一句话总结

本文基于80名软件开发者的实践者驱动研究,识别出高效源代码推荐系统的关键特征。通过迭代式开放式编码分析,作者提炼出70项需求的分类体系,如风格一致性、对开发者专业能力的认知以及代码质量等,揭示了当前研究与实际开发人员需求之间的关键差距。

ABSTRACT

The automatic generation of source code is one of the long-lasting dreams in software engineering research. Several techniques have been proposed to speed up the writing of new code. For example, code completion techniques can recommend to developers the next few tokens they are likely to type, while retrieval-based approaches can suggest code snippets relevant for the task at hand. Also, deep learning has been used to automatically generate code statements starting from a natural language description. While research in this field is very active, there is no study investigating what the users of code recommender systems (i.e., software practitioners) actually need from these tools. We present a study involving 80 software developers to investigate the characteristics of code recommender systems they consider important. The output of our study is a taxonomy of 70 "requirements" that should be considered when designing code recommender systems. For example, developers would like the recommended code to use the same coding style of the code under development. Also, code recommenders being "aware" of the developers' knowledge (e.g., what are the framework/libraries they already used in the past) and able to customize the recommendations based on this knowledge would be appreciated by practitioners. The taxonomy output of our study points to a wide set of future research directions for code recommenders.

研究动机与目标

  • 识别软件实践者对源代码推荐系统实际需求与期望,弥补以往研究依赖研究者假设的不足。
  • 探究开发人员如何在真实开发工作流中感知现有代码推荐系统的覆盖范围、准确率和可用性。
  • 基于实践者反馈,构建一个全面且实证基础的70项需求分类体系,用于源代码推荐系统。
  • 通过将系统设计与开发人员优先事项对齐,指导未来研究,特别是在个性化、代码质量以及多语言支持方面。

提出的方法

  • 通过Amazon MTurk和人脉渠道招募80名软件开发人员,使用结构化问卷调查其使用代码推荐系统的经验。
  • 通过开放式问题收集关于覆盖范围、准确率、可用性及改进建议的定性反馈。
  • 采用五位作者参与的迭代式开放式编码流程,分析回应,分配标签,并识别重复出现的主题。
  • 通过冲突解决与一致性检查,将识别出的主题组织为70项需求的分层分类体系。
  • 通过四轮迭代式调查(每轮20名开发人员)验证该分类体系,直至不再出现新需求为止。
  • 公开发布所有匿名化数据、编码结果及研究材料,形成公共可复现包,以确保透明度与可复现性。

实验结果

研究问题

  • RQ1实践者认为代码推荐系统在覆盖范围、准确率和可用性方面,哪些特征最为重要?
  • RQ2开发人员对代码推荐的偏好与当前研究技术所基于的假设有何不同?
  • RQ3从实践者角度出发,有哪些具体需求是现有代码推荐系统未解决的?
  • RQ4如何改进代码推荐系统,以适应不同开发者的编码风格和专业水平?
  • RQ5在未来的推荐系统设计中,代码质量、可维护性以及多语言支持应扮演何种角色?

主要发现

  • 实践者优先选择能够适应其个人编码风格的代码推荐系统,例如重复使用变量名和遵循既定规范。
  • 开发人员重视能够识别其在特定框架、库和设计模式方面过往经验的推荐系统,表明个性化推荐存在迫切需求。
  • 代码质量——尤其是正确性、可读性和安全性——被一致视为关键需求,表明当前工具往往忽视这些方面。
  • 参与者对多语言编码场景中支持有限表示担忧,凸显了提升跨语言推荐能力的迫切需求。
  • 本研究发现,当信心不足时,开发人员对完全自动化代码生成持怀疑态度,表明应优先采用模板化或部分推荐机制。
  • 70项需求的分类体系揭示了当前研究重点与实践者需求之间存在显著差距,尤其体现在个性化、质量要求以及上下文感知能力方面。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。