{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/staqc-a-systematically-mined-question-code","title":"StaQC: A Systematically Mined Question-Code Dataset from Stack Overflow","arxiv_id":"1803.09371","date":"2018-03-26","proceeding":null,"authors":["Ziyu Yao","Daniel S. Weld","Wei-Peng Chen","Huan Sun"],"abstract":"Stack Overflow (SO) has been a great source of natural language questions and\ntheir code solutions (i.e., question-code pairs), which are critical for many\ntasks including code retrieval and annotation. In most existing research,\nquestion-code pairs were collected heuristically and tend to have low quality.\nIn this paper, we investigate a new problem of systematically mining\nquestion-code pairs from Stack Overflow (in contrast to heuristically\ncollecting them). It is formulated as predicting whether or not a code snippet\nis a standalone solution to a question. We propose a novel Bi-View Hierarchical\nNeural Network which can capture both the programming content and the textual\ncontext of a code snippet (i.e., two views) to make a prediction. On two\nmanually annotated datasets in Python and SQL domain, our framework\nsubstantially outperforms heuristic methods with at least 15% higher F1 and\naccuracy. Furthermore, we present StaQC (Stack Overflow Question-Code pairs),\nthe largest dataset to date of ~148K Python and ~120K SQL question-code pairs,\nautomatically mined from SO using our framework. Under various case studies, we\ndemonstrate that StaQC can greatly help develop data-hungry models for\nassociating natural language with programming language.","url_abs":"http://arxiv.org/abs/1803.09371v1","url_pdf":"http://arxiv.org/pdf/1803.09371v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"staqc-a-systematically-mined-question-code","repo_url":"https://github.com/LittleYUYU/StackOverflow-Question-Code-Dataset","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"tf","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[{"task_slug":"retrieval","task_name":"Retrieval"}],"methods":[],"datasets_introduced":[{"slug":"staqc","name":"StaQC","full_name":""}],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1803.09371","mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}