Published June 1, 2021 | Version 1.0

Post2Vec: Learning Distributed Representations of Stack Overflow Posts

  • 1. Singapore Management University
  • 2. Monash University

Contributors

Contact person:

  • 1. Singapore Management University

Description

Past studies have proposed solutions that analyze Stack Overflow content to help users find desired information or aid various downstream software engineering tasks. A common step performed by those solutions is to extract suitable representations ofposts; typically, in the form of meaningful vectors. These vectors are then used for different tasks, for example, tag recommendation, relatedness prediction, post classification, and API recommendation. Intuitively, the quality of the vector representations of posts determines the effectiveness of the solutions in performing the respective tasks. In this work, to aid existing studies that analyze Stack Overflow posts, we propose a specialized deep learning architecture Post2Vec which extracts distributed representations of Stack Overflow posts. Post2Vec is aware of different types of content present in Stack Overflow posts, i.e., title, description, and code snippets, and integrates them seamlessly to learn post representations. Tags provided by Stack Overflow users that serve as a common vocabulary that captures the semantics of posts are used to guide Post2Vec in its task. To evaluate the quality of Post2Vec’s deep learning architecture, we first investigate its end-to-end effectiveness in tag recommendation task. The results are compared to those of state-of-the-art tag recommendation approaches that also employ deep neural networks. We observe that Post2Vec achieves 15-25% improvement in terms of F1-score@5 at a lower computational cost. Moreover, to evaluate the value of representations learned by Post2Vec, we use them for three other tasks, i.e., relatedness prediction, post classification, and API recommendation. We demonstrate that the representations can be used to boost the effectiveness of state-of-the-art solutions for the three tasks by substantial margins (by 10%, 7%, and 10% in terms of F1-score, F1-score, and correctness, respectively). We release our replication package at https://github.com/maxxbw54/Post2Vec.

Files

_1_commonTags.csv

Files (34.4 GB)

Name Size
md5:6d601f2bf696d16e6cdc1adbe6cf12bc
301.9 kB Preview Download
md5:d3628168b7373d7e3fd4b09c2852dbe6
395.6 kB Preview Download
md5:54db8b6ef339fc6e72f18d52a8e3a73c
332.2 MB Download
md5:d0751f3d66b03b12c1b0e67b469998f2
34.1 GB Download