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.
翻译:源代码的自动生成是软件工程研究领域中长期以来的梦想之一。为加速新代码的编写,研究人员提出了多种技术。例如,代码补全技术能向开发者推荐他们可能接下来输入的若干符号,而基于检索的方法则可建议与当前任务相关的代码片段。此外,深度学习已被用于根据自然语言描述自动生成代码语句。尽管该领域的研究十分活跃,但尚无研究探讨代码推荐系统的用户(即软件从业者)对这些工具的实际需求。我们开展了一项涉及80名软件开发者的研究,以调查他们认为重要的代码推荐系统特性。研究产出了一套包含70项“需求”的分类体系,这些需求应在设计代码推荐系统时予以考虑。例如,开发者希望推荐的代码能与正在开发的代码采用相同的编码风格。此外,从业者期望代码推荐系统能“感知”开发者的知识背景(例如,他们过去使用过哪些框架或库),并基于此知识定制推荐。本研究形成的分类体系为代码推荐系统指明了广泛的未来研究方向。