CodeQueries: A Dataset of Semantic Queries over Code
Not on the map. Why?
Abstract (arXiv)
Developers often have questions about semantic aspects of code they are working on, e.g., "Is there a class whose parent classes declare a conflicting attribute?". Answering them requires understanding code semantics such as attributes and inheritance relation of classes. An answer to such a question should identify code spans constituting the answer (e.g., the declaration of the subclass) as well as supporting facts (e.g., the definitions of the conflicting attributes). The existing work on question-answering over code has considered yes/no questions or method-level context. We contribute a labeled dataset, called CodeQueries, of semantic queries over Python code. Compared to the existing datasets, in CodeQueries, the queries are about code semantics, the context is file level and the answers are code spans. We curate the dataset based on queries supported by a widely-used static analysis tool, CodeQL, and include both positive and negative examples, and queries requiring single-hop and multi-hop reasoning. To assess the value of our dataset, we evaluate baseline neural approaches. We study a large language model (GPT3.5-Turbo) in zero-shot and few-shot settings on a subset of CodeQueries. We also evaluate a BERT style model (CuBERT) with fine-tuning. We find that these models achieve limited success on CodeQueries. CodeQueries is thus a challenging dataset to test the ability of neural models, to understand code semantics, in the extractive question-answering setting.
Key facts. Cited by 11 papers in the map (data through 7 Oct 2026). Builds on 26 of its 54 references that are in the map. First posted on arXiv 17 Sep 2022.
Builds on
26 of 54 references.
References · 26
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,686
- 2017Decoupled Weight Decay Regularizationcited by 1,722
- 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,538
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2017Simple and Effective Multi-Paragraph Reading Comprehensioncited by 120
14 more
- 2021CoSQA: 20,000+ Web Queries for Code Search and Question Answeringcited by 74
- 2019When Deep Learning Met Code Searchcited by 45
- 2020LambdaNet: Probabilistic Type Inference using Graph Neural Networkscited by 44
- 2017Making Neural QA as Simple as Possible but not Simplercited by 33
- 2019TypeWriter: Neural Type Prediction with Search-based Validationcited by 32
- 2018StaQC: A Systematically Mined Question-Code Dataset from Stack Overflowcited by 30
- 2021CodeQA: A Question Answering Dataset for Source Code Comprehensioncited by 30
- 2020Neural Code Search Revisited: Enhancing Code Snippet Retrieval through Natural Language Intentcited by 16
- 2020OptTyper: Probabilistic Type Inference by Optimising Logical and Natural Constraintscited by 14
- 2020CRaDLe: Deep Code Retrieval Based on Semantic Dependency Learningcited by 12
- 2021Static Inference Meets Deep Learning: A Hybrid Type Inference Approach for Pythoncited by 12
- 2016Learning a Static Analyzer from Datacited by 7
- 2021A Neural Question Answering System for Basic Questions about Subroutinescited by 5
- 2017Active Learning of Points-To Specificationscited by 2
Built on by
Citing papers per year: 2023: 1; 2024: 2; 2025: 3; 2026: 5.
11 papers.
- 2025SWE-QA: Can Language Models Answer Repository-level Code Questions?cited by 37
- 2024NoFunEval: Funny How Code LMs Falter on Requirements Beyond Functional Correctnesscited by 23
- 2026SWE-QA-Pro: A Representative Benchmark and Scalable Training Recipe for Repository-Level Code Understandingcited by 9
- 2024Leveraging Large Language Models in Code Question Answering: Baselines and Issuescited by 6
- 2023Frustrated with Code Quality Issues? LLMs can Help!cited by 5
- 2025Gistify! Codebase-Level Understanding via Runtime Executioncited by 4
- 2025RefactorCoderQA: Benchmarking LLMs for Multi-Domain Coding Question Solutions in Cloud and Edge Deploymentcited by 2
- 2026LensVLM: Selective Context Expansion for Compressed Visual Representation of Textcited by 2
- 2026Rethinking Code Review in the Age of AI: A Vision for Agentic Code Reviewcited by 1
- 2026DeepRepoQA: Code Repository Question Answering with Deep Agent Explorationcited by 0
- 2026Can LLMs Reason About Runtime Behavior? A Repository-Level Dynamic Benchmarkcited by 0
- 2026Can LLMs Reason About Runtime Behavior? A Repository-Level Dynamic Benchmark23 Sep 2026
- 2026DeepRepoQA: Code Repository Question Answering with Deep Agent Exploration25 Aug 2026
- 2026Rethinking Code Review in the Age of AI: A Vision for Agentic Code Review17 May 2026
- 2026LensVLM: Selective Context Expansion for Compressed Visual Representation of Text7 May 2026
- 2026SWE-QA-Pro: A Representative Benchmark and Scalable Training Recipe for Repository-Level Code Understanding17 Mar 2026
- 2025Gistify! Codebase-Level Understanding via Runtime Execution30 Oct 2025
- 2025SWE-QA: Can Language Models Answer Repository-level Code Questions?18 Sep 2025
- 2025RefactorCoderQA: Benchmarking LLMs for Multi-Domain Coding Question Solutions in Cloud and Edge Deployment12 Sep 2025
- 2024Leveraging Large Language Models in Code Question Answering: Baselines and Issues5 Nov 2024
- 2024NoFunEval: Funny How Code LMs Falter on Requirements Beyond Functional Correctness29 Jan 2024
- 2023Frustrated with Code Quality Issues? LLMs can Help!22 Sep 2023
Similar, not cited
Close in wording, no citation either way
- 2026Generating Complex Code Analyzers from Natural Language Questions ↗
- 2025A Code Comprehension Benchmark for Large Language Models for Code
- 2024CRQBench: A Benchmark of Code Reasoning Questions
- 2025Structural Code Search using Natural Language Queries
- 2026SWE-QA: A Dataset and Benchmark for Complex Code Understanding
- 2026CodeEval: A pedagogical approach for targeted evaluation of code-trained Large Language Models
- 2025On Code-Induced Reasoning in LLMs
- 2026Beyond Code Snippets: Benchmarking LLMs on Repository-Level Question Answering