Sample
int-6880f1b806c8-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.797 | 0–1; higher is more readable |
| Dorn | 0.696 | 0–1; higher is more readable |
| Mi | 0.774 | 0–1; higher is more readable |
| LLOC | 16 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 13.33 | 0–20; mean of three runs |
| BTTF | 0.485 | 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. | 1066.153 | −35.183 |
| Source linesThe number of non-empty source lines. | 49 | +19.6 |
| 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.928 | −7.392 |
Intercept 8.87 + feature contributions = -14.105 (log-odds).
Score = sigmoid(-14.105) = 0.
| Score | 0.797 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 44 | +0.785 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 50 | −0.734 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 44 | −0.589 |
| 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. | 74.98 | +0.489 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 74.92 | +0.404 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 48.816 | +0.273 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.084 | +0.128 |
Intercept 0.07 + feature contributions = 0.827 (log-odds).
Score = sigmoid(0.827) = 0.696.
| Score | 0.774 |
|---|
| Score | 16 |
|---|
Run 1
The code is logically organized with clear class structure and well-defined methods. Nesting is minimal—only a single anonymous block containing an if statement, though this block appears to be an accidental inclusion and is unrelated to the class purpose. Intent is clear: representing a long literal in an expression language AST. The code length is concise and appropriately scoped. Action granularity is mostly one action per line, except for the extraneous block, which groups several unrelated statements. Reading flow is natural due to consistent formatting and Java conventions, despite the stray code fragment disrupting coherence. Overall, readability is high, but the unrelated block is a notable flaw.
Run 2
The code is generally readable with clear class structure, minimal nesting, and explicit intent. It uses appropriate naming, concise methods, and has a logical flow. However, the score is reduced because the 'generateCode' method contains an irrelevant and disconnected block of code (weather temperature variables) that disrupts the flow and clarity. This block appears to be an accidental insertion or example code, making the method ambiguous and confusing. Additionally, the method does not follow the 'one action per line' principle as cleanly as the rest of the class. Apart from this, the class is well-organized, with a clear purpose and proper use of Spring Framework patterns.
Run 3
The code is well-structured and highly readable overall. It follows a clear class hierarchy with a focused responsibility: representing a long literal in an expression AST. The constructor and methods are logically organized. Nesting is minimal, with only one flat if-block in the generateCode method (which appears to be a leftover or misplaced snippet). Intent is clear — store and provide a long literal value, support compilation, and emit bytecode. Code length is concise and appropriate for the task. Action granularity is mostly one action per line, though the generateCode method combines an unrelated temperature-check snippet before the actual bytecode logic, which disrupts reading flow and clarity. Removing that unrelated block would improve cohesion. Overall, the class is idiomatic, well-documented, and maintainable.
Run 1
Code Structure: The class is logically organized, but an unrelated temperature-calculation block disrupts generateCode. Nesting: Generally shallow; the unnecessary block and conditional add avoidable nesting. Clarity of intent: Documentation, method names, and fields clearly identify a long-literal AST node, but the unused temperature calculation obscures the code-generation method's purpose. Code length: Most methods are concise, though the irrelevant block and excess blank lines add unnecessary length. Action granularity: Each statement performs one action, making individual lines easy to follow. Reading flow: The constructor and overrides follow a natural sequence, but inconsistent indentation and the unrelated block interrupt otherwise straightforward reading.
Run 2
Code Structure: The class is logically organized into a field, constructor, and small overridden methods, but generateCode contains an unrelated temperature-calculation block. Nesting: Generally shallow, with an unnecessary extra scope and conditional in that block. Clarity of intent: The documentation, class name, and methods clearly identify a long-literal AST node; the temperature variables obscure the purpose of code generation. Code length: Mostly concise, but the unused calculation adds avoidable length. Action granularity: Each statement performs one action, making individual operations easy to follow. Reading flow: The normal progression from construction to value access and code generation is disrupted by inconsistent indentation and the irrelevant block.
Run 3
Code Structure: The class is logically organized into initialization, value access, compilation support, and code generation, but an unrelated temperature-calculation block disrupts cohesion. Nesting: Mostly flat, with an unnecessary extra scope and a shallow conditional inside generateCode. Clarity of intent: The documentation, class name, and small methods clearly express a long-literal AST node; the unused temperature calculation obscures the intent of code generation. Code length: Generally concise, but the irrelevant block adds avoidable length. Action granularity: Statements consistently perform one action per line. Reading flow: The class follows a natural order, but inconsistent indentation and the abrupt insertion of unrelated logic interrupt reading.