Sample
int-7a829821583b-I05
Rewrite eligible decimal integer literals in hexadecimal notation
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.997 | 0–1; higher is more readable |
| Scalabrino | 0.643 | 0–1; higher is more readable |
| Dorn | 0.69 | 0–1; higher is more readable |
| Mi | 0.628 | 0–1; higher is more readable |
| LLOC | 5 | 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.807 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 59 | +23.6 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 598.547 | −19.752 |
| 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.676 | −7.014 |
Intercept 8.87 + feature contributions = 5.704 (log-odds).
Score = sigmoid(5.704) = 0.997.
| Score | 0.643 |
|---|
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. | 57 | −0.982 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 103.967 | +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.983 | −0.739 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.024 | +0.708 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 58.81 | +0.412 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 23 | +0.058 |
Intercept 0.07 + feature contributions = 0.799 (log-odds).
Score = sigmoid(0.799) = 0.69.
| Score | 0.628 |
|---|
| Score | 5 |
|---|
Run 1
The code is highly readable. Structure is logical and interface methods are well-organized. Nesting is non-existent as it's an interface with flat default methods. Intent is crystal clear due to comprehensive Javadoc, good method naming, and clear use of @Nullable and @since annotations. Code length is concise—no unnecessary boilerplate. Action granularity is ideal: each default method has a single, clear action (returning a value or checking emptiness). Reading flow is natural, with methods ordered logically and documentation providing necessary context without redundancy. Minor deductions only because the extensive Javadoc, while beneficial, adds verbosity and the 'hasCacheOperations' method's inversion (checking emptiness) could be slightly more direct.
Run 2
The code is a Spring Framework interface with excellent readability. Javadoc comments thoroughly explain each method's purpose, parameters, return values, and edge cases. The structure is flat with no deep nesting, and method names like isCandidateClass, hasCacheOperations, and getCacheOperations clearly communicate intent. The default implementations are concise and use simple delegation, keeping action granularity to one or two operations per method. Reading flow is natural, moving from candidate class checks to method-level operations. Minor deductions for the verbosity of Javadoc (which is appropriate for framework APIs) and one multi-line return statement in hasCacheOperations, but overall this is highly readable framework code.
Run 3
This is a clean, well-structured interface definition. It clearly separates the three methods by purpose, with logical ordering and flat nesting. Javadoc is extensive and explains intent, including parameter contracts, nullability, and optimization hints. Method names are descriptive, and the single method with logic (hasCacheOperations) delegates concisely to getCacheOperations. The use of default methods keeps the interface lean while preserving flexibility. Formatting is consistent with Spring conventions, with proper spacing and import placement. Minor deductions: some Javadoc blocks are long and could feel verbose, and hasCacheOperations could optionally be simplified, but overall it is highly readable.
Run 1
Code Structure: A focused interface logically groups candidate detection, operation checking, and operation retrieval. Nesting: Minimal, with no nested control flow. Clarity of intent: Descriptive method names, explicit nullability annotations, and detailed documentation clearly explain purpose and contracts. Code length: Implementation is concise; documentation is somewhat verbose but provides useful API context. Action granularity: Each implementation contains a single clear return statement, with no bundled actions. Reading flow: Methods progress naturally from class-level filtering to method-level checking and retrieval. Minor drawbacks are tightly grouped imports and slightly repetitive documentation, but overall readability is excellent.
Run 2
Code Structure: A small, logically organized interface separates candidate filtering, operation detection, and operation retrieval. Nesting: Methods are flat, with no nested control flow. Clarity of intent: Descriptive names, explicit nullability annotations, and detailed Javadoc clearly explain contracts and default behavior. Code length: Executable code is concise; documentation is somewhat verbose but useful for an API. Action granularity: Each implementation contains a single return statement, with no unrelated actions combined. Reading flow: Methods progress naturally from class-level filtering to method-level checks and retrieval. Minor formatting limitations include the lack of spacing between package and import declarations and the long retrieval signature.
Run 3
Code Structure: A well-organized interface groups related cache-introspection methods with consistent documentation. Nesting: Flat methods have no branching or nested control flow. Clarity of intent: Descriptive method names, explicit nullability, and detailed Javadoc clearly explain behavior and contracts. Code length: Executable code is minimal; documentation is somewhat verbose but useful for an API. Action granularity: Each implementation contains a single return statement, with no unrelated actions combined. Reading flow: Methods progress naturally from class-level candidacy to method-level checks and operation retrieval. Minor formatting drawbacks include missing blank lines between the package declaration and import groups and a long final method declaration.