StaQC: A Systematically Mined Question-Code Dataset from Stack Overflow
Not on the map. Why?
Abstract (arXiv)
Stack Overflow (SO) has been a great source of natural language questions and their code solutions (i.e., question-code pairs), which are critical for many tasks including code retrieval and annotation. In most existing research, question-code pairs were collected heuristically and tend to have low quality. In this paper, we investigate a new problem of systematically mining question-code pairs from Stack Overflow (in contrast to heuristically collecting them). It is formulated as predicting whether or not a code snippet is a standalone solution to a question. We propose a novel Bi-View Hierarchical Neural Network which can capture both the programming content and the textual context of a code snippet (i.e., two views) to make a prediction. On two manually annotated datasets in Python and SQL domain, our framework substantially outperforms heuristic methods with at least 15% higher F1 and accuracy. Furthermore, we present StaQC (Stack Overflow Question-Code pairs), the largest dataset to date of ~148K Python and ~120K SQL question-code pairs, automatically mined from SO using our framework. Under various case studies, we demonstrate that StaQC can greatly help develop data-hungry models for associating natural language with programming language.
Key facts. Cited by 30 papers in the map (data through 7 Oct 2026). First posted on arXiv 26 Mar 2018.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 10; 2022: 6; 2023: 6; 2024: 5; 2025: 2; 2026: 1.
30 papers.
Sort:
By area:
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2024CodeS: Towards Building Open-source Language Models for Text-to-SQLcited by 183
- 2021CoSQA: 20,000+ Web Queries for Code Search and Question Answeringcited by 74
- 2022MCoNaLa: A Benchmark for Code Generation from Multiple Natural Languagescited by 41
- 2022On the Importance of Building High-quality Training Datasets for Neural Code Searchcited by 30
- 2021CodeTrans: Towards Cracking the Language of Silicon's Code Through Self-Supervised Deep Learning and High Performance Computingcited by 28
- 2021A Survey on Machine Learning Techniques for Source Code Analysiscited by 23
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2022CodeRetriever: Unimodal and Bimodal Contrastive Learning for Code Searchcited by 21
- 2025SWE-SQL: Illuminating LLM Pathways to Solve User SQL Issues in Real-World Applicationscited by 15
- 2024VersiCode: Towards Version-controllable Code Generationcited by 14
- 2024ProCQA: A Large-scale Community-based Programming Question Answering Dataset for Code Searchcited by 12
18 more
- 2022CodeQueries: A Dataset of Semantic Queries over Codecited by 11
- 2024CoSQA+: Pioneering the Multi-Choice Code Search Benchmark with Test-Driven Agentscited by 11
- 2021Reading StackOverflow Encourages Cheating: Adding Question Text Improves Extractive Code Generationcited by 8
- 2021Code Generation from Natural Language with Less Prior and More Monolingual Datacited by 6
- 2021Learning to Describe Solutions for Bug Reports Based on Developer Discussionscited by 5
- 2023MPI-rical: Data-Driven MPI Distributed Parallelism Assistance with Transformerscited by 5
- 2023Noisy Pair Corrector for Dense Retrievalcited by 5
- 2021Natural Language-Guided Programmingcited by 4
- 2022A Survey on Artificial Intelligence for Source Code: A Dialogue Systems Perspectivecited by 3
- 2023Neural Machine Translation for Code Generationcited by 3
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Qualitycited by 3
- 2022JEMMA: An Extensible Java Dataset for ML4Code Applicationscited by 2
- 2023An Exploratory Literature Study on Sharing and Energy Use of Language Models for Source Codecited by 1
- 2024Refining Joint Text and Source Code Embeddings for Retrieval Task with Parameter-Efficient Fine-Tuningcited by 1
- 2021Teach me how to Label: Labeling Functions from Natural Language with Text-to-text Transformerscited by 0
- 2021Text Classification for Task-based Source Code Related Questionscited by 0
- 2023A Machine Learning Approach Towards SKILL Code Autocompletioncited by 0
- 2026A Hybrid LTR-based System via Social Context Embedding for Recommending Solutions of Software Bugs in Developer Communitiescited by 0
- 2026A Hybrid LTR-based System via Social Context Embedding for Recommending Solutions of Software Bugs in Developer Communities7 Mar 2026
- 2025SWE-SQL: Illuminating LLM Pathways to Solve User SQL Issues in Real-World Applications23 Jun 2025
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Quality7 Mar 2025
- 2024CoSQA+: Pioneering the Multi-Choice Code Search Benchmark with Test-Driven Agents17 Jun 2024
- 2024VersiCode: Towards Version-controllable Code Generation11 Jun 2024
- 2024Refining Joint Text and Source Code Embeddings for Retrieval Task with Parameter-Efficient Fine-Tuning7 May 2024
- 2024ProCQA: A Large-scale Community-based Programming Question Answering Dataset for Code Search25 Mar 2024
- 2024CodeS: Towards Building Open-source Language Models for Text-to-SQL26 Feb 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023A Machine Learning Approach Towards SKILL Code Autocompletion4 Dec 2023
- 2023Noisy Pair Corrector for Dense Retrieval7 Nov 2023
- 2023An Exploratory Literature Study on Sharing and Energy Use of Language Models for Source Code5 Jul 2023
18 more
- 2023Neural Machine Translation for Code Generation22 May 2023
- 2023MPI-rical: Data-Driven MPI Distributed Parallelism Assistance with Transformers16 May 2023
- 2022JEMMA: An Extensible Java Dataset for ML4Code Applications18 Dec 2022
- 2022CodeQueries: A Dataset of Semantic Queries over Code17 Sep 2022
- 2022MCoNaLa: A Benchmark for Code Generation from Multiple Natural Languages16 Mar 2022
- 2022On the Importance of Building High-quality Training Datasets for Neural Code Search14 Feb 2022
- 2022A Survey on Artificial Intelligence for Source Code: A Dialogue Systems Perspective10 Feb 2022
- 2022CodeRetriever: Unimodal and Bimodal Contrastive Learning for Code Search26 Jan 2022
- 2021Text Classification for Task-based Source Code Related Questions31 Oct 2021
- 2021A Survey on Machine Learning Techniques for Source Code Analysis18 Oct 2021
- 2021Learning to Describe Solutions for Bug Reports Based on Developer Discussions8 Oct 2021
- 2021Natural Language-Guided Programming11 Aug 2021
- 2021Reading StackOverflow Encourages Cheating: Adding Question Text Improves Extractive Code Generation8 Jun 2021
- 2021CoSQA: 20,000+ Web Queries for Code Search and Question Answering27 May 2021
- 2021CodeTrans: Towards Cracking the Language of Silicon's Code Through Self-Supervised Deep Learning and High Performance Computing6 Apr 2021
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generation9 Feb 2021
- 2021Teach me how to Label: Labeling Functions from Natural Language with Text-to-text Transformers18 Jan 2021
- 2021Code Generation from Natural Language with Less Prior and More Monolingual Data1 Jan 2021
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2024CodeS: Towards Building Open-source Language Models for Text-to-SQLcited by 183
- 2021CoSQA: 20,000+ Web Queries for Code Search and Question Answeringcited by 74
- 2022MCoNaLa: A Benchmark for Code Generation from Multiple Natural Languagescited by 41
- 2022On the Importance of Building High-quality Training Datasets for Neural Code Searchcited by 30
- 2021CodeTrans: Towards Cracking the Language of Silicon's Code Through Self-Supervised Deep Learning and High Performance Computingcited by 28
- 2021A Survey on Machine Learning Techniques for Source Code Analysiscited by 23
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2022CodeRetriever: Unimodal and Bimodal Contrastive Learning for Code Searchcited by 21
- 2025SWE-SQL: Illuminating LLM Pathways to Solve User SQL Issues in Real-World Applicationscited by 15
- 2024VersiCode: Towards Version-controllable Code Generationcited by 14
- 2024ProCQA: A Large-scale Community-based Programming Question Answering Dataset for Code Searchcited by 12
12 most cited of 29 All 29 (JSON)
- 2026A Hybrid LTR-based System via Social Context Embedding for Recommending Solutions of Software Bugs in Developer Communities7 Mar 2026
- 2025SWE-SQL: Illuminating LLM Pathways to Solve User SQL Issues in Real-World Applications23 Jun 2025
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Quality7 Mar 2025
- 2024VersiCode: Towards Version-controllable Code Generation11 Jun 2024
- 2024Refining Joint Text and Source Code Embeddings for Retrieval Task with Parameter-Efficient Fine-Tuning7 May 2024
- 2024ProCQA: A Large-scale Community-based Programming Question Answering Dataset for Code Search25 Mar 2024
- 2024CodeS: Towards Building Open-source Language Models for Text-to-SQL26 Feb 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023A Machine Learning Approach Towards SKILL Code Autocompletion4 Dec 2023
- 2023Noisy Pair Corrector for Dense Retrieval7 Nov 2023
- 2023An Exploratory Literature Study on Sharing and Energy Use of Language Models for Source Code5 Jul 2023
- 2023Neural Machine Translation for Code Generation22 May 2023
12 newest of 29 All 29 (JSON)