Sample
int-c14b824bb3ea-I02
Shorten method, parameter, and local names without collisions
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.834 | 0–1; higher is more readable |
| Dorn | 0.525 | 0–1; higher is more readable |
| Mi | 0.225 | 0–1; higher is more readable |
| LLOC | 6 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 18 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs |
| BTTF | 0.766 | 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. | 1065.982 | −35.177 |
| 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.175 | −7.762 |
Intercept 8.87 + feature contributions = -9.669 (log-odds).
Score = sigmoid(-9.669) = 0.
| Score | 0.834 |
|---|
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. | 104 | −0.74 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.041 | +0.545 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 60.895 | +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.098 (log-odds).
Score = sigmoid(0.098) = 0.525.
| Score | 0.225 |
|---|
| Score | 6 |
|---|
Run 1
The code is highly readable with a clear, logical structure. It follows standard Java conventions, with package, imports, and class declaration in proper order. Nesting is minimal—only one class and no deeply nested blocks. Intent is explicit through comprehensive Javadoc comments, clear method names, and descriptive parameter names. Code length is appropriate, avoiding unnecessary verbosity while including essential documentation. Action granularity is good, with one action per line in methods, though the constructor initializer could be split for marginally better clarity but is still readable. Reading flow is natural, with constructors and overridden methods logically arranged. The only slight deductions are for minor parameter naming inconsistencies ('object' vs 'object2') and a slightly complex constructor chaining line, but overall this is exemplary Spring framework code that clearly expresses purpose and usage.
Run 2
The code is highly readable with clear structure, minimal nesting, and explicit intent. The class has a single responsibility (CBOR message conversion) and follows consistent Spring patterns. Constructors and the overridden method are short, with assertions validating preconditions clearly. Each line performs a single action, and the reading flow is natural: imports, Javadoc, class declaration, constructors, then method override. The Javadoc documentation is thorough, referencing relevant classes and usage guidance. Minor deductions: the 'object' and 'object2' parameter names are slightly awkward, and the import ordering is not alphabetical. Overall, an excellent example of maintainable Spring framework code.
Run 3
The code is highly readable. It has a clear, logical structure with standard package/import declarations, concise class-level Javadoc, and well-documented constructors and methods. Nesting is minimal—only single-level method bodies with assertion checks. Intent is explicit: it defines a deprecated CBOR message converter and validates the ObjectMapper's factory. Code length is appropriate, with no unnecessary verbosity. Each method performs one clear action per line (assertion, delegation, assignment). Reading flow is natural, from class documentation to constructors and override. Minor deductions: the '@SuppressWarnings("removal")' is slightly opaque without context, and the inherited 'set' method's parameter name 'object2' is awkward. However, these do not significantly impact overall clarity.
Run 1
Code Structure: The class is logically organized into constructors and a configuration method, with clear separation of responsibilities. Nesting: There is no nested control flow, making each method easy to scan. Clarity of intent: Documentation, descriptive class names, and explicit CBORFactory validation explain the converter's purpose well. However, the method name set and parameter names object and object2 are vague; set also conflicts with the apparent setObjectMapper override intent. Code length: Implementation is concise, although documentation occupies most of the snippet. Action granularity: Each statement performs one primary action; the builder chain is short and understandable. Reading flow: Default construction, custom construction, and subsequent configuration follow a natural order. Missing spacing after the package declaration and an extra blank line introduce minor formatting inconsistencies.
Run 2
Code Structure: Constructors and the mapper setter are logically organized, with validation close to configuration. Nesting: Flat methods contain no branching or deeply nested blocks. Clarity of intent: Javadoc, CBOR-specific types, and explicit assertions explain the converter's purpose, but the generic method name set and parameter names object/object2 obscure the mapper configuration intent. The @Override annotation on set also appears inconsistent with the superclass API suggested by super.setObjectMapper. Code length: Implementation is concise; documentation is useful, though comparatively lengthy. Action granularity: Each statement performs one clear action, with only straightforward builder chaining. Reading flow: Imports, class documentation, constructors, and setter follow a natural sequence; minor spacing inconsistencies and weak naming slightly interrupt readability.
Run 3
Code Structure: Logically organized into constructors and a configuration method, with clear separation of responsibilities. Nesting: Flat method bodies with no conditional or loop nesting. Clarity of intent: Documentation clearly describes CBOR conversion and factory requirements, but the generic method name set and parameter names object/object2 obscure the ObjectMapper configuration purpose. The @Override on set also appears inconsistent with the superclass API suggested by super.setObjectMapper. Code length: Implementation is concise; documentation is useful but somewhat repetitive. Action granularity: Each statement performs one distinct action, making validation and delegation easy to distinguish. Reading flow: Constructors followed by configuration provide a natural progression, although inconsistent naming and minor whitespace issues interrupt an otherwise clean presentation.