Sample
int-ca6a67f733ab-I09
Select one of ten low-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.76 | 0–1; higher is more readable |
| Dorn | 0.068 | 0–1; higher is more readable |
| Mi | 0.195 | 0–1; higher is more readable |
| LLOC | 23 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 12 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13.67 | 0–20; mean of three runs |
| BTTF | 0 | 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. | 2903.365 | −95.811 |
| 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.212 | −6.318 |
Intercept 8.87 + feature contributions = -62.459 (log-odds).
Score = sigmoid(-62.459) = 0.
| Score | 0.76 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 77 | +1.926 |
| 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. | 123.962 | −1.585 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 77 | −1.346 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 76.864 | +0.665 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.077 | +0.19 |
Intercept 0.07 + feature contributions = -2.611 (log-odds).
Score = sigmoid(-2.611) = 0.068.
| Score | 0.195 |
|---|
| Score | 23 |
|---|
Run 1
The code is mostly readable due to clear naming, logical structure, and standard patterns like the Builder. However, notable issues reduce clarity. There is an obfuscated, dead code block in getErrorResponse that appears to do nothing and interrupts reading flow. The singletonRequest method uses deep method chaining, which nests logical actions at a low level and hurts flattening and readability. Multiple chained calls occur per line, reducing action granularity. Some method signatures are long but acceptable. Overall, the code follows typical Kafka request patterns and is understandable, but the extraneous block and dense chaining prevent a higher score.
Run 2
The code is generally well-structured with clear separation of concerns (builder, data access, error response, parsing). Nesting is moderate but acceptable. However, readability is significantly impacted by several issues: the meaningless line of machine-generated obfuscated code inside getErrorResponse; the singletonRequest method returns VoteRequestData rather than VoteRequest, which is confusing given its name; and the deeply chained builder call in singletonRequest creates dense, hard-to-scan code. While the class follows consistent patterns and has clear intent overall, these problems disrupt reading flow and clarity.
Run 3
The code has reasonable structure and naming, but several issues reduce readability. The most serious problem is a line of obfuscated/dead code inserted into getErrorResponse(), which is confusing and serves no purpose. The builder pattern and request parsing are clear, but the singletonRequest method contains deeply nested builder calls (4 levels), making it hard to follow. The method also returns VoteRequestData instead of VoteRequest, violating the naming expectation. Missing import for ApiKeys is a minor issue. The code alternates between clean sections and dense nested chains, disrupting reading flow. Action granularity is inconsistent—some lines have single actions while others chain multiple method calls. Overall structure is logical but the obfuscated line and deep nesting significantly hurt clarity.
Run 1
Code Structure: The request wrapper, builder, parser, and factory are logically organized, but an unrelated no-op block disrupts getErrorResponse. Nesting: Most methods are flat; the factory has moderately nested construction, while the injected block adds unnecessary nested conditionals. Clarity of intent: Descriptive method names and standard request patterns clarify the main purpose, but the cryptic variable and redundant bitwise operations obscure the no-op block. Code length: Most methods are concise, though the injected logic is entirely unnecessary. Action granularity: Most statements and chained setters occupy separate lines; the injected block compresses declarations, conditions, and mutations onto one line. Reading flow: The overall progression is natural, but inconsistent formatting, deeply indented factory construction, and the abrupt obfuscated block interrupt readability.
Run 2
Code Structure: The class is logically organized into a builder, constructor, accessors, and factory methods, but an unrelated block disrupts error handling. Nesting: Most methods are flat; the nested fluent construction is manageable, while the injected block contains unnecessary nested conditionals. Clarity of intent: Descriptive names and standard request patterns communicate purpose well, except for the cryptic variable and pointless bitwise operations in getErrorResponse. Code length: Generally concise, with unnecessary dead code adding noise. Action granularity: Most statements and setter calls occupy separate lines, but the injected block compresses declarations, conditions, and mutations onto one line. Reading flow: Conventional method ordering supports navigation, though the obfuscated block and awkward indentation around nested List.of calls interrupt otherwise natural reading.
Run 3
Code Structure: The request class is logically organized into a builder, accessors, response handling, parsing, and a factory method, but an unrelated block disrupts error handling. Nesting: Most methods are shallow; singletonRequest has moderately nested object construction, while the injected block adds unnecessary nested conditionals. Clarity of intent: Descriptive method names and protocol types clarify the main purpose, but the cryptic variable and redundant bitwise operations obscure intent. Code length: Generally concise, except for the useless block and somewhat elaborate factory expression. Action granularity: Most statements and setter calls occupy separate lines; the injected block compresses multiple statements and branches onto one line. Reading flow: Conventional class layout and fluent setters support reading, but inconsistent indentation, dense parentheses, and the obfuscated block interrupt the flow.