Sample
int-cd0a87fb1d85-I01
Remove line comments, block comments, and Javadoc
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.622 | 0–1; higher is more readable |
| Dorn | 0.393 | 0–1; higher is more readable |
| Mi | 0.215 | 0–1; higher is more readable |
| LLOC | 44 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 15.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs |
| BTTF | 0.434 | 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. | 4869.167 | −160.682 |
| Source linesThe number of non-empty source lines. | 116 | +46.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.776 | −7.164 |
Intercept 8.87 + feature contributions = -112.577 (log-odds).
Score = sigmoid(-112.577) = 0.
| Score | 0.622 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 116 | +3.275 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 117 | −3.106 |
| 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. | 120.974 | −1.459 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 115.918 | +1.21 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| 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.099 | −0.018 |
Intercept 0.07 + feature contributions = -0.434 (log-odds).
Score = sigmoid(-0.434) = 0.393.
| Score | 0.215 |
|---|
| Score | 44 |
|---|
Run 1
The code demonstrates good structure with clear class hierarchy and well-defined methods. It follows a natural reading flow with methods organized logically. The nesting is minimal, with try-catch blocks being the only notable indentation. Intent is clear throughout; method names accurately describe their purposes and the class is appropriately abstract for number conversion. Code length is reasonable for the functionality provided. Action granularity is good, with most lines containing single operations. The constructor's assert statements are somewhat redundant but don't significantly impact readability. Some minor improvements could include better exception handling structure and more consistent method spacing, but overall the code is highly readable with clear separation of concerns and minimal complexity.
Run 2
The code is generally readable and well-organized. Structure is logical, with a clear class hierarchy and standard converter methods. Nesting is mostly flat; try-catch blocks introduce only one level. Intent is clear from method names and the typeName field. However, there are issues: excessive blank lines (e.g., multiple consecutive empty lines) disrupt visual flow. The constructor uses multiple assert statements for null checks, which is unconventional and less clear than explicit validation. The cast() method with unchecked suppression is somewhat ambiguous. Error handling in fromConnectData has a potential NPE in 'value.getClass()' when value is null. Import section is slightly cluttered. Overall, the code follows a clear pattern but could benefit from cleaner formatting and more idiomatic null handling.
Run 3
The code is generally well-structured with clear class organization, a concise constructor, and straightforward method delegation. Methods are short, focused, and follow a consistent pattern. Nesting is minimal, and exception handling is localized. However, readability is slightly reduced by placeholder methods like `cast()` that rely on unchecked casts, and the `fromConnectData` method has a minor ambiguity due to unchecked cast and exception flow. Overall, the intent is clear, and line granularity is appropriate, but the unchecked cast and redundant wrapper methods slightly lower clarity.
Run 1
Code Structure: Well-organized fields, constructor, configuration, conversion, and cleanup methods; header conversion sensibly delegates to existing methods. Nesting: Shallow, with straightforward try/catch blocks and no complex branching. Clarity of intent: Descriptive names and conventional interfaces make the numeric conversion purpose clear, although the unchecked cast and StringConverterConfig constant require some contextual knowledge. Code length: Methods are concise, but excessive blank lines unnecessarily stretch the class. Action granularity: Each statement performs a focused action; inline conditional expressions remain readable. Reading flow: Mostly natural and consistent, with formatting noise and uneven spacing between methods slightly interrupting scanning.
Run 2
Code Structure: Fields, initialization, configuration, conversion, and cleanup are logically organized into focused methods. Nesting: Control flow is shallow, with simple try/catch blocks and no deeply nested branches. Clarity of intent: Descriptive method and field names make the converter's purpose clear, although the unchecked generic cast and reference to StringConverterConfig in a numeric converter require extra interpretation. Code length: Methods are concise, and header conversion delegates appropriately, but excessive blank lines add unnecessary visual length. Action granularity: Statements generally perform one action per line; compact serialization expressions remain understandable. Reading flow: The lifecycle and conversion methods follow a natural sequence, but inconsistent spacing around imports, fields, and method boundaries interrupts otherwise clean presentation.
Run 3
Code Structure: Fields, construction, configuration, conversion, and cleanup are logically organized into focused methods. Nesting: Minimal nesting, with straightforward try/catch blocks and no complex control flow. Clarity of intent: Descriptive method and field names make the converter's purpose clear; the unchecked generic cast and similarly named configuration variables require some attention. Code length: Implementation is concise, though excessive blank lines add unnecessary visual length. Action granularity: Statements generally perform one action per line; inline serialization and conditional expressions remain manageable. Reading flow: Method ordering and header-method delegation support natural reading, but inconsistent spacing, tightly grouped imports, and a few long lines reduce polish.