Sample
int-f0690a3a9b6e-I11
Split eligible integer literals into pairs of short-named intermediate variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.806 | 0–1; higher is more readable |
| Dorn | 0.842 | 0–1; higher is more readable |
| Mi | 0.768 | 0–1; higher is more readable |
| LLOC | 11 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 18.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.716 | 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. | 867.881 | −28.64 |
| Source linesThe number of non-empty source lines. | 40 | +16 |
| 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.974 | −7.46 |
Intercept 8.87 + feature contributions = -11.23 (log-odds).
Score = sigmoid(-11.23) = 0.
| Score | 0.806 |
|---|
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. | 74.976 | +0.49 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 35 | +0.473 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 41 | −0.415 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 74.927 | +0.404 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 39.684 | +0.145 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.085 | +0.111 |
Intercept 0.07 + feature contributions = 1.676 (log-odds).
Score = sigmoid(1.676) = 0.842.
| Score | 0.768 |
|---|
| Score | 11 |
|---|
Run 1
The code is highly readable. It has a clear, logical structure with a single class, well-named fields, and a straightforward constructor. Nesting is minimal; there are no deeply nested control structures. The intent of each method is explicit: retrieving the literal value, checking compilability, and generating bytecode. Code length is concise and appropriate for the functionality. Action granularity is sensible, with one logical action per line in the generateCode method. Reading flow is natural, with the class definition, field, constructor, and methods arranged in a conventional order. Minor deductions would only reflect the lack of explicit null or bounds checks, but for a literal AST node this is acceptable and idiomatic.
Run 2
The code is highly readable. It follows a clear, logical structure with the class definition, field declaration, constructor, and overridden methods in a natural order. Nesting is minimal — only one level of indentation is used within the class body. The intent is unambiguous: it represents a long integer literal node in a SpEL AST, with a concise constructor, a getter for the literal value, and methods for compilation behavior. Code length is minimal and appropriate, with no redundant logic. Action granularity is excellent — each line performs a single, focused action, such as assigning a TypedValue or pushing a descriptor. Reading flow is natural, moving from state to initialization to behavior. Javadoc and clear method names further enhance clarity, making the code easy to understand at a glance.
Run 3
The code is highly readable. It has a clear, single-purpose class structure representing a long literal in an expression language AST. The constructor is straightforward, initializing fields and calling the superclass. Methods are short and focused: getLiteralValue returns the stored value, isCompilable returns a constant, and generateCode performs two clear operations. Nesting is minimal, with no conditional or loop constructs. Each line performs a single action, and the reading flow is natural—from field declarations to constructor to overridden methods. The only minor deduction is the lack of comments within generateCode, though the method name and surrounding context make its intent clear. The code is concise, well-organized, and follows common conventions, making it easy to understand at a glance.
Run 1
Code Structure: Logically organized into a field, constructor, and focused overridden methods. Nesting: Flat, with no conditionals or loops. Clarity of intent: The class documentation, descriptive names, and straightforward methods clearly identify a long-literal AST node; the JVM descriptor "J" and bytecode API calls require some domain knowledge. Code length: Concise, with no unnecessary implementation. Action granularity: Each statement performs one clear action on its own line. Reading flow: Natural progression from initialization to value access, compilation capability, and code generation. Minor formatting issues, including extra blank lines and no separation between the package declaration and imports, slightly reduce polish.
Run 2
Code Structure: Well-organized class with a field, constructor, and clearly separated overrides. Nesting: Flat methods with no nested control flow. Clarity of intent: Descriptive class and method names, supported by documentation, make the long-literal representation clear; the descriptor "J" and abbreviated parameters require some JVM/framework knowledge. Code length: Concise, with no unnecessary logic. Action granularity: Each statement performs one action on its own line. Reading flow: Natural progression from initialization to value access and code generation; minor excess blank lines do not significantly affect readability.
Run 3
Code Structure: The class is logically organized into a field, constructor, and small overridden methods. Nesting: There is no nested control flow, making the code easy to scan. Clarity of intent: The class documentation and method names clearly convey its role as a long-literal AST node; the JVM descriptor "J" and abbreviated parameters mv and cf require some domain knowledge. Code length: The implementation is concise with no unnecessary logic, although extra blank lines add minor visual space. Action granularity: Each statement performs one distinct action. Reading flow: Initialization precedes value access and compilation behavior, creating a natural progression.