Sample
int-dda318cf9d9e-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.822 | 0–1; higher is more readable |
| Dorn | 0.527 | 0–1; higher is more readable |
| Mi | 0.217 | 0–1; higher is more readable |
| LLOC | 6 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.806 | 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. | 1055.401 | −34.828 |
| Source linesThe number of non-empty source lines. | 61 | +24.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. | 5.161 | −7.741 |
Intercept 8.87 + feature contributions = -9.3 (log-odds).
Score = sigmoid(-9.3) = 0.
| Score | 0.822 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 62 | −1.159 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 103.968 | +0.873 |
| 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. | 103.968 | −0.738 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.04 | +0.552 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 60.905 | +0.441 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 33 | +0.404 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 33 | −0.336 |
Intercept 0.07 + feature contributions = 0.107 (log-odds).
Score = sigmoid(0.107) = 0.527.
| Score | 0.217 |
|---|
| Score | 6 |
|---|
Run 1
This code is exceptionally readable. Structure is logical with clear class-level Javadoc explaining purpose, deprecation, and usage. Imports are clean. Nesting is essentially flat; no complex conditional or loop structures exist. Intent is unambiguous: the class provides CBOR message conversion via Jackson, with clear constructors and a setter. Code length is minimal and focused, avoiding unnecessary boilerplate. Each method performs one clear action or delegates appropriately, and the constructor chaining is concise. The reading flow is natural from class documentation to constructors to override methods. Assertions are used effectively to enforce preconditions without clutter.
Run 2
The code is highly readable and follows Spring Framework conventions. It has a clear class hierarchy extending AbstractJackson2HttpMessageConverter, with two well-documented constructors delegating appropriately. The structure is logical with no excessive nesting. Intent is explicit through Javadoc comments explaining the CBOR format support, constructor behaviors, and deprecation rationale. Code length is concise with minimal boilerplate. Action granularity is appropriate, with each line performing a single operation. The reading flow is natural, moving from class-level documentation to constructors to overridden methods. The assertion checks are placed correctly and add clarity. Minor deductions: the @SuppressWarnings annotation adds slight noise, and the inheritance structure requires some familiarity with the parent class to fully understand the implementation.
Run 3
The code is highly readable. It's a simple, well-structured Spring converter class. Imports are clean, and the class has clear, standard Javadoc explaining its purpose, deprecation, and usage. Both constructors are concise and delegate correctly, with meaningful validation via Assert. Methods are short and focused, each performing a single logical action. There is minimal nesting and no convoluted logic. The reading flow is natural: class declaration, constructors, override, validation. Minor deductions: the constructor overloads could be slightly clearer with a comment, but overall the code is exemplary in clarity and maintainability.
Run 1
Code Structure: Logically organized into imports, class documentation, constructors, and an overridden setter. Nesting: Flat methods with no nested control flow. Clarity of intent: Descriptive names, explicit CBORFactory validation, and helpful documentation make the converter's purpose clear. Code length: Implementation is concise; documentation is somewhat lengthy but useful. Action granularity: Each statement performs one clear action, with constructor delegation keeping initialization simple. Reading flow: Natural progression from default construction to custom configuration and mapper replacement. Minor distractions include long documentation links, slightly inconsistent blank-line spacing, and duplicated validation.
Run 2
Code Structure: Logically organized into constructors and an overridden setter, with consistent factory validation. Nesting: Flat methods with no nested control flow. Clarity of intent: Descriptive names, explicit CBOR configuration, and helpful documentation clearly explain purpose and constraints. Code length: Implementation is concise; documentation is somewhat verbose but useful. Action granularity: Each statement performs one primary action, and the short builder chain remains easy to understand. Reading flow: Natural progression from class documentation to default construction, custom construction, and configuration. Minor formatting inconsistencies, including extra blank lines and no separation after the package declaration, slightly reduce polish.
Run 3
Code Structure: Logically organized into constructors and an overridden setter, with consistent formatting and useful documentation. Nesting: Flat method bodies with no conditional or loop nesting. Clarity of intent: Descriptive names, explicit CBOR configuration checks, and Javadoc make the converter’s purpose and requirements clear. Code length: Implementation is concise; documentation is somewhat lengthy but relevant, and the repeated validation is minor. Action granularity: Each statement performs one clear action; the chained builder expression is straightforward. Reading flow: Natural progression from class documentation to default construction, custom construction, and mapper replacement. Minor spacing inconsistencies and long documentation lines slightly reduce polish.