Sample
int-a7d6c932cfb0-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.654 | 0–1; higher is more readable |
| Dorn | 0.716 | 0–1; higher is more readable |
| Mi | 0.562 | 0–1; higher is more readable |
| LLOC | 16 | 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.45 | 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. | 1387.328 | −45.782 |
| Source linesThe number of non-empty source lines. | 45 | +18 |
| 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.817 | −7.225 |
Intercept 8.87 + feature contributions = -26.137 (log-odds).
Score = sigmoid(-26.137) = 0.
| Score | 0.654 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 100 | +0.809 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 46 | −0.592 |
| 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. | 99.978 | −0.569 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 37 | +0.543 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 44.762 | +0.216 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.092 | +0.05 |
Intercept 0.07 + feature contributions = 0.924 (log-odds).
Score = sigmoid(0.924) = 0.716.
| Score | 0.562 |
|---|
| Score | 16 |
|---|
Run 1
The code has clear structure with appropriate imports, documentation, and a private constructor for a utility class. However, it suffers from confusing naming conventions that hurt readability. Parameters like 'finalValue' and 'finalKey' don't reflect their actual roles (they're actually comparator and iterable respectively), while local variables like 'activeCache' and 'buildToken' suggest caching or tokenization rather than comparator extraction. This creates a disconnect between intent and implementation. The method name 'validateSession' is misleading for what actually checks sorted collection compatibility. Nesting is acceptable with only one level of conditional logic, and action granularity is reasonable. Type checking logic (instanceof checks) could be clearer through method extraction or better naming. Overall, the code structure is solid but the obfuscated naming pattern significantly reduces clarity and maintainability.
Run 2
The code is reasonably readable but has several clarity issues. The class structure is logical, and methods are short with minimal nesting. However, the naming is confusing and obscures intent: 'validateSession', 'buildToken', 'finalValue', 'finalKey', 'activeCache', 'offset', and 'nextIndex' don't reflect their actual roles as comparator and iterable. This makes the purpose ambiguous despite the Javadoc. The first method has shallow nesting and one action per line mostly, but the conditional chain checking types could be clearer with early returns. The second method is concise but relies on a comment to explain null handling. The mixing of misleading parameter names with generic types increases cognitive load. Overall, the code is formatted cleanly but fails to be self-documenting because of poor naming choices.
Run 3
The code is logically organized with clear method separation and documentation, but it suffers from confusing naming. Names like `validateSession`, `finalKey`, `finalValue`, `activeCache`, `buildToken`, and `nextIndex` do not reflect their actual purpose, which obscures intent. The method logic is simple and nesting is minimal, aiding readability, but the misleading identifiers undermine clarity. The code is concise and avoids unnecessary length, with one action per line in most cases. However, the parameter names are poor, especially in `validateSession`, where `finalValue` and `finalKey` suggest unrelated concepts. Overall, the structure is reasonable, but the naming significantly reduces readability.
Run 1
Code Structure: Two small, focused methods and a private constructor provide clear organization. Nesting: Shallow conditionals and an early return keep complexity low. Clarity of intent: The main weakness is misleading naming: validateSession, buildToken, finalValue, finalKey, activeCache, nextIndex, and offset obscure comparator-related operations. Documentation explains the actual purpose, but references parameter names that do not match the signature. Code length: Concise, with no unnecessary logic. Action granularity: Statements generally perform one action per line; casts and method calls remain manageable. Reading flow: Null checks, collection-type detection, and comparator comparison follow a natural sequence, while the helper cleanly handles natural ordering. Import spacing could improve visual separation.
Run 2
Code Structure: Well organized into two focused utility methods, with validation before comparator selection. Nesting: Shallow conditionals and an early return keep complexity low. Clarity of intent: Documentation explains the functionality, but misleading names such as validateSession, buildToken, finalValue, finalKey, activeCache, nextIndex, and offset obscure the sorted-collection purpose. Code length: Concise, with no substantial redundancy. Action granularity: Each statement performs a single clear operation. Reading flow: The control flow is natural, and the null-comparator comment clarifies natural ordering; however, unrelated identifiers conflict with the documentation and require readers to mentally translate their roles.
Run 3
Code Structure: The utility class is logically organized, with a private constructor and two focused methods. Nesting: Shallow conditionals and an early return keep control flow simple. Clarity of intent: Documentation explains the actual behavior, but misleading names such as validateSession, buildToken, finalValue, finalKey, activeCache, nextIndex, and offset obscure comparator-related operations and conflict with the documented purpose. Code length: The implementation is concise without unnecessary repetition. Action granularity: Statements generally perform one action per line; casts and comparator calls remain manageable. Reading flow: Null checks, collection-type detection, and comparator comparison follow a natural sequence, although readers must mentally translate the unrelated identifiers. The natural-order fallback comment usefully explains the null comparator case.