Sample
int-edcec169462b-I03
Replace method, parameter, and local names with length-matched, meaningful but unrelated names
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.787 | 0–1; higher is more readable |
| Dorn | 0.568 | 0–1; higher is more readable |
| Mi | 0.551 | 0–1; higher is more readable |
| LLOC | 31 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 13 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs |
| BTTF | 0.543 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 2551.439 | −84.197 |
| Source linesThe number of non-empty source lines. | 71 | +28.4 |
| 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.856 | −7.283 |
Intercept 8.87 + feature contributions = -54.211 (log-odds).
Score = sigmoid(-54.211) = 0.
| Score | 0.787 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 68 | +1.615 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 72 | −1.513 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 68 | −1.14 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 86.972 | +0.599 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 70.875 | +0.581 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.089 | +0.08 |
| 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. | 86.958 | −0.018 |
Intercept 0.07 + feature contributions = 0.274 (log-odds).
Score = sigmoid(0.274) = 0.568.
| Score | 0.551 |
|---|
| Score | 31 |
|---|
Run 1
The code has a clear structure and purpose, with meaningful comments explaining the cryptographic decoupling of keys. However, readability is significantly hampered by misleading naming conventions: 'age' should be 'key', 'map' should be 'mac', 'order' should be 'input', and 'recentKey' should be 'outputLength'. Variables like 'index', 'checkItem', and 'readKey' obscure the actual intent. There is inconsistent parameter naming ('nextToken' vs 'sharedKey' vs 'recentKey' for output length). The logical structure is reasonable but the naming creates unnecessary cognitive overhead. Nesting is minimal, which is good, and the code is concise. Overall, the code is functional but requires significant mental translation to understand what each component does.
Run 2
The code is structurally well-organized with clear separation of concerns, but readability is severely undermined by deceptive naming. The class structure is logical: constants, initialization, thread-local setup, and utility methods are clearly separated. Nesting is minimal and only occurs in the exception handling, which is appropriate. However, the intent is obscured by nonsensical parameter and variable names. 'age' for a key, 'map' for a Mac instance, 'order' for input data, 'recentKey' for output length, 'readKey' for CID token generation, and 'checkItem' for token verification are all misleading. The action granularity is good with one operation per line, and the reading flow is natural. The code length is appropriate for the functionality. While the encryption logic is sound and the structure solid, the naming conventions make the code difficult to understand at a glance, requiring readers to constantly track what each variable represents despite the comments explaining the cryptographic purpose.
Run 3
The code has good structural organization with clear separation of concerns and a helpful comment explaining the cryptographic rationale for two keys. However, readability is significantly hampered by misleading variable and method names. For example, 'age' is used for a key, 'map' for a Mac instance, 'order' for a ByteBuffer, and 'recentKey' for an integer length. Method names like 'readKey' and 'checkItem' do not convey their actual functions (generating a MAC-based value). The 'emit' method name is vague. While the code is logically flat with low nesting and single-action lines, the intent is obscured by these naming choices. The try-catch block for exception handling is concise but standard. Overall, the code structure is sound, but the confusing naming convention prevents it from being highly readable and maintainable.
Run 1
Code Structure: Logically organized into constants, key initialization, thread-local MAC instances, helpers, and entry points. Nesting: Shallow, with only straightforward initialization, exception handling, and a conditional. Clarity of intent: The algorithm constant and key-separation comment are clear, but names such as age, map, order, recentKey, readKey, and checkItem obscure parameter roles and signing behavior. fetchMessage also does not clearly communicate thread-local initialization. Code length: Compact overall; the two similar thread-local declarations introduce minor duplication. Action granularity: Statements generally perform one action per line. Reading flow: The top-to-bottom organization is natural, but misleading names force readers to inspect implementations to understand inputs, output lengths, and the distinction between CID signing and reset-token generation.
Run 2
Code Structure: Well organized into constants, key initialization, thread-local MAC instances, helpers, and entry points. Nesting: Shallow, with only simple try/catch and conditional blocks. Clarity of intent: The cryptographic separation comment and constant names are helpful, but misleading names such as age, map, order, recentKey, readKey, and checkItem obscure key material, input data, output length, and signing operations. The unusual fetchMessage override also makes thread-local initialization harder to interpret. Code length: Compact overall, although the two thread-local declarations repeat similar logic. Action granularity: Statements generally perform one action per line. Reading flow: Mostly natural and consistent, but understanding the public-facing operations requires tracing through poorly named helpers and parameters.
Run 3
Code Structure: Logically organized into constants, key initialization, thread-local MAC instances, helpers, and entry points. Nesting: Shallow, with only straightforward try/catch and conditional blocks. Clarity of intent: The algorithm constant and key-separation comment are informative, but names such as age, map, order, recentKey, readKey, and checkItem obscure cryptographic operations and parameter roles. The fetchMessage override is unexpected for FastThreadLocal, distracting readers familiar with its API. Code length: Compact overall; the two similar thread-local declarations introduce modest, understandable duplication. Action granularity: Statements generally perform one action per line. Reading flow: Initialization followed by helpers and callers is natural, although inconsistent terminology makes readers repeatedly infer what each value represents.