Sample
int-54819c6877f5-I10
Remove about 40% of line-break groups while retaining structure
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.383 | 0–1; higher is more readable |
| Dorn | 0.087 | 0–1; higher is more readable |
| Mi | 0.012 | 0–1; higher is more readable |
| LLOC | 38 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 6 | 0–20; mean of three runs |
| GPT-6.1 Sol | 11 | 0–20; mean of three runs |
| BTTF | 0.354 | 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. | 3763.655 | −124.201 |
| Source linesThe number of non-empty source lines. | 71 | +28.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.917 | −7.376 |
Intercept 8.87 + feature contributions = -94.306 (log-odds).
Score = sigmoid(-94.306) = 0.
| Score | 0.383 |
|---|
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. | 185.986 | −4.213 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 186 | +2.197 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 72 | −1.513 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 55 | +1.165 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 55 | −0.841 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 70.77 | +0.579 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.076 | +0.2 |
Intercept 0.07 + feature contributions = -2.356 (log-odds).
Score = sigmoid(-2.356) = 0.087.
| Score | 0.012 |
|---|
| Score | 38 |
|---|
Run 1
The code has significant readability issues. Structure suffers from inconsistent formatting, with multiple statements crammed onto single lines and method declarations, closing braces, and Javadoc comments merged together. Nesting is minimal and acceptable, but the flow is disrupted by poor spacing and indentation. Intent is partially clear due to Javadoc and method names, but the compressed formatting obscures the logic. Code length is reasonable, but the lack of line breaks makes it feel dense and difficult to scan. Action granularity is violated repeatedly—multiple operations occur on single lines, especially in constructors, getTarget(), and doGenerate(). Reading flow is disorganized, forcing the reader to mentally separate actions that should be visually distinct. While the underlying logic is straightforward, the presentation substantially undermines readability.
Run 2
The code exhibits severe readability issues. The most critical problem is formatting: multiple class members, method signatures, and statements are crammed onto single lines (e.g., field declarations, constructor bodies, getTarget() and generate() methods). This directly violates the 'one action per line' and 'reading flow' criteria, forcing the reader to parse multiple logical units simultaneously. Import statements are similarly compressed onto one line. Braces are inconsistently placed, with closing braces on the same line as subsequent code, making block structure hard to follow visually. The logic itself is not deeply nested, but the flattened, compressed format creates ambiguity about where methods begin and end. Some code is naturally structured (the doGenerate method is more reasonably formatted), but overall the inconsistent and compact style makes the code extremely difficult to scan and understand. The intent (adapting key generators) is somewhat evident from comments, but the presentation obscures the structure and increases cognitive load significantly. This would be nearly unreadable for most developers without reformatting.
Run 3
The code has severe readability issues due to poor formatting. Multiple statements are crammed onto single lines, such as field declarations, Assert statements, and method closing brackets. Imports are also grouped incorrectly, with multiple imports on one line. This violates the 'one action per line' principle and disrupts natural reading flow. While the class structure itself is logical (adapter pattern, constructor overloading), the tangled formatting makes it hard to parse quickly. The method bodies are generally small, and nesting is not overly deep, which helps somewhat. However, the inconsistent indentation and compacted code significantly reduce clarity of intent. Overall, the code fails to meet basic formatting standards, making it unnecessarily difficult to read despite sound underlying architecture.
Run 1
Code Structure: Constructors, delegation methods, and context creation are logically separated, but compressed declarations and adjacent method boundaries obscure that organization. Nesting: Mostly shallow, with only a loop containing a conditional, making control flow manageable. Clarity of intent: Descriptive class, method, and variable names plus documentation clearly communicate key-generator adaptation; the varargs condition requires closer inspection. Code length: The implementation is reasonably concise without substantial redundancy, although compressed formatting does not improve readability. Action granularity: Multiple imports, assertions, assignments, declarations, and returns share lines, making individual actions harder to scan. Reading flow: Inconsistent whitespace, inline braces, and comments or annotations attached to preceding method endings interrupt an otherwise natural progression from construction to delegation and parameter processing.
Run 2
Code Structure: Constructors, delegation methods, and context creation are logically separated, but compressed formatting obscures their boundaries. Nesting: Generally shallow, with only a loop containing a conditional; complexity is manageable. Clarity of intent: Descriptive names, documentation, and assertions clearly explain the adapter's purpose and generator selection, though the generic cast requires closer inspection. Code length: Appropriately concise for its responsibilities, without substantial unnecessary logic. Action granularity: Multiple imports, assertions, assignments, and control-flow statements share lines, making individual actions harder to scan. Reading flow: Inconsistent line breaks, braces attached to subsequent declarations, and crowded method bodies repeatedly interrupt otherwise natural execution flow. Overall, the underlying design is readable, but poor formatting significantly reduces accessibility.
Run 3
Code Structure: Constructors and focused helper methods provide logical organization, but compressed declarations and method boundaries obscure it. Nesting: Mostly shallow, with only a loop containing a conditional, so control flow remains manageable. Clarity of intent: Descriptive class, method, and variable names plus Javadoc clearly explain the adapter's purpose and delegation behavior. Code length: The implementation is reasonably concise without substantial redundancy. Action granularity: Multiple imports, assertions, assignments, and control-flow statements share lines, making individual actions harder to distinguish. Reading flow: Inconsistent spacing, inline braces, and comments or annotations attached to preceding method endings disrupt scanning. Overall, the underlying design is readable, but poor formatting significantly reduces accessibility.