Sufficient context needed to decide if a code unit is buggy

Determine the amount of program context that is sufficient to decide whether a given code unit is buggy in bug detection research.

Background

The paper references open problems in bug detection regarding the role of context in deciding whether code is buggy. This relates to the broader issue that function-level classification often lacks the necessary calling or usage context to make a definitive judgment.

The authors connect their findings—where the agent uses targeted searches to gather relevant code snippets—to these outstanding questions about the context required for accurate bug detection.

References

\citet{risse_2025_topscorewrongexam} raised two open questions in bug detection research: (i) what amount of context is sufficient to decide whether a given code unit is buggy, and (ii) how should this context be collected?

How and Why Agents Can Identify Bug-Introducing Commits  (2603.29378 - Risse et al., 31 Mar 2026) in Discussion, Subsection Bug Detection