Invokable Control Element with Excessive Volume of Commented-out Code

Incomplete Base
Structure: Simple
Description

This weakness occurs when a callable function, method, or procedure contains a large amount of inactive, commented-out code within its implementation body.

Extended Description

Excessive commented-out code clutters the active logic, making the codebase harder to read, understand, and maintain. This maintenance burden indirectly harms security by slowing down code reviews and making it more difficult to spot genuine vulnerabilities or logic flaws during development and auditing. While the exact threshold for "excessive" can vary by project, the CISQ standard suggests a default limit of 2% commented code within an invokable element. Surpassing this volume creates noise that can lead to mistakes, such as accidentally reactivating dead code or missing critical security flaws in the active code paths.

Common Consequences 1
Scope: Other

Impact: Reduce Maintainability

References 1
Automated Source Code Maintainability Measure (ASCMM)
Object Management Group (OMG)
01-2016
ID: REF-960
Taxonomy Mapping
  • OMG ASCMM