Sample
int-da34fea777ae-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.532 | 0–1; higher is more readable |
| Dorn | 0.235 | 0–1; higher is more readable |
| Mi | 0.406 | 0–1; higher is more readable |
| LLOC | 50 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 8 | 0–20; mean of three runs |
| GPT-6.1 Sol | 11.67 | 0–20; mean of three runs |
| BTTF | 0.379 | 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. | 4747.422 | −156.665 |
| Source linesThe number of non-empty source lines. | 129 | +51.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.061 | −7.592 |
Intercept 8.87 + feature contributions = -103.786 (log-odds).
Score = sigmoid(-103.786) = 0.
| Score | 0.532 |
|---|
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. | 130 | −3.567 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 116 | +3.275 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 116 | −2.241 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 128.798 | +1.391 |
| 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. | 112.992 | −1.121 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 112.969 | +1.018 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.097 | −0.005 |
Intercept 0.07 + feature contributions = -1.179 (log-odds).
Score = sigmoid(-1.179) = 0.235.
| Score | 0.406 |
|---|
| Score | 50 |
|---|
Run 1
The code has logical structure with helper methods and a clear class purpose, but readability is damaged by poor naming and inconsistencies. Method names like 'can', 'can2', 'convert', 'convert2', 'mat', 'con', and variables 'source2', 'target2', 'source3', 'source4' etc. obscure intent, making the reader work hard to understand what each represents. Nesting is low, but action granularity suffers from multi-step conversions packed into single lines. The MapEntry helper adds abstraction but its method 'add' is vague. The code is not overly long, yet the inconsistent naming pattern and abbreviations make the reading flow disjointed. Code structure exists but clarity of intent is severely undermined by ambiguous identifiers.
Run 2
The code has severe readability issues due to obfuscated naming conventions. Method names like mat(), can(), can2(), con(), and convert2() are cryptic and fail to convey intent, making the code ambiguous and difficult to understand without deep investigation. Variable names such as source2, target2, source3, target3, source4, target4, etc., are non-descriptive and create confusion about their roles. This significantly hurts clarity of intent and reading flow. While the code structure is linear and nesting is shallow, the action granularity is partially preserved, and helper methods exist, the overall readability is undermined by poor naming. The Javadoc on the class is helpful, but the obfuscated method and variable names override that benefit. The code length is moderate but the naming makes it feel longer and more complex than necessary.
Run 3
The code structure is logical but severely obfuscated by meaningless variable names like 'source2', 'target3', 'convert2', and 'can2'. Nesting is moderate, but the intent is difficult to discern due to non-descriptive method and variable names. The code length is reasonable but suffers from poor action granularity and reading flow, which feel disjointed due to the naming scheme. The helper methods and inner class are concise, but unnecessary renaming ('addToMap' vs 'add') adds confusion. Overall, the readability is significantly hindered by unclear naming and inconsistent terminology, making it difficult to follow the conversion logic.
Run 1
Code Structure: Logically separates conversion, compatibility checks, and entry storage into methods and a small nested class. Nesting: Shallow loops and conditionals, with early returns keeping complexity manageable. Clarity of intent: Documentation explains the overall purpose, but abbreviated method names and numbered variables obscure key/value roles. The addToMap call does not match the declared add method, further disrupting understanding. Code length: Reasonably compact for its functionality, though similar helpers introduce some repetition. Action granularity: Generally one action per line, with clearly separated assignments and conversions. Reading flow: The main conversion proceeds naturally from validation through transformation to map creation, but opaque identifiers require frequent backtracking to determine what each object represents.
Run 2
Code Structure: Responsibilities are logically separated into conversion, compatibility checks, and an entry helper. Nesting: Shallow loops and early returns keep control flow manageable. Clarity of intent: Documentation explains the purpose, but abbreviated methods and numbered variables obscure key/value and source/target roles. The call to addToMap does not match the helper's add method, and overridden method names appear inconsistent with the interface, undermining comprehension. Code length: Reasonably concise, although similar key/value helpers and intermediate entry storage add some overhead. Action granularity: Most lines perform a single clear operation. Reading flow: The conversion proceeds naturally from validation through element conversion to map creation, but cryptic naming forces repeated backtracking.
Run 3
Code Structure: Logical separation into conversion logic, helper methods, and an entry class supports readability. Nesting: Shallow loops and guard clauses keep control flow manageable. Clarity of intent: Documentation explains the purpose, but abbreviated method names and numbered variables obscure key/value and source/target roles. The call to addToMap does not match the defined add method, creating additional confusion. Code length: Reasonably compact, though similar helper methods and intermediate entry storage add some reading overhead. Action granularity: Most lines perform a single action, making individual operations easy to follow. Reading flow: Conversion proceeds in a sensible order from null handling through conversion to map creation, but readers must repeatedly decode vague identifiers and navigate helpers to understand details.