Sample
int-17f1a4a6b55b-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.436 | 0–1; higher is more readable |
| Dorn | 0.195 | 0–1; higher is more readable |
| Mi | 0.038 | 0–1; higher is more readable |
| LLOC | 43 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 10.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.175 | 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. | 5196.475 | −171.484 |
| Source linesThe number of non-empty source lines. | 105 | +42 |
| 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.847 | −7.271 |
Intercept 8.87 + feature contributions = -127.885 (log-odds).
Score = sigmoid(-127.885) = 0.
| Score | 0.436 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 101 | +2.756 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 106 | −2.717 |
| 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. | 142.972 | −2.391 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 101 | −1.897 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 142.972 | +1.502 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 104.854 | +1.056 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.076 | +0.201 |
Intercept 0.07 + feature contributions = -1.418 (log-odds).
Score = sigmoid(-1.418) = 0.195.
| Score | 0.038 |
|---|
| Score | 43 |
|---|
Run 1
The code is generally readable with clear method names and reasonable structure, but several issues reduce its score. The main problem is a suspicious obfuscated line in removePartitionListener that appears to be injected code - this severely damages trust and readability. Additionally, there's significant repetition across the three offset methods, each taking 8-10 lines for nearly identical logic. The endOffsetMetadata method uses if-else chains that could be cleaner with a switch statement. Method calls like fetchOffsetForTimestamp span multiple lines, making the flow harder to follow. The code does have good aspects: clear class purpose, descriptive variable names, and logical organization. However, the suspicious code block alone warrants significant penalty, and the repetitive patterns suggest refactoring is needed. The reading flow is generally natural except for the multi-line method calls and the injected line.
Run 2
The code has a clear class structure and generally follows a logical organization, but several factors reduce readability significantly. The repeated pattern of calling fetchOffsetForTimestamp, checking Optional emptiness, and throwing exceptions is duplicated across three methods, making the code unnecessarily long. The endOffsetMetadata method uses if-else branches on the FetchIsolation enum rather than a switch or separate methods. The most significant issue is the obfuscated dead code in the removePartitionListener method with variable lI0O_7c0e3240 that serves no purpose and severely disrupts reading flow. Comments are minimal, and while parameter/method names are descriptive, the long method invocations span multiple lines, making it harder to track arguments. Action granularity is generally one action per line, but the nested method calls and chained accessors like timestampAndOffsetOpt() followed by .isEmpty() checks add cognitive overhead. The class would benefit from extracting a helper method for timestamp offset retrieval and cleaning up the obfuscated code.
Run 3
The code is generally well-structured with clear class purpose, concise methods, and helpful comments. However, several issues reduce readability. The file contains an obfuscated, nonsensical line in the removePartitionListener method (a variable with an encoded name and no practical effect) that severely harms clarity and suggests injection of confusing code. Imports are not organized (no blank lines between related groups) and the file lacks formatting consistency. Method calls like fetchOffsetForTimestamp use mixed parameter styles and some long lines. While the helper partition() method centralizes logic and reduces duplication, error handling and intent are mostly clear. Overall, the code is understandable but includes distracting artifacts and inconsistent style that prevent a higher readability score.
Run 1
Code Structure: Methods are logically organized around partition metadata operations, with a useful shared partition helper. Nesting: Generally shallow, although removePartitionListener contains an unnecessary nested block and conditional. Clarity of intent: Descriptive names and isolation comments clarify most operations; the obfuscated variable and meaningless bitwise operations obscure intent. Code length: Mostly concise, but timestamp lookup methods repeat similar logic, and the injected block adds needless code. Action granularity: Most statements are cleanly separated; the obfuscated block packs multiple actions onto one line. Reading flow: Consistent delegation and straightforward error handling make most methods easy to follow, but the abrupt unformatted block disrupts readability. Long argument lists and brace-free conditional branches introduce minor additional friction.
Run 2
Code Structure: Methods are logically organized around metadata retrieval and listener management, with a shared partition-validation helper. Nesting: Most methods are flat, using simple conditionals and early exceptions; the injected block adds unnecessary nesting. Clarity of intent: Descriptive method names, types, and comments explain most operations, but the opaque variable and meaningless bitwise calculations in removePartitionListener obscure intent. Code length: Generally concise, though timestamp-fetching methods repeat similar logic and the injected block adds needless code. Action granularity: Most statements perform one action, but the injected block compresses several assignments and a conditional onto one line. Reading flow: Consistent formatting and predictable delegation make most code easy to follow; long calls, unbraced branches, and the abruptly unformatted block interrupt that flow.
Run 3
Code Structure: Methods are logically organized around partition metadata operations, but removePartitionListener contains an unrelated obfuscated block. Nesting: Most methods are flat, with simple guards and shallow conditional branches. Clarity of intent: Descriptive method and variable names, interface overrides, and useful comments make the main behavior clear; the cryptic variable and pointless bitwise operations obscure intent locally. Code length: Generally concise, although timestamp lookup methods repeat similar logic and the injected block adds unnecessary code. Action granularity: Most statements perform one action, but the obfuscated block compresses declarations, assignments, and a conditional onto one line. Reading flow: Consistent formatting and straightforward delegation support natural reading, interrupted sharply by the unindented block; long argument lists and brace-free conditionals add minor friction.