Sample
int-92680f00eaef-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.472 | 0–1; higher is more readable |
| Dorn | 0.019 | 0–1; higher is more readable |
| Mi | 0.077 | 0–1; higher is more readable |
| LLOC | 6 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 18.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.446 | 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 |
| Source linesThe number of non-empty source lines. | 19 | +7.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. | 4.799 | −7.198 |
Intercept 8.87 + feature contributions = -24.342 (log-odds).
Score = sigmoid(-24.342) = 0.
| Score | 0.472 |
|---|
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 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 19 | +0.364 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 18.92 | −0.145 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 19 | −0.08 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.099 | −0.017 |
Intercept 0.07 + feature contributions = -3.92 (log-odds).
Score = sigmoid(-3.92) = 0.019.
| Score | 0.077 |
|---|
| Score | 6 |
|---|
Run 1
The code is highly readable. It is a short utility class with a clear purpose: creating an Authorizer and checking for a cluster resource. The structure is logical, grouping related imports and methods. Nesting is nonexistent, keeping the flow flat and easy to follow. Each method performs a single, well-defined action with a clear name, resulting in one action per line. The parameter list in `createAuthorizer` is a bit long but acceptable for a factory-style method. The reading flow is natural: instantiate, configure, wrap, return. Overall, this is an example of clean, concise, and maintainable code.
Run 2
The code is exceptionally readable. It has a clear, logical structure with a single utility class containing two concise methods. Nesting is completely flat. Intent is obvious from method names and parameters. Code length is minimal, avoiding unnecessary complexity. Each method performs one focused action (creation/configuration/wrapping and resource name check). Reading flow is natural, with imports organized and methods ordered logically.
Run 3
The code is highly readable. It has a clear, logical structure with a single utility class containing two focused methods. Nesting is flat with no conditional or loop blocks. Intent is immediately apparent: create an authorizer and check for cluster resource. The code is concise, avoiding unnecessary boilerplate. Each method performs one clear action per line, maintaining good action granularity. Reading flow is natural, with the more complex creation method first and the simple check method second. Potential minor improvements include breaking the long method signature across multiple lines and adding brief Javadoc, but these are style preferences rather than readability issues. Overall, the naming, imports, and method organization support excellent comprehension.
Run 1
Code Structure: A small utility class cleanly separates authorizer creation from resource identification. Nesting: Both methods are flat, with no nested control flow. Clarity of intent: Descriptive method and variable names make the purpose clear, though the literal "role" and plugin-wrapping behavior require some API context. Code length: Concise, with no redundant logic; the long createAuthorizer signature would benefit from wrapping. Action granularity: Each statement performs one distinct operation. Reading flow: Authorizer creation, configuration, and wrapping follow a natural sequence. Minor formatting improvements, such as separating the package declaration and import groups with blank lines, would improve scanning.
Run 2
Code Structure: Two focused utility methods provide clear, logical organization. Nesting: Both methods are flat, with no nested control flow. Clarity of intent: Descriptive method names and straightforward calls make authorizer creation and cluster-resource checking easy to understand, though generic parameters such as key and role provide limited context. Code length: The implementation is concise without unnecessary logic, but the long createAuthorizer signature would benefit from wrapping. Action granularity: Each statement performs one distinct action. Reading flow: Instantiation, configuration, and wrapping follow a natural sequence; spacing between the package declaration, imports, and class would improve visual readability.
Run 3
Code Structure: Two focused utility methods provide clear logical organization. Nesting: No nested control flow makes both methods easy to scan. Clarity of intent: Descriptive method names and straightforward calls clearly convey authorizer creation and cluster-resource identification, though generic parameters such as key and role lack context. Code length: The implementation is concise without unnecessary logic, but the long createAuthorizer signature would benefit from wrapping. Action granularity: Each statement performs one distinct action. Reading flow: Instantiation, configuration, and wrapping follow a natural sequence; import grouping and a blank line after the package declaration would improve visual organization.