Sample
int-bbd66b8ffee0-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.53 | 0–1; higher is more readable |
| Dorn | 0.439 | 0–1; higher is more readable |
| Mi | 0.281 | 0–1; higher is more readable |
| LLOC | 14 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 10 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs |
| BTTF | 0.595 | 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. | 2573.122 | −84.913 |
| Source linesThe number of non-empty source lines. | 79 | +31.6 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 5.175 | −7.762 |
Intercept 8.87 + feature contributions = -52.205 (log-odds).
Score = sigmoid(-52.205) = 0.
| Score | 0.53 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 155.975 | −2.941 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 80 | −1.796 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 156 | +1.713 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 61 | +1.373 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 78.917 | +0.693 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.072 | +0.246 |
Intercept 0.07 + feature contributions = -0.245 (log-odds).
Score = sigmoid(-0.245) = 0.439.
| Score | 0.281 |
|---|
| Score | 14 |
|---|
Run 1
The code is generally readable and structured logically with clear class-level documentation and constructor overloads. However, several issues reduce its readability: method names like 'can', 'dec', 'hin', and parameter names such as 'gso', 'mime', 'mime2', 'element2', 'hin2' are cryptic and inconsistent, obscuring intent. The parameter naming is confusing (e.g., 'gso' for 'gson', 'mime' and 'mime2'), suggesting copy-paste or incomplete renaming. The 'can' method name is ambiguous; a clearer name like 'canDecode' would be better. The code has moderate nesting, mostly flat, and action granularity is fine. The mixed naming conventions and inconsistent parameter names disrupt reading flow and clarity. Overall, while the structure is acceptable, the clarity of intent suffers significantly due to poor naming, lowering the readability score.
Run 2
The code has a clear purpose and generally follows standard Java conventions, but several issues reduce readability. The method names and parameters are heavily abbreviated (e.g., 'can', 'dec', 'gso', 'mime', 'hin') which obscures intent. Inconsistent naming (e.g., 'gso' vs 'gson', 'mime2' through 'mime4') creates confusion. The class overrides methods but uses different parameter names than the parent, making it harder to understand the contract. The constructor parameter 'gso' should be 'gson' to match the field. The canDecode logic is concise but the 'can' override is misleadingly named. Error handling is simple, and the overall structure is acceptable, but the poor naming choices and parameter inconsistencies significantly impact clarity.
Run 3
The code has reasonable structure with a clear class purpose and basic Javadoc, but readability is significantly hurt by poor naming and inconsistent style. Methods like 'can', 'dec', 'dec' (overloaded), and parameters like 'gso', 'mime2', 'buf', 'hin2', 'element2' obscure intent and force readers to guess meaning. The two 'dec' methods with similar names but different signatures create confusion. The try-finally block is flat and action granularity is okay, but the overall reading flow is disrupted by abbreviations and inconsistent parameter naming across methods. Import organization is acceptable. The class would benefit from descriptive method names, consistent parameters, and clearer separation of concerns. Overall, the code is functional but requires extra mental effort to understand, earning a low-middle readability score.
Run 1
Code Structure: Fields, constructors, and decoding methods are logically organized, with helpful class documentation. Nesting: Minimal nesting; the try/finally block is straightforward. Clarity of intent: Gson conversion and buffer cleanup are clear, but abbreviated method names (can, dec) and inconsistent parameter names (gso, mime2, hin2) obscure meaning. Constructor documentation also names parameters differently from the signature. The apparent mismatch between overridden method names and the decoder API creates additional confusion. Code length: Compact implementation with mostly useful documentation, though long method signatures reduce scanability. Action granularity: Statements generally perform one action per line; the nested reader construction and parsing expression remain manageable. Reading flow: Conventional ordering and consistent indentation support natural reading, but compressed imports, long lines, and inconsistent naming interrupt the flow.
Run 2
Code Structure: Fields, constructors, and decoding methods are logically organized, though abbreviated method names conflict with the apparent overridden API. Nesting: Minimal; the simple try/finally is easy to follow. Clarity of intent: Class documentation and Gson calls explain the purpose, but names such as can, dec, gso, hin2, and mime4 obscure roles. Constructor documentation also names parameters differently from the signature. Code length: Compact and largely free of unnecessary logic, although long method signatures reduce scanability. Action granularity: Statements generally perform one action each; the nested reader creation is still understandable. Reading flow: Conventional class organization and consistent indentation support natural reading, but inconsistent naming and densely packed imports interrupt it.
Run 3
Code Structure: Well organized into constants, a dependency field, constructors, and decoding methods, with resource cleanup clearly separated. Nesting: Minimal; only a straightforward try/finally block. Clarity of intent: Class documentation and Gson calls explain the purpose, but abbreviated method names (can, dec) and inconsistent parameter names (gso, mime2, hin2) reduce clarity. Constructor documentation also references names that differ from the actual parameters, and renamed override methods obscure their relationship to the superclass API. Code length: Concise, with little unnecessary implementation code, though long signatures are harder to scan. Action granularity: Statements generally perform one action per line; the nested reader construction and parsing expression remains manageable. Reading flow: Logical top-to-bottom progression and consistent indentation help, but dense imports, unwrapped signatures, and arbitrary naming interrupt otherwise natural reading.