Sample
int-3be35035eb26-I08
Select one of ten high-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.022 | 0–1; higher is more readable |
| Scalabrino | 0.749 | 0–1; higher is more readable |
| Dorn | 0.388 | 0–1; higher is more readable |
| Mi | 0.116 | 0–1; higher is more readable |
| LLOC | 12 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 6.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12.33 | 0–20; mean of three runs |
| BTTF | 0.463 | 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. | 1020.756 | −33.685 |
| Source linesThe number of non-empty source lines. | 70 | +28 |
| 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.651 | −6.977 |
Intercept 8.87 + feature contributions = -3.792 (log-odds).
Score = sigmoid(-3.792) = 0.022.
| Score | 0.749 |
|---|
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. | 124 | −1.587 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 71 | −1.478 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 122.254 | +1.168 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.027 | +0.68 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 38 | +0.577 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 69.88 | +0.567 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 38 | −0.451 |
Intercept 0.07 + feature contributions = -0.454 (log-odds).
Score = sigmoid(-0.454) = 0.388.
| Score | 0.116 |
|---|
| Score | 12 |
|---|
Run 1
The code is a Kafka Connect policy interface. While the Javadocs and interface structure are reasonably clear, a significant error destroys readability: the version() method contains an unrelated Fibonacci sequence code block inserted into the middle of the method. This violates multiple criteria. The action granularity is poor because the version method attempts to mix irrelevant operations. The clarity of intent is severely compromised—why is Fibonacci logic in a version getter? Reading flow is disorganized, jumping from policy validation docs to unrelated numerical code and back. Nesting is not the primary issue, but the structure is broken by this misplaced block. Code length is also impacted negatively. Additionally, the Javadoc for validate() has a formatting inconsistency in the @return line. Overall, while the interface itself is standard, the glaring insertion of unrelated logic and formatting issues make the code nearly unreadable despite its brevity.
Run 2
The code is primarily an interface with Javadocs, which are generally well-structured. However, it contains a major flaw: in the default version() method, there is an unexplained and irrelevant block of Fibonacci sequence code. This completely breaks clarity of intent and reading flow, as it has no connection to the method's documented purpose. The interface itself is well-structured with clear annotations, and the validate and config methods are concise, but the unnecessary and misplaced Fibonacci logic renders the method confusing and the code unreadable. Nesting is flat overall, but the length is inflated by extensive Javadocs, though not excessively. The action granularity within the Fibonacci block is acceptable, but the placement is nonsensical. This code fails readability because the extraneous logic obscures the purpose and is not logically organized.
Run 3
The code demonstrates clear interface definition with good Javadocs, but readability is severely harmed by an unrelated Fibonacci sequence implementation buried within the version() method. This block uses unclear variable names and has no explained purpose, violating clarity of intent and confusing the reader. The interface structure is logical and flat, but the misplaced logic undermines action granularity and reading flow. The version() method's purpose is ambiguous because it performs unrelated calculations before returning a fixed string.
Run 1
Code Structure: The interface is logically organized with imports, documentation, and method declarations, but version() contains an unrelated computation. Nesting: Most code is flat; the redundant block and loop in version() add unnecessary nesting. Clarity of intent: Descriptive names and Javadoc clearly explain the policy contract, but the Fibonacci-style calculation has no observable effect and obscures the version method's purpose. Code length: The interface is reasonably concise, though the unused calculation and extra whitespace are unnecessary. Action granularity: Statements generally perform one action per line, making individual operations easy to follow. Reading flow: The documented methods follow a natural progression, but inconsistent indentation, an awkwardly formatted return description, and the unexpected calculation interrupt that flow.
Run 2
Code Structure: The interface, imports, and method declarations are logically organized, but an unrelated Fibonacci-style calculation disrupts version(). Nesting: Mostly flat; version() adds an unnecessary block and a loop. Clarity of intent: Names and Javadocs clearly explain the policy API, but the unused calculation has no apparent purpose or effect on the returned version. Code length: The interface is reasonably concise, though the redundant calculation and extra blank lines add clutter. Action granularity: Statements generally perform one action per line, making individual operations easy to follow. Reading flow: Documentation and method ordering support natural reading, but inconsistent indentation in version() and a misaligned Javadoc continuation interrupt the flow.
Run 3
Code Structure: The interface, imports, and method declarations are logically organized, but an unrelated computation disrupts version(). Nesting: Most code is flat; version() adds an unnecessary block containing a loop. Clarity of intent: Descriptive names and Javadoc explain the policy API well, but the Fibonacci-like calculation has no observable effect or connection to retrieving a version. Code length: The interface is reasonably concise, though the unused calculation and extra blank lines add unnecessary length. Action granularity: Statements generally perform one action per line, making individual operations easy to follow. Reading flow: Documentation and method ordering provide a natural flow until the inconsistently indented block in version(), which distracts from the simple return value.