Robustness and Reasoning Fidelity of Large Language Models in Long-Context Code Question Answering

Kishan Maharaj, Nandakishore Menon, Ashita Saxena, Srikanth Tamilselvam
2/19/2026
cs.SEcs.AI

No confident code implementation found for this paper. 4 possible matches can be shown below.

Abstract

Large language models (LLMs) increasingly assist software engineering tasks that require reasoning over long code contexts, yet their robustness under varying input conditions remains unclear. We conduct a systematic study of long-context code question answering using controlled ablations that test sensitivity to answer format, distractors, and context scale. Extending LongCodeBench Python dataset with new COBOL and Java question-answer sets, we evaluate state-of-the-art models under three settings: (i) shuffled multiple-choice options, (ii) open-ended questions and (iii) needle-in-a-haystack contexts containing relevant and adversarially irrelevant information. Results show substantial performance drops in both shuffled multiple-choice options and open-ended questions, and brittle behavior in the presence of irrelevant cues. Our findings highlight limitations of current long-context evaluations and provide a broader benchmark for assessing code reasoning in both legacy and modern systems.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 4 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{maharaj2026robustness,
  title  = {Robustness and Reasoning Fidelity of Large Language Models in Long-Context Code Question Answering},
  author = {Kishan Maharaj and Nandakishore Menon and Ashita Saxena and Srikanth Tamilselvam},
  year   = {2026},
  eprint = {2602.17183},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.17183v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2602.17183.svg)](https://codeofpaper.com/paper/2602.17183)

Discussion