Sample
int-24fb90cce459-I05
Rewrite eligible decimal integer literals in hexadecimal notation
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.27 | 0–1; higher is more readable |
| Dorn | 0.162 | 0–1; higher is more readable |
| Mi | 0.082 | 0–1; higher is more readable |
| LLOC | 49 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 15.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.3 | 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. | 7690.44 | −253.785 |
| Source linesThe number of non-empty source lines. | 159 | +63.6 |
| 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.052 | −7.578 |
Intercept 8.87 + feature contributions = -188.892 (log-odds).
Score = sigmoid(-188.892) = 0.
| Score | 0.27 |
|---|
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. | 160 | −4.629 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 120 | +3.414 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 120 | −2.333 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 158.904 | +1.811 |
| 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. | 113.944 | −1.161 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 113.981 | +1.035 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.082 | +0.15 |
Intercept 0.07 + feature contributions = -1.643 (log-odds).
Score = sigmoid(-1.643) = 0.162.
| Score | 0.082 |
|---|
| Score | 49 |
|---|
Run 1
The code is well-structured with clear separation of concerns, good method decomposition, and comprehensive documentation. Main methods follow a linear flow with reasonable nesting (max 2-3 levels). However, readability is impacted by inconsistent use of hex literals (0x1, 0x0) instead of conventional decimal notation, which appears overly clever and obscures intent. The createHandler method's branching logic with explicit vs. convention-based method naming could be extracted for clarity, and the findTestBeanFactoryMethod method is somewhat long at ~60 lines. Javadocs are excellent and compensate for complexity. Overall, this is readable Spring framework code with minor stylistic issues that slightly hinder quick comprehension.
Run 2
The code is generally well-structured and readable. It follows clear logical organization with a well-defined class hierarchy and documented methods. The use of helper methods reduces nesting, though the findTestBeanFactoryMethod method has moderate complexity. Clarity of intent is strong, with descriptive method names and Javadoc. However, some cryptic elements reduce readability: magic numbers like -0x1, 0x0, and 0x1 are used instead of -1, 0, and 1, which is unconventional and confusing. The fully-qualified method name parsing section is somewhat dense with multiple assertions and nested logic. Action granularity is mostly good with one operation per line, though a few lines combine multiple conditions. The reading flow is natural but could be improved by extracting the fully-qualified method name handling into a separate method.
Run 3
The code is generally well-structured with clear method separation and good documentation, but it suffers from some readability issues. The main method `findTestBeanFactoryMethod` is quite long and contains deeply nested logic, particularly in the fully-qualified method name processing loop. The use of magic numbers like `-0x1` and `0x0` instead of standard literals (`-1`, `0`) is unusual and hurts clarity. Variable names are mostly descriptive, but some expressions are dense and combine multiple operations. The class has a clear single responsibility and the Javadoc is excellent, explaining complex logic. However, the method bodies mix different levels of abstraction, making the reading flow somewhat choppy. The code length is justified by the complexity of the problem, but some sections could be extracted into smaller helper methods to flatten the nesting. Overall, it's readable but with room for improvement.
Run 1
Code Structure: Responsibilities are separated into handler creation, factory-method lookup, and recursive discovery, though the main lookup method combines parsing, reflection, filtering, and validation. Nesting: Mostly shallow, with modest additional nesting around fully qualified names and exception handling. Clarity of intent: Descriptive names, Javadoc, comments, and informative errors make the purpose clear; unnecessary hexadecimal literals obscure ordinary indexes and counts, and the documented zero-argument requirement is not explicit in the local method filter. Code length: Generally justified, but the lookup method and extensive documentation make scanning slower. Action granularity: Statements usually perform one action, although compound assertions and stream chains require extra attention. Reading flow: Processing follows a logical sequence from configuration through discovery to validation, with consistent formatting; long predicates, wrapped messages, and tightly packed imports slightly interrupt that flow.
Run 2
Code Structure: Responsibilities are logically separated into handler creation, factory-method lookup, and recursive search, though the main lookup method handles several concerns. Nesting: Generally shallow, with moderate nesting in fully qualified name processing and its try/catch. Clarity of intent: Descriptive names, Javadoc, comments, and informative errors explain the purpose well; hexadecimal literals for ordinary indices and counts unnecessarily obscure simple operations. Code length: Mostly justified, but lengthy documentation and repeated validation messages add bulk. Action granularity: Most lines perform one action, although compound predicates, fluent stream operations, and formatted assertions require additional parsing. Reading flow: The progression from annotation validation to candidate selection, lookup, and handler construction is natural. Long wrapped expressions and reflection-specific details interrupt that flow. Some documentation claims, such as rejecting multiple matching methods, are not directly reflected by the distinct-name check, making behavior harder to infer.
Run 3
Code Structure: Responsibilities are logically separated into handler creation, factory-method lookup, and hierarchy traversal, though the main lookup method handles several concerns. Nesting: Mostly shallow, with moderate nesting in fully qualified name processing and exception handling. Clarity of intent: Descriptive identifiers, Javadoc, comments, and informative errors make the purpose clear. However, hexadecimal constants such as -0x1 and 0x1 obscure ordinary index and count checks, and the documented uniqueness requirement is less obvious in the distinct-name check. Code length: Generally justified, although lookup logic and repeated error-message construction make one method lengthy. Action granularity: Most lines perform one action; multiline predicates and fluent expressions require slightly more attention but remain manageable. Reading flow: Processing progresses naturally from validation through candidate discovery to selection. Consistent formatting and helper methods support readability, while long assertions, reflection APIs, and mutable collection tracking introduce some cognitive overhead.