Sample
int-acfe8b490e9e-I01
Remove line comments, block comments, and Javadoc
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.545 | 0–1; higher is more readable |
| Dorn | 0.18 | 0–1; higher is more readable |
| Mi | 0.242 | 0–1; higher is more readable |
| LLOC | 6 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs |
| BTTF | 0.656 | 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.042 | −7.563 |
Intercept 8.87 + feature contributions = -9.121 (log-odds).
Score = sigmoid(-9.121) = 0.
| Score | 0.545 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 61 | +1.373 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 62 | −1.159 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 61 | −0.979 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| 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. | 98.968 | −0.527 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 60.91 | +0.442 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.09 | +0.07 |
Intercept 0.07 + feature contributions = -1.515 (log-odds).
Score = sigmoid(-1.515) = 0.18.
| Score | 0.242 |
|---|
| Score | 6 |
|---|
Run 1
The code is highly readable with clear structure and intent. It follows Spring framework conventions with proper annotations and clean class organization. The two constructors are concise and delegate appropriately, with validation clearly expressed via Assert statements. Nesting is minimal, and each action is on its own line, enhancing readability. The import section and class declaration are clean. Minor deductions: multiple blank lines (likely formatting artifacts) slightly disrupt reading flow, and the override method setObjectMapper could benefit from a brief Javadoc explaining why validation is needed. Overall, the code demonstrates strong readability through logical organization, concise implementation, and clear purpose.
Run 2
The code is generally clear and well-structured. It follows a logical organization with a single public class extending a Spring abstract converter, two constructors, and one overridden setter method. Nesting is minimal, with no conditional blocks or loops. Intent is clear: it provides a Jackson-based CBOR message converter with validation that the ObjectMapper uses a CBORFactory. Action granularity is appropriate, with each assertion and super call on its own line. The reading flow is natural, moving from constructor overloads to the setter override. However, readability is slightly reduced by excessive blank lines between annotations and the class declaration, as well as within the constructors, which disrupts visual flow. The code length is concise overall, though the blank-line formatting creates unnecessary whitespace. The annotations (@Deprecated, @SuppressWarnings) are clear. If formatting were tightened, the score would be higher.
Run 3
The code is highly readable. It follows a clear, logical structure with package declaration followed by imports, class definition, constructors, and overridden methods. There is no excessive nesting. Intent is clear: a Spring HTTP message converter for CBOR using Jackson. The code is concise—no unnecessary methods or logic. Each action is on its own line, and assertions are clearly stated. The substantial vertical whitespace between methods slightly reduces reading flow, but overall the code is clean and easy to understand.
Run 1
Code Structure: Logically organized into imports, class annotations, constructors, and an overridden setter. Nesting: Shallow, with no nested control flow. Clarity of intent: Descriptive names, CBOR-specific configuration, and explicit factory validation clearly communicate purpose. Code length: Implementation is concise, but excessive blank lines unnecessarily inflate its visual length. Action granularity: Each statement performs one clear action; constructor delegation and validation are easy to distinguish. Reading flow: Conventional Java ordering supports natural reading, though large whitespace gaps interrupt continuity. Overall, the code is highly readable but would benefit from normalized spacing.
Run 2
Code Structure: Imports, class annotations, constructors, and the overridden setter are logically organized. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Descriptive names, APPLICATION_CBOR, and explicit factory validation clearly communicate the converter's purpose. Code length: Implementation is concise, but excessive blank lines unnecessarily stretch the file. Action granularity: Each statement performs a distinct action; constructor delegation and validation remain easy to follow. Reading flow: The progression from default construction to configurable construction and mapper replacement is natural, though large whitespace gaps interrupt continuity. Minor duplicated validation does not significantly impair readability.
Run 3
Code Structure: Imports, class declaration, constructors, and override are logically organized. Nesting: Flat method bodies make the code easy to follow. Clarity of intent: Descriptive names, explicit CBOR media type, and factory validation clearly convey purpose. Code length: The implementation is concise, but excessive blank lines unnecessarily lengthen the presentation. Action granularity: Each statement performs a distinct action on its own line; constructor chaining remains easy to understand. Reading flow: The default constructor, configurable constructor, and setter form a natural progression, though large whitespace gaps interrupt scanning. Minor duplication of factory validation is straightforward and does not significantly impair readability.