Sample
int-4813a59a93be-I10
Remove about 40% of line-break groups while retaining structure
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.172 | 0–1; higher is more readable |
| Scalabrino | 0.817 | 0–1; higher is more readable |
| Dorn | 0.538 | 0–1; higher is more readable |
| Mi | 0.046 | 0–1; higher is more readable |
| LLOC | 5 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 8.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15.33 | 0–20; mean of three runs |
| BTTF | 0.705 | 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. | 724.925 | −23.923 |
| Source linesThe number of non-empty source lines. | 51 | +20.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.612 | −6.917 |
Intercept 8.87 + feature contributions = -1.57 (log-odds).
Score = sigmoid(-1.57) = 0.172.
| Score | 0.817 |
|---|
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. | 123.981 | −1.586 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 119.25 | +1.12 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 52 | −0.805 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.021 | +0.733 |
| 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. | 50.856 | +0.301 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 19 | −0.08 |
Intercept 0.07 + feature contributions = 0.151 (log-odds).
Score = sigmoid(0.151) = 0.538.
| Score | 0.046 |
|---|
| Score | 5 |
|---|
Run 1
The code is a Java interface with clear documentation, but it suffers from significant formatting issues that hurt readability. The package and import statements are crammed onto single lines, making them hard to scan. Multiple declarations and annotations are placed on the same line (e.g., multiple imports, @Override annotations inline with method signatures). This violates the one-action-per-line principle and creates a cluttered appearance. While the interface structure itself is logical with descriptive Javadoc comments explaining intent well, the dense formatting obscures it. Nesting is minimal which helps, and method names are reasonably descriptive, but code length is inflated by poor line organization rather than unnecessary logic. The reading flow is disrupted by having to parse multiple logical elements packed into single lines. The documentation within Javadoc is clear, but the structural formatting makes the overall code feel disorganized and difficult to review efficiently. With proper line breaks and reformatting, this would be quite readable, but as presented it falls below average.
Run 2
The code's readability is significantly hampered by formatting issues. Multiple statements are packed onto single lines, particularly in the import section where 'import' statements share lines with code, making the structure look tangled. Javadoc comments are malformed with incorrect line breaks, and annotations like '@Override' are placed on the same line as comments or other code. The action granularity suffers because multiple actions occur per line (e.g., 'default ConfigDef config() { return new ConfigDef(); }'). Nesting is minimal, which is good, but the clarity of intent is reduced by the compressed layout. The reading flow is disrupted by inconsistent spacing and line breaks. While the underlying interface is relatively simple and concise, the poor formatting makes it harder to scan and understand quickly.
Run 3
The code suffers from severe readability issues. The import statements are collapsed onto a single line with multiple imports, violating the one-import-per-line convention. The class-level Javadoc is cramped with imports and annotations, lacking proper spacing and line breaks. There are inconsistencies in bracket placement and indentation, particularly in the default methods where opening braces appear on the same line and closing braces on new lines without proper alignment. The Javadoc for the validate method contains a line break mid-sentence that disrupts reading flow. While the interface itself has clear purpose and logical method separation, the formatting makes it difficult to parse. The action granularity is generally acceptable within method bodies, but the overall structure is tangled due to poor whitespace management. The code would benefit significantly from automated formatting and proper import organization.
Run 1
Code Structure: The interface is logically organized, with validation, configuration, and version methods clearly separated, but compressed imports and inconsistent formatting weaken presentation. Nesting: Minimal nesting makes the code easy to follow. Clarity of intent: Descriptive names and thorough Javadoc explain the policy's purpose and method contracts. Code length: The implementation is concise; documentation is lengthy but relevant. Action granularity: Several imports and declarations share lines, and inline method bodies reduce visual separation. Reading flow: Methods follow a natural sequence, but annotations attached to comment endings, uneven whitespace, and the inconsistently formatted version method interrupt scanning.
Run 2
Code Structure: The interface is logically organized around validation, configuration, and version methods, but compressed imports and inconsistent formatting weaken presentation. Nesting: Minimal nesting makes the code easy to follow. Clarity of intent: Descriptive names and detailed Javadoc clearly explain the policy contract and expected behavior. Code length: The implementation is concise; documentation is extensive but mostly useful. Action granularity: Several imports share lines, and method declarations and return statements are compressed together, reducing scanability. Reading flow: The conceptual progression is natural, but annotations attached to comment endings, excess blank lines, and inconsistent method-body formatting interrupt the visual flow.
Run 3
Code Structure: The interface is logically organized, with related methods and useful documentation, though package/import declarations are compressed together. Nesting: Minimal nesting makes the code easy to follow. Clarity of intent: Descriptive names and detailed Javadoc clearly explain the policy, validation contract, and defaults. Code length: The implementation is concise; documentation is lengthy but mostly relevant. Action granularity: Several declarations share lines, and inline method bodies reduce visual separation, although each method performs only one simple action. Reading flow: The progression from interface purpose to validation, configuration, and version is natural, but inconsistent brace placement, annotations attached to comment endings, extra blank lines, and uneven Javadoc formatting interrupt scanning.