Software repositories contain large amounts of textual data, ranging from source code comments and issue descriptions to questions, answers, and comments on Stack Overflow. To make sense of this textual data, topic modelling is frequently used as a text-mining tool for the discovery of hidden semantic structures in text bodies. Latent Dirichlet allocation (LDA) is a commonly used topic model that aims to explain the structure of a corpus by grouping texts. LDA requires multiple parameters to work well, and there are only rough and sometimes conflicting guidelines available on how these parameters should be set. In this paper, we contribute (i) a broad study of parameters to arrive at good local optima for GitHub and Stack Overflow text corpora, (ii) an a-posteriori characterisation of text corpora related to eight programming languages, and (iii) an analysis of corpus feature importance via per-corpus LDA configuration. We find that (1) popular rules of thumb for topic modelling parameter configuration are not applicable to the corpora used in our experiments, (2) corpora sampled from GitHub and Stack Overflow have different characteristics and require different configurations to achieve good model fit, and (3) we can predict good configurations for unseen corpora reliably. These findings support researchers and practitioners in efficiently determining suitable configurations for topic modelling when analysing textual data contained in software repositories.
StaQC: A Systematically Mined Question-Code Dataset from Stack Overflow
The Ohio State University(俄亥俄州立大学);University of Washington(华盛顿大学);Fujitsu Labs of America(富士通美国实验室)
Stack Overflow(SO)是自然语言问题及其代码解决方案的重要来源(即,问题-代码对),这对于包括代码检索和注释在内的许多任务都是至关重要的。在大多数现有的研究中,问题代码对收集的经验教训,往往有低质量。在本文中,我们研究了一个新的问题,系统地挖掘问题代码对从堆栈溢出(相对于收集他们)。它被公式化为预测代码片段是否是问题的独立解决方案。我们提出了一种新的双视图层次神经网络,它可以捕获代码片段的编程内容和文本上下文(即,两种观点)来进行预测。在Python和SQL领域的两个手动注释数据集上,我们的框架大大优于探试法,F1和准确率至少高出15%。此外,我们还介绍了StaQC(Stack Overflow Question-Code pairs),这是迄今为止最大的数据集,包含约148 K Python和约120 K SQL问题代码对,使用我们的框架自动从SO中挖掘出来。在各种案例研究中,我们证明了StaQC可以极大地帮助开发数据饥饿的模型,将自然语言与程序设计语言相关联。
Diverse Title Generation for Stack Overflow Posts with Multiple Sampling Enhanced Transformer
Wuhan University(武汉大学);Huazhong University of Science and Technology(华中科技大学);Wuhan University of Technology(武汉理工大学);Deakin University(迪肯大学);City University of Hong Kong(香港城市大学)
Improving Stack Overflow question title generation with copying enhanced CodeBERT model and bi-modal information
Wuhan University of Technology(武汉理工大学);Wuhan University(武汉大学);Wuhan University of Technology Chongqing Research Institute(武汉理工大学重庆研究院);Sanya Science and Education Innovation Park of Wuhan University of Technology(武汉理工大学三亚科教创新园);City University of Hong Kong(香港城市大学)