Sample
int-c9f3bb6b6dc3-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.257 | 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 | 14.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs |
| BTTF | 0.423 | 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. | 7651.854 | −252.511 |
| 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.047 | −7.57 |
Intercept 8.87 + feature contributions = -187.612 (log-odds).
Score = sigmoid(-187.612) = 0.
| Score | 0.257 |
|---|
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.896 | +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.956 | −1.162 |
| 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.149 |
Intercept 0.07 + feature contributions = -1.645 (log-odds).
Score = sigmoid(-1.645) = 0.162.
| Score | 0.082 |
|---|
| Score | 49 |
|---|
Run 1
The code is well-structured with clear separation of concerns between handler creation and method discovery. It maintains a flat structure with only two levels of nesting, making it easy to follow. Intent is expressed through descriptive method names and comprehensive Javadoc documentation. The code handles edge cases (fully-qualified names, competing methods) with clear error messages. Reading flow is natural, though the fully-qualified method name parsing could be extracted into a helper method for better readability. The use of collections and streams is appropriate, and the action granularity is mostly one logical operation per line. Minor improvements could include breaking down the fully-qualified name processing loop and simplifying some conditional expressions.
Run 2
The code is generally well-structured and readable, with clear method separation and good Javadoc documentation. The createHandler method is straightforward with a logical flow. However, the findTestBeanFactoryMethod method is quite long and contains multiple responsibilities: parsing fully-qualified names, loading classes, validating methods, and searching hierarchies. While the logic is clear, the method could benefit from extraction of smaller helper methods. The nesting is moderate, particularly in the fully-qualified name parsing loop. Action granularity is mostly good with one operation per line, though some assertions are lengthy. The reading flow is natural despite the complexity. Overall, this is production-quality Spring framework code that maintains readability through documentation and clear naming, but the central method's length and mixing of concerns prevents a higher score.
Run 3
The code is reasonably organized with clear method separation and Javadoc, but readability suffers from complex conditional logic and long methods. `createHandler` has moderate nesting but acceptable structure. However, `findTestBeanFactoryMethod` is overly long, mixes multiple responsibilities (fully-qualified name parsing, filtering, validation), and has a nested try/catch with assertion lambdas. The `findMethods` helper is recursive and adds a disjoined flow. Several lines are dense, combining multiple operations or assertions. Naming is generally clear, and the Javadoc helps, but the heavy use of `Assert.state` with lambdas adds visual clutter. Overall, the intent is understandable but the implementation requires effort to follow.
Run 1
Code Structure: Well organized into handler creation, factory-method resolution, and a recursive search helper; the main resolver handles several responsibilities and could be split further. Nesting: Generally shallow, though fully qualified name processing combines a loop, conditional, and try/catch. Clarity of intent: Descriptive names, thorough documentation, and useful comments make the purpose clear; reflection predicates and method-uniqueness rules require closer inspection. Code length: Mostly justified by validation and diagnostics, but extensive documentation and repeated error-message formatting add bulk. Action granularity: Statements generally perform one action each; chained streams and compound assertions are somewhat dense. Reading flow: Progresses naturally from annotation validation through candidate selection, lookup, validation, and return, with consistent formatting. Long wrapped expressions mildly interrupt scanning.
Run 2
Code Structure: Responsibilities are logically separated into handler creation, factory-method lookup, and recursive searching, though the main lookup method handles several concerns. Nesting: Generally shallow, with moderate nesting in fully qualified name processing and exception handling. Clarity of intent: Descriptive identifiers, explanatory comments, detailed Javadoc, and informative error messages make the purpose clear. Some documented search constraints are not immediately evident from the implementation. Code length: Mostly justified, but the main lookup method and documentation are lengthy; extracting qualified-name resolution could simplify it. Action granularity: Statements generally perform one action per line, although compound predicates and stream chains require more attention. Reading flow: The progression from annotation validation to candidate selection, lookup, and handler construction is natural. Multiline assertions, reflection APIs, and mutable collections slightly interrupt the otherwise consistent flow.
Run 3
Code Structure: Well-organized processor with distinct handler creation, factory lookup, and recursive search helpers; the main lookup method handles several responsibilities and could be split further. Nesting: Generally shallow, though fully qualified name processing combines a loop, conditional, and try/catch. Clarity of intent: Descriptive names, detailed Javadoc, explanatory comments, and informative exception messages make the purpose clear; mutable search sets and distinct-name ambiguity checking require closer attention. Code length: Mostly justified by validation and documentation, but the central lookup method is relatively long. Action granularity: Statements generally perform one action each; compound predicates and chained stream operations introduce modest density. Reading flow: Validation, candidate selection, lookup, and result checking follow a natural sequence, with consistent formatting. Long assertions and multiline expressions occasionally interrupt scanning.