Sample
int-9fbd8e3d05ed-I03
Replace method, parameter, and local names with length-matched, meaningful but unrelated names
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.995 | 0–1; higher is more readable |
| Scalabrino | 0.64 | 0–1; higher is more readable |
| Dorn | 0.706 | 0–1; higher is more readable |
| Mi | 0.62 | 0–1; higher is more readable |
| LLOC | 5 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 13.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12.33 | 0–20; mean of three runs |
| BTTF | 0.679 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 59 | +23.6 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 609.596 | −20.117 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 4.689 | −7.033 |
Intercept 8.87 + feature contributions = 5.32 (log-odds).
Score = sigmoid(5.32) = 0.995.
| Score | 0.64 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 57 | −0.982 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 100.95 | +0.824 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.024 | +0.708 |
| Identifier layout (horizontal)How rapidly the visual pattern of identifier characters changes from left to right. It measures spatial frequency, not the meaning of the names. | 100.967 | −0.611 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 58.892 | +0.413 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 23 | +0.058 |
Intercept 0.07 + feature contributions = 0.878 (log-odds).
Score = sigmoid(0.878) = 0.706.
| Score | 0.62 |
|---|
| Score | 5 |
|---|
Run 1
The code is highly readable with clear structure, flat nesting, and explicit intent. The interface is well-organized with logical method groupings, and Javadoc provides comprehensive context for each method's purpose and parameters. Action granularity is excellent—each method performs one conceptual operation. However, a significant clarity issue exists: the parameter names (primaryUser, region, currentNode, amount, cachedScore, validateBalance, validateSession, validateMessage) appear unrelated to the caching domain and are likely obfuscated placeholders. This obscures intent and contradicts the well-documented purpose of caching operations. The code is concise and follows natural reading flow, but the mismatch between documentation and actual parameter names reduces readability. If the parameter names were restored to cache-related terms, this would be a 19-20.
Run 2
The code is well-structured as a Spring interface with clear Javadoc, logical organization, and proper use of annotations like @Nullable. Nesting is minimal and action granularity is good—each method performs one conceptual action. However, the naming is inconsistent and misleading: `validateBalance`, `validateSession`, and `validateMessage` do not reflect cache operation semantics, reducing clarity of intent. Reading flow is natural due to documentation and method ordering, but the parameter names (`primaryUser`, `region`, `amount`, `cachedScore`) further obscure purpose. The code is concise and not overly long, but the mismatch between actual functionality and naming makes it harder to understand than necessary.
Run 3
This code is structurally clean (a simple interface with defaults), but readability is severely harmed by misleading naming. The class is documented as CacheOperationSource, yet its methods are named validateBalance, validateSession, and validateMessage — jargon that suggests financial or session logic, not cache operations. Parameter names like primaryUser, region, currentNode, amount, and cachedScore further obscure intent. The Javadoc refers to getCacheOperations and hasCacheOperations, which don’t exist in the code. Length and nesting are fine; action granularity and reading flow are acceptable. However, clarity of intent is essentially broken: a reader cannot reason about what the code does without ignoring names and reading only signatures/docs. This is a case of structural readability undermined by semantic misalignment.
Run 1
Code Structure: The interface is logically organized, with imports followed by three documented methods. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The main weakness is misleading names such as validateBalance, validateSession, and validateMessage, which do not describe cache introspection. Parameter names likewise obscure their roles, and Javadoc parameter names and method references do not match the actual declarations. Code length: Implementation is concise, although extensive documentation dominates the small interface. Action granularity: Each implementation performs one simple action per line. Reading flow: Formatting and method ordering are natural, but contradictions between documentation and identifiers interrupt comprehension and undermine trust in the API.
Run 2
Code Structure: The interface is logically organized, with imports, documentation, and three related method declarations. Nesting: Minimal nesting makes it easy to scan. Clarity of intent: Severely weakened by misleading names such as validateBalance, validateSession, and validateMessage, which do not describe cache-operation discovery. Parameter names such as primaryUser, region, and cachedScore also obscure their actual roles. Javadoc describes the intended behavior, but its parameter names and method references do not match the declarations, creating confusion. Code length: Implementation is concise; documentation is somewhat lengthy but mostly useful. Action granularity: Each implementation contains a single, straightforward return statement. Reading flow: The layout and method progression are natural, but discrepancies between documentation and identifiers repeatedly interrupt understanding.
Run 3
Code Structure: The interface is logically organized, with imports, documentation, and three related declarations. Nesting: Minimal nesting makes the implementation easy to scan. Clarity of intent: Severely weakened by misleading names such as validateBalance, validateSession, and validateMessage, which do not describe cache operations; parameter names are similarly unrelated to their roles. Javadoc parameter names and method references do not match the actual declarations, further confusing the contract. Code length: Implementations are concise, although extensive documentation adds length without reliably clarifying the renamed API. Action granularity: Each implementation contains a single, straightforward return statement. Reading flow: Conventional Java layout and method ordering support natural reading, but contradictions between documentation and identifiers repeatedly interrupt understanding.