论文标题
Code2Que:一种用于改进堆栈中挖掘代码片段中问题标题的工具
Code2Que: A Tool for Improving Question Titles from Mined Code Snippets in Stack Overflow
论文作者
论文摘要
Stack Overflow是软件开发人员使用的最受欢迎的技术问答网站之一。寻求堆栈溢出的帮助已成为软件开发人员日常工作的重要组成部分,以解决与编程相关的问题。尽管堆栈溢出社区提供了质量保证指南来帮助用户写出更好的问题,但我们观察到,提交给堆栈溢出的大量问题质量低。在本文中,我们介绍了一种新的基于Web的工具Code2que,该工具可以帮助开发人员为给定代码片段编写更高质量的问题。 Code2Que包括两个主要阶段:离线学习和在线建议。在离线学习阶段,我们首先收集一组高质量的<代码段,问题>对作为培训样本。然后,我们通过深入的序列到序列方法对这些训练样本进行训练,并通过注意机制,复制机制和覆盖机制增强。在在线推荐阶段,对于给定代码段,我们使用经过离线训练的模型来生成问题标题,以帮助经验不足的开发人员更有效地编写问题。同时,我们将给定的代码片段嵌入向量中,并使用类似的有问题代码片段检索相关问题。
Stack Overflow is one of the most popular technical Q&A sites used by software developers. Seeking help from Stack Overflow has become an essential part of software developers' daily work for solving programming-related questions. Although the Stack Overflow community has provided quality assurance guidelines to help users write better questions, we observed that a significant number of questions submitted to Stack Overflow are of low quality. In this paper, we introduce a new web-based tool, Code2Que, which can help developers in writing higher quality questions for a given code snippet. Code2Que consists of two main stages: offline learning and online recommendation. In the offline learning phase, we first collect a set of good quality <code snippet, question> pairs as training samples. We then train our model on these training samples via a deep sequence-to-sequence approach, enhanced with an attention mechanism, a copy mechanism and a coverage mechanism. In the online recommendation phase, for a given code snippet, we use the offline trained model to generate question titles to assist less experienced developers in writing questions more effectively. At the same time, we embed the given code snippet into a vector and retrieve the related questions with similar problematic code snippets.