The pattern depends on a specific production dynamic in security research. A researcher working through an exploit chain writes code that does the full thing first, because writing the defanged version from scratch is harder than writing the full version and then removing parts. The full version is tested, works, confirms the hypothesis. Then the researcher prepares the artifact for publication. The responsible move is to remove the weaponizing parts. The fast move is to comment them out.
Commented-out code is a version of removal that is operationally the same as removal (the runtime never sees it) and editorially different (the capability is still present in the text). The researcher typically tells themselves "this is fine, nobody reads comments, and it makes the history clear to maintainers." Attackers read the comments. Other researchers read the comments. The comments persist across forks, across archive mirrors, across eventual rewrites. The capability stays in the artifact as information even when removed from execution.
The pattern is not specifically about malice. Researchers commenting out stage-two code are often trying to do the right thing while preserving the technical completeness of their work. The defender's exposure is independent of intent. The commented code tells the defender what the technique can do at full capability. That is the threat model defenders need, and it is the threat model attackers already have, and it is hiding in plain sight.
Exhibits
BlueHammer: What the Researcher Commented Out. The PoC repository included extensive commented-out sections that, read against the live code, mapped the full weaponizer. The live code demonstrated the hardware effect at a research-grade level. The commented code filled in the missing steps: the targeting logic, the timing refinement, the cleanup stage, the conditional that distinguishes "this is a test" from "this is a real run." Read as a single document, the live code plus the commented code is the complete attack. Read as a publication artifact (live only), it is a responsible demonstration. The post walks through specific commented sections and names what they were for. The capability was always there.