# Does Confusing Code Confuse LLMs? A Pilot Study on C++

DevFeed: [Does Confusing Code Confuse LLMs? A Pilot Study on C++](<https://devfeed.tech/articles/does-confusing-code-confuse-llms-a-pilot-study-on-c-131719.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.15575>)

Author: Tim van de Wetering, Lola Solovyeva, Fernando Castor

Published: 2026-11-13T05:00:00Z

Content type: news

Language: en

Sources: [arXiv: Software Engineering](<https://devfeed.tech/sources/arxiv-software-engineering.md>)

Topics: [Large Language Model](<https://devfeed.tech/topics/llm.md>), [AI-assisted coding](<https://devfeed.tech/topics/ai-assisted-coding.md>), [Code](<https://devfeed.tech/topics/code.md>), [llm-reasoning](<https://devfeed.tech/topics/llm-reasoning.md>)

Tags: [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [chatgpt](<https://devfeed.tech/tags/chatgpt.md>), [code](<https://devfeed.tech/tags/code.md>), [copilot](<https://devfeed.tech/tags/copilot.md>), [cs-se](<https://devfeed.tech/tags/cs-se.md>), [github](<https://devfeed.tech/tags/github.md>), [github-copilot](<https://devfeed.tech/tags/github-copilot.md>), [impact](<https://devfeed.tech/tags/impact.md>), [language](<https://devfeed.tech/tags/language.md>), [language-models](<https://devfeed.tech/tags/language-models.md>), [large-language-models](<https://devfeed.tech/tags/large-language-models.md>), [large-language-models-llms](<https://devfeed.tech/tags/large-language-models-llms.md>), [llms](<https://devfeed.tech/tags/llms.md>), [maintenance](<https://devfeed.tech/tags/maintenance.md>), [matching](<https://devfeed.tech/tags/matching.md>), [pattern](<https://devfeed.tech/tags/pattern.md>), [pattern-matching](<https://devfeed.tech/tags/pattern-matching.md>), [patterns](<https://devfeed.tech/tags/patterns.md>), [performance](<https://devfeed.tech/tags/performance.md>), [pilot](<https://devfeed.tech/tags/pilot.md>), [study](<https://devfeed.tech/tags/study.md>)

## AI overview

A pilot study using ChatGPT and GitHub Copilot on C++ code from three production libraries finds that the effect of human-studied "atoms of confusion" depends on the maintenance task. The study tests atom injection and removal, output prediction, and code explanation. Patterns requiring reasoning about surrounding code are more resistant to transformation, while localized syntactic patterns are handled reliably. Both models remove these patterns more reliably than they inject them; the authors suggest removal may rely on pattern matching, whereas injection requires deeper comprehension. These are preliminary findings from a pilot study.

## Source excerpt

arXiv:2611.15575v1 Announce Type: new Abstract: Large language models (LLMs) are increasingly deployed for software maintenance tasks that depend heavily on code comprehension. While atoms of confusion, minimal code patterns empirically shown to impair human program comprehension, are well studied, it remains unclear whether these same patterns affect LLMs, and whether their impact varies across maintenance tasks. We present a pilot study evaluating the impact of atoms of confusion on LLM performance on C++ code drawn from three production libraries, using ChatGPT and GitHub Copilot on three software development tasks: atom injection and removal, output prediction, and code explanation. Our results reveal three preliminary findings: (i) the impact of atoms on LLMs is strongly task-dependent; (ii) atoms requiring reasoning about surrounding code are the most resistant to transformation, while localized syntactic atoms are handled reliably; and (iii) LLMs remove atoms of confusion more reliably than they inject them, suggesting that removal succeeds through pattern matching while injection requires deeper comprehension.