Sample
int-d6c318213c1e-I08
Select one of ten high-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.389 | 0–1; higher is more readable |
| Scalabrino | 0.874 | 0–1; higher is more readable |
| Dorn | 0.065 | 0–1; higher is more readable |
| Mi | 0.039 | 0–1; higher is more readable |
| LLOC | 28 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.268 | 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. | 2226.706 | −73.481 |
| Source linesThe number of non-empty source lines. | 177 | +70.8 |
| 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.427 | −6.64 |
Intercept 8.87 + feature contributions = -0.451 (log-odds).
Score = sigmoid(-0.451) = 0.389.
| Score | 0.874 |
|---|
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. | 177 | −5.231 |
| 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. | 148.989 | −2.645 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 94 | +2.514 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 176.94 | +2.063 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 94 | −1.736 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 148.966 | +1.599 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.024 | +0.705 |
Intercept 0.07 + feature contributions = -2.661 (log-odds).
Score = sigmoid(-2.661) = 0.065.
| Score | 0.039 |
|---|
| Score | 28 |
|---|
Run 1
The code is generally well-structured and readable, with clear interface method declarations and comprehensive Javadoc. However, a significant flaw is a stray, improperly placed code block inside the default `claimWritePrivileges()` method, which is unrelated to the method's purpose and degrades readability. The interface's organization and logical flow are strong, with methods grouped logically and one action per line. Nesting is minimal and appropriate. Most methods have clear intent, but the misplaced block creates confusion and violates clarity. The code length is appropriate, though some Javadocs are verbose. Overall, it is highly readable except for the obvious extraneous block that should be removed.
Run 2
The code is a well-structured Java interface with clear, concise method signatures and thorough Javadoc comments. It follows a logical organization, grouping related operations (connector config, tasks, target state, etc.) and uses consistent naming conventions. Nesting is minimal, mostly limited to the nested UpdateListener interface and a minor malformed block inside claimWritePrivileges that should be removed. Each method has a single clear purpose, and the use of default methods and imports keeps the code clean. The reading flow is natural, aided by descriptive parameter names and comprehensive documentation. The only detractors are the accidental nested block in claimWritePrivileges and the slightly verbose Javadoc, but these do not significantly reduce readability.
Run 3
The code is highly readable, with a clear interface definition and consistent Javadoc documentation for each method. The structure is logical, grouping related methods like configuration management and listener notifications. Nesting is minimal, and each method declaration is concise, with one action per line. The reading flow is natural, moving from lifecycle methods to configuration operations and then to listener callbacks. However, there is a notable flaw: the `claimWritePrivileges()` method contains a misplaced code block that appears unrelated to its purpose (counting even numbers). This dead code reduces clarity and introduces ambiguity about intent. Without this error, the code would score higher. Overall, the readability is excellent, but the embedded snippet disrupts the otherwise clean structure.
Run 1
Code Structure: The interface logically groups configuration operations and listener callbacks, but unrelated counting logic disrupts claimWritePrivileges(). Nesting: Most declarations are flat; the default method adds an unnecessary block around a loop and conditional. Clarity of intent: Descriptive names and Javadocs explain most operations well, but counting even numbers serves no apparent purpose and conflicts with the documented no-op. Code length: Generally appropriate for a documented API, though the counting block is unnecessary and some comments are lengthy. Action granularity: Statements and declarations are cleanly separated, mostly one per line. Reading flow: Consistent method documentation supports scanning, but malformed indentation in the default method and several long documentation lines interrupt an otherwise natural flow.
Run 2
Code Structure: The interface is logically organized, with related storage operations and a separate listener interface, but claimWritePrivileges contains unrelated counting logic. Nesting: Most declarations are flat; the default method introduces an unnecessary block, loop, and conditional. Clarity of intent: Descriptive method names and Javadoc explain most operations well, but counting even numbers contradicts the documented no-op and has no observable purpose. Code length: Interface declarations are concise; documentation is useful but occasionally verbose, and the counting block is unnecessary. Action granularity: Each declaration or executable statement occupies its own line. Reading flow: Consistent spacing and documentation generally support natural scanning, but the default method's inconsistent indentation and extraneous braces interrupt the flow.
Run 3
Code Structure: The interface and nested listener logically organize storage operations and callbacks, but unrelated counting logic disrupts claimWritePrivileges. Nesting: Most code is flat; that method adds an unnecessary block, loop, and conditional. Clarity of intent: Descriptive method names and Javadoc explain most contracts well, but counting even numbers has no connection to write privileges and conflicts with the documented no-op intent. Code length: Declarations are concise, though some documentation is repetitive and the unused counting logic is unnecessary. Action granularity: Each declaration or statement performs one clear action. Reading flow: Consistent spacing and documentation generally support natural scanning, but the anomalous method body's indentation, extra braces, and irrelevant computation interrupt the flow.