Back to results

Iowa State University - Thesis & Dissertation

CodeSense: A real-world benchmark and dataset for code semantic reasoning

Abstract

dc:description.abstract

Understanding and reasoning about code semantics is essential for enhancing code LLMs' abilities to solve real-world software engineering (SE) tasks. Although several code reasoning benchmarks exist, most rely on synthetic datasets or educational coding problems and focus on coarse-grained reasoning tasks such as input/output prediction, limiting their effectiveness in evaluating LLMs in practical SE contexts. To bridge this gap, we propose CodeSense, the first benchmark that makes available a spectrum of fine-grained code reasoning tasks concerned with the software engineering of real-world code. We collected Python, C and Java software projects from real-world repositories. We executed tests from these repositories, collected their execution traces, and constructed a ground truth dataset for fine-grained semantic reasoning tasks. We then performed comprehensive evaluations on state-of-the-art LLMs. Our results show a clear performance gap for the models to handle fine-grained reasoning tasks. Although prompting techniques such as chain-of-thought and in-context learning helped, the lack of code semantics in LLMs fundamentally limits models' capabilities of code reasoning. Besides dataset, benchmark and evaluation, our work produced an execution tracing framework and tool set that make it easy to collect ground truth for fine-grained SE reasoning tasks, offering a strong basis for future benchmark construction and model post-training. Our code and data are located at \url{https://codesense-bench.github.io/}.

Degree

thesis:*
Name thesis:degree_name
Master of Science
Level thesis:degree_level
thesis
Discipline thesis:degree_discipline
Computer science
Department dc:contributor.department
Department of Computer Science
Grantor
Iowa State University - Thesis & Dissertation
Year dc:date.issued
2026

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Roy, Monoshi, Kumar
Advisor dc:contributor.advisor
  • Le, Wei

Subjects

dc:subject × 1

Rights

Language dc:language.iso
en_US

Identifiers

dc:identifier.*

Chain of custody

source
Harvested from
Iowa State University
Base URL
dr.lib.iastate.edu/server/oai/request
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
citation

Roy, Monoshi, Kumar. CodeSense: A real-world benchmark and dataset for code semantic reasoning. thesis thesis, Iowa State University - Thesis & Dissertation, 2026. https://doi.org/10.31274/td-20260804-85