Sample
int-116889d78647-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.626 | 0–1; higher is more readable |
| Dorn | 0.368 | 0–1; higher is more readable |
| Mi | 0.629 | 0–1; higher is more readable |
| LLOC | 35 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 11 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12 | 0–20; mean of three runs |
| BTTF | 0.417 | 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. | 3233.217 | −106.696 |
| Source linesThe number of non-empty source lines. | 93 | +37.2 |
| 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.784 | −7.176 |
Intercept 8.87 + feature contributions = -67.802 (log-odds).
Score = sigmoid(-67.802) = 0.
| Score | 0.626 |
|---|
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. | 94 | −2.292 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 81 | +2.065 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 81 | −1.438 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 92.784 | +0.887 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 95.894 | +0.743 |
| 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. | 95.979 | −0.4 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.115 | −0.176 |
Intercept 0.07 + feature contributions = -0.541 (log-odds).
Score = sigmoid(-0.541) = 0.368.
| Score | 0.629 |
|---|
| Score | 35 |
|---|
Run 1
The code is reasonably structured with clear field declarations and helper methods, but it suffers from poor naming (e.g., 'rem', 'siz', 'con', 'gra', 'nod', 'sou', 'tar'), which obscures intent. The logic in 'con' and 'siz' is somewhat dense and could be flattened or extracted for clarity. Nesting is moderate. Some lines contain multiple logical actions (e.g., boolean expressions with several conditions), reducing action granularity. Reading flow is disrupted by inconsistent variable names and method abbreviations. Overall, while the class organization is acceptable, readability is significantly hampered by naming and inline expression complexity.
Run 2
The code is moderately readable but has several clear issues. Structure is logical but there is a naming collision in the `con` method ('node' parameter shadows outer field) and the method names are non-descriptive abbreviations (`rem`, `siz`, `con`, `gra`, `nod`, `nod2`). This hurts clarity of intent and reading flow. The nested ternary inside `siz` and complex boolean logic in `con` reduce readability though nesting is not deeply problematic overall. Action granularity is mostly one-per-line, but multiple actions and expressions are condensed. Code length is acceptable, but the unnecessary abbreviations and inconsistent parameter naming make it harder to understand than necessary. The equals logic in `con` also seems to have a bug (comparing same variable), which further decreases trust and readability.
Run 3
The code has a clear class purpose and basic structure, but readability is significantly harmed by abbreviated method names ('rem', 'siz', 'con'), vague parameter names ('gra', 'nod', 'edge', 'nod2', 'nod3'), and shadowing of the 'node' field inside 'con'. The logic in 'con' for undirected graphs is convoluted and arguably incorrect (comparing nodeU to nodeV and then using nodeU/nodeV variables confusingly). Nesting is moderate, but the ternary in 'siz' and multi-part boolean conditions hurt clarity. Some parts are concise but at the cost of explicitness. The helper methods 'predecessors' and 'successors' are reasonable, but the overall reading flow and clarity of intent suffer due to poor naming and terse code.
Run 1
Code Structure: Fields, enum, constructor, set operations, and helper methods are logically organized. Nesting: Shallow conditionals and early returns keep complexity manageable. Clarity of intent: Documentation and EdgeType names help, but abbreviated identifiers such as rem, siz, con, gra, and nod obscure meaning; the renamed overrides also conflict with AbstractSet's API. In the undirected branch, a local node shadows the field, and node.equals(node) makes the intended membership check confusing. Code length: Mostly concise, though unnecessary else blocks and repeated graph queries add minor verbosity. Action granularity: Statements generally perform one action per line, with multiline expressions formatted clearly. Reading flow: Consistent formatting and small helpers support natural reading, but ambiguous names and misleading endpoint comparisons interrupt comprehension.
Run 2
Code Structure: Fields, enum, constructor, public methods, and private helpers are logically organized. Nesting: Shallow conditionals keep complexity manageable. Clarity of intent: Documentation and EdgeType clarify the purpose, but abbreviated names such as rem, siz, con, gra, sou, and nod3 obscure meaning. The renamed methods also conflict with their @Override annotations, making the intended API confusing. In the undirected branch, a local node shadows the field and node.equals(node) is tautological, obscuring the intended endpoint check. Code length: Generally concise, though repeated graph checks and unnecessary else branches add minor verbosity. Action granularity: Most statements perform one action; compound return expressions are reasonably formatted but require careful interpretation. Reading flow: Formatting and helper extraction support a natural flow, but inconsistent naming and misleading endpoint logic significantly interrupt comprehension.
Run 3
Code Structure: Fields, enum, constructor, and helper methods are logically organized. Nesting: Shallow conditionals keep complexity manageable. Clarity of intent: Documentation and EdgeType names help, but abbreviated names such as rem, siz, con, gra, and nod obscure meaning; the renamed methods also do not match the stated superclass overrides. In con, a local node shadows the field, and node.equals(node) is tautological, making the intended undirected membership check confusing. Code length: Generally concise, although repeated graph checks and predecessor lookups add minor redundancy. Action granularity: Most lines perform one action; compound return expressions are reasonably formatted. Reading flow: Consistent formatting and early returns support scanning, but ambiguous identifiers and the shadowed variable interrupt comprehension.