Sample
int-4a3b65dacda0-I10
Remove about 40% of line-break groups while retaining structure
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.46 | 0–1; higher is more readable |
| Dorn | 0.017 | 0–1; higher is more readable |
| Mi | 0.004 | 0–1; higher is more readable |
| LLOC | 6 | 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.311 | 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. | 1018.615 | −33.614 |
| 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.794 | −7.191 |
| Source linesThe number of non-empty source lines. | 12 | +4.8 |
Intercept 8.87 + feature contributions = -27.136 (log-odds).
Score = sigmoid(-27.136) = 0.
| Score | 0.46 |
|---|
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. | 174 | −3.705 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 13 | +0.576 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 12 | −0.322 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 11.76 | −0.245 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.099 | −0.019 |
Intercept 0.07 + feature contributions = -4.052 (log-odds).
Score = sigmoid(-4.052) = 0.017.
| Score | 0.004 |
|---|
| Score | 6 |
|---|
Run 1
The code reads as a jumbled mess. All imports are crammed onto a single line, making it difficult to scan dependencies. The class structure is minimal and not broken into logical sections. The createAuthorizer method combines object instantiation, configuration, and wrapping into a very dense sequence with poor line separation. The one-line if-less return in isClusterResource is compact but harms readability. Nesting is minimal, but clarity of intent suffers because parameters like 'key' and 'role' are obscure and the hardcoded "role" string is buried in a long line. Action granularity is low—multiple operations happen per line. Overall, the code feels like a rough draft that was never formatted or reviewed for readability.
Run 2
The code is functional but suffers from several readability issues. The package imports are jumbled on a single line, making it hard to scan dependencies. The createAuthorizer method performs multiple actions in a single line (instantiate, configure, and wrap), reducing clarity. The method signature is long and could benefit from line breaks. While the code is logically structured, the lack of whitespace and inconsistent formatting hurts readability. The isClusterResource method is clear but could be more explicit. Overall, the code works but lacks the clean formatting and clear separation of concerns that would make it highly readable.
Run 3
The code is functional but readability suffers from poor structure and presentation. Multiple imports are compressed onto single lines, making the header harder to scan. The createAuthorizer method has moderate length but combines two distinct actions (instantiation and configuration) on one line before the return, reducing clarity. Nesting is flat, which is good, and intent is mostly clear. However, the parameter list is long, and the hardcoded string "role" is confusing without context. Action granularity is inconsistent: some lines contain multiple statements while others are single-purpose. Reading flow is disrupted by the compressed import block and inline return statement. With minor reformatting—one import per line, separating configure and wrap steps, and clarifying the hardcoded string—readability would improve significantly.
Run 1
Code Structure: The two utility methods are logically separated, but placing the class declaration alongside imports weakens organization. Nesting: There is no nested control flow, making both methods easy to follow. Clarity of intent: Descriptive method names and straightforward operations communicate their purposes clearly. Code length: The implementation is concise without unnecessary logic. Action granularity: Multiple imports share lines, and configuration and return statements occupy the same line, reducing scanability. Reading flow: Execution proceeds naturally within each method, but compressed imports and inconsistent statement layout interrupt the visual flow.
Run 2
Code Structure: Two focused utility methods provide logical organization, but compressed imports and the class declaration weaken visual separation. Nesting: Flat method bodies are easy to follow. Clarity of intent: Method names and straightforward operations clearly communicate authorizer creation and cluster-resource identification, though key and role lack context. Code length: Concise, without unnecessary logic, but long declaration and import lines reduce scanability. Action granularity: Multiple imports share lines, and configure and return share a line, obscuring distinct steps. Reading flow: Execution order is natural, but crowded formatting interrupts smooth reading.
Run 3
Code Structure: Two logically separated utility methods provide straightforward organization, although imports and the class declaration are crowded together. Nesting: No nested control flow, making both methods easy to follow. Clarity of intent: Descriptive method names and simple operations communicate purpose clearly. Code length: Concise, with no unnecessary logic or repetition. Action granularity: Multiple imports share lines, and configuration and return statements occupy the same line, weakening visual separation. Reading flow: Execution proceeds naturally from instantiation to configuration to wrapping, but compressed formatting interrupts scanning. Conventional import formatting and one statement per line would substantially improve readability.