arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2007.10851cs.SE
收藏

Code2Que:一个从堆栈溢出中挖掘代码段改进问题标题的工具

Code2Que: A Tool for Improving Question Titles from Mined Code Snippets in Stack Overflow

Zhipeng Gao, Xin Xia, David Lo, John Grundy, Yuan-Fang Li

摘要:

Stack Overflow是软件开发人员使用的最受欢迎的技术问答网站之一。向Stack Overflow寻求帮助已经成为软件开发人员解决编程相关问题的日常工作的重要组成部分。尽管Stack Overflow社区提供了质量保证指南来帮助用户编写更好的问题,但我们观察到提交给Stack Overflow的大量问题质量低下。在本文中,我们介绍了一个新的基于Web的工具,Code2Que,它可以帮助开发人员在编写一个给定的代码片段更高质量的问题。Code2Que包括两个主要阶段:离线学习和在线推荐。在离线学习阶段,我们首先收集一组高质量的<code snippet,question>对作为训练样本。然后,我们通过深度序列到序列方法在这些训练样本上训练我们的模型,并通过注意力机制,复制机制和覆盖机制进行增强。在在线推荐阶段,对于给定的代码片段,我们使用离线训练模型来生成问题标题,以帮助经验不足的开发人员更有效地编写问题。同时,我们将给定的代码片段嵌入到向量中,并检索具有类似问题代码片段的相关问题。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑