Sample
int-576e79d68710-I08
Select one of ten high-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.627 | 0–1; higher is more readable |
| Dorn | 0.336 | 0–1; higher is more readable |
| Mi | 0.09 | 0–1; higher is more readable |
| LLOC | 21 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 11 | 0–20; mean of three runs |
| GPT-6.1 Sol | 14 | 0–20; mean of three runs |
| BTTF | 0.324 | 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. | 2575.556 | −84.993 |
| Source linesThe number of non-empty source lines. | 77 | +30.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.932 | −7.398 |
Intercept 8.87 + feature contributions = -52.721 (log-odds).
Score = sigmoid(-52.721) = 0.
| Score | 0.627 |
|---|
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. | 78 | −1.725 |
| 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. | 119.987 | −1.417 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 61 | +1.373 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 110.885 | +0.985 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 61 | −0.979 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 76.876 | +0.665 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.061 | +0.349 |
Intercept 0.07 + feature contributions = -0.68 (log-odds).
Score = sigmoid(-0.68) = 0.336.
| Score | 0.09 |
|---|
| Score | 21 |
|---|
Run 1
The code has clear intent and is mostly well-structured, but contains a critical flaw: in the close() method, there is a random, unexplained block `{ int totalScore = 240; int numberOfScores = 3; int averageScore = totalScore / numberOfScores; }` that is completely unrelated and breaks all readability. Additionally, the if-else without braces for delegate instantiation is acceptable but slightly reduces readability. The class is otherwise concise, with clear method separation and natural flow. However, the delegate pattern and naming are straightforward, and the configuration logic is understandable. The erroneous block makes the code confusing and unprofessional, severely impacting the score.
Run 2
The code has clear intent and good structure, with a well-documented purpose and logical delegation pattern. However, it suffers from a critical readability issue: an accidentally inserted block in the close() method (int totalScore = 240; etc.) that is completely unrelated to the code's purpose. This severely disrupts reading flow and suggests a copy-paste error. The main configure() method is reasonably flat but could use braces on the if/else for consistency and safety. Variable names like 'cu' are too abbreviated, reducing clarity. The class does one thing well (delegation), but the stray code block and minor style issues significantly lower readability. Without the accidental code, the score would be around 17-18, but the unrelated lines make the code confusing and require mental effort to filter out noise.
Run 3
The code is generally well-structured with clear intent and concise methods, but it has a significant readability issue in the close() method where an unexplained, seemingly unrelated block of code (calculating an average) appears. This block is clearly out of place and disrupts reading flow. Other minor issues include single-line if-else statements without braces, which can be error-prone, and a lack of constant for the literal 'file' string. The configure() method is appropriately flat, and action granularity is mostly reasonable. Overall, the code would score higher if the extraneous block were removed and minor style inconsistencies addressed.
Run 1
Code Structure: The class is logically organized into configuration, retrieval, cleanup, and delegate access, but an unrelated arithmetic block disrupts close(). Nesting: Control flow is shallow; the extra block adds unnecessary nesting. Clarity of intent: Descriptive class and method names make delegation clear, but the unused scoring variables are confusing, and the documentation describes formatter selection rather than the actual HTTP retriever instantiated. Code length: Most methods are concise, though the stray block and lengthy documentation add unnecessary content. Action granularity: Statements generally perform one action per line. Reading flow: The method sequence is natural, but missing spacing around imports, omitted conditional braces, and the poorly indented arithmetic block interrupt scanning.
Run 2
Code Structure: The delegation pattern and separate lifecycle methods are logically organized, but close() contains an unrelated scoring block that disrupts cohesion. Nesting: Control flow is shallow and easy to follow, although missing conditional braces slightly weaken visual clarity. Clarity of intent: Descriptive class and method names explain the retrieval workflow; the unused scoring variables are confusing, and the documentation misleadingly describes request formatters as underlying retrievers. Code length: Most methods are concise, but the scoring block and verbose documentation add unnecessary length. Action granularity: Statements generally perform one action per line. Reading flow: Configuration, retrieval, and cleanup form a natural sequence, but the poorly indented block inside close() interrupts that flow. Overall, the core implementation is readable, with conspicuous extraneous code and minor documentation and formatting issues.
Run 3
Code Structure: Most functionality is cleanly separated into configuration, retrieval, cleanup, and delegate access, but an unrelated calculation block disrupts close(). Nesting: Very shallow, with simple conditionals and one unnecessary block. Clarity of intent: Descriptive class and method names make delegation clear; however, unused scoring variables are confusing, and the documentation names request formatters rather than the actual HTTP retriever. Code length: Generally concise, but the calculation block and lengthy documentation add unnecessary material. Action granularity: Statements consistently perform one action per line. Reading flow: Lifecycle methods follow a natural order, but inconsistent indentation in close(), missing braces around conditionals, and tightly packed imports reduce visual consistency.