Sample
int-13a1e9fad37e-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.753 | 0–1; higher is more readable |
| Dorn | 0.383 | 0–1; higher is more readable |
| Mi | 0.548 | 0–1; higher is more readable |
| LLOC | 28 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 6 | 0–20; mean of three runs |
| GPT-6.1 Sol | 12.33 | 0–20; mean of three runs |
| BTTF | 0.295 | 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. | 1795.448 | −59.25 |
| Source linesThe number of non-empty source lines. | 56 | +22.4 |
| 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.37 | −6.554 |
Intercept 8.87 + feature contributions = -34.534 (log-odds).
Score = sigmoid(-34.534) = 0.
| Score | 0.753 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 56 | +1.2 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 57 | −0.982 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 55 | −0.841 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| 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. | 72.93 | +0.576 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 55.838 | +0.371 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.104 | −0.067 |
Intercept 0.07 + feature contributions = -0.478 (log-odds).
Score = sigmoid(-0.478) = 0.383.
| Score | 0.548 |
|---|
| Score | 28 |
|---|
Run 1
This code has severe readability problems. The most critical issue is a stray block of unrelated Java code embedded inside the toString() method (declaring int variables and an if-else statement), which makes the code invalid and nonsensical. Beyond that, the indentation is inconsistent (mixing tabs and spaces, misaligned braces), and the class logic is obscured by formatting issues. The setTarget method loops backward to chain transformers, which is not immediately obvious without comments explaining why reverse order is needed. The visitMethod override merely delegates and adds no clarity. Variable naming like 'v' and 'cv' is unclear. While the chain-to-string loop is straightforward, the overall structure is confusing, and the stray code block makes it fundamentally unreadable. Even ignoring that, the inconsistent indentation and lack of explanatory comments for the backward iteration would leave the reader confused about intent and flow.
Run 2
The code has several readability issues. The toString() method contains an unrelated, seemingly accidental code block about 'higherScore' that is dead code and confusing. Formatting is inconsistent - mixed indentation, incorrect method signature indentation, and a misplaced opening brace. The setTarget method uses a reverse iteration that may be unclear without domain knowledge, though it is logically structured. Overall structure follows a chain-of-transformers pattern, but the accidental dead code and formatting problems severely hurt clarity. The visitMethod method is a simple pass-through but adds little value. Variable names like 'v' and 'cv' are short and ambiguous. Despite some logical organization, the confusing artifacts and inconsistent style make the code hard to read and maintain.
Run 3
The code has several readability issues. The class structure is generally logical, but there is a stray, unrelated code block inside the `toString()` method that contains variable declarations and an if-else statement that have nothing to do with the method's purpose. This completely breaks the reading flow and clarity of intent. Indentation is inconsistent (tabs vs spaces) and method signatures are misaligned. The `setTarget` method uses a reverse loop without explanation, making the logic non-obvious. The `visitMethod` method simply delegates to `cv`, which may be acceptable but adds little clarity. Overall, the unnecessary length from the misplaced code, inconsistent formatting, and ambiguous loop logic significantly reduce readability.
Run 1
Code Structure: The class is organized into focused methods, but an unrelated score-comparison block disrupts toString(). Nesting: Mostly shallow; the unnecessary block and conditional add avoidable nesting. Clarity of intent: Transformer chaining and string construction are understandable, while the unused higherScore calculation has no apparent purpose. Code length: Generally concise, but the dead calculation adds unnecessary lines. Action granularity: Statements mostly perform one action per line, making individual operations easy to follow. Reading flow: Method ordering is natural, but inconsistent indentation, the stray block, and reverse chain wiring requiring some mental tracing reduce readability.
Run 2
Code Structure: The class has logically separated methods, but an unrelated score-comparison block disrupts toString(). Nesting: Mostly shallow; the unnecessary block and conditional add avoidable nesting. Clarity of intent: Transformer chaining and string formatting are understandable, while unused score variables obscure the purpose of toString(). Code length: Generally concise, but the irrelevant block adds unnecessary length. Action granularity: Statements consistently perform one action per line. Reading flow: Method order is natural, but inconsistent indentation, uneven parameter alignment, and the unrelated block interrupt readability. The reverse traversal in setTarget() also requires some thought to understand the chain wiring.
Run 3
Code Structure: Methods are logically separated, but the unrelated score-comparison block inside toString disrupts cohesion. Nesting: Mostly shallow; loops and conditionals are easy to follow, although the extra block adds needless nesting. Clarity of intent: Transformer chaining and string formatting are understandable, but the unused higherScore calculation is distracting and unexplained. Code length: Generally concise, with unnecessary length from the irrelevant block. Action granularity: Each statement performs a single action, making individual operations easy to read. Reading flow: Method ordering is natural, but inconsistent indentation, excessive parameter alignment, and the abrupt insertion of unrelated logic interrupt the flow.