Sample
int-48648fc07c5e-I08
Select one of ten high-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.255 | 0–1; higher is more readable |
| Dorn | 0.152 | 0–1; higher is more readable |
| Mi | 0.178 | 0–1; higher is more readable |
| LLOC | 52 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 11.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15.33 | 0–20; mean of three runs |
| BTTF | 0.397 | 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. | 7821.072 | −258.095 |
| Source linesThe number of non-empty source lines. | 166 | +66.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.049 | −7.573 |
Intercept 8.87 + feature contributions = -190.399 (log-odds).
Score = sigmoid(-190.399) = 0.
| Score | 0.255 |
|---|
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. | 167 | −4.877 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 127 | +3.656 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 127 | −2.493 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 165.896 | +1.909 |
| 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.976 | −1.162 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 113.988 | +1.035 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.082 | +0.142 |
Intercept 0.07 + feature contributions = -1.721 (log-odds).
Score = sigmoid(-1.721) = 0.152.
| Score | 0.178 |
|---|
| Score | 52 |
|---|
Run 1
The code is generally well-structured with clear intent and good documentation. However, there are a few issues: 1) A dead code block at the beginning of createHandler() with an empty while loop (lines 34-38) that serves no purpose and should be removed. 2) The findTestBeanFactoryMethod method is quite long and handles multiple responsibilities - parsing fully-qualified names, filtering methods, and validating results, which could be split for better readability. 3) Some assertions with complex boolean expressions are hard to parse at a glance. 4) The code uses good naming conventions and follows single responsibility principles in most methods. 5) Javadoc is excellent and explains the conventions clearly. 6) The dead code block is the most significant issue, as it would confuse future maintainers.
Run 2
The code has clear intent and good documentation, but suffers from several readability issues. The structure is mostly logical, with well-separated methods and clear Javadoc, though the createHandler method is too long and handles too many responsibilities. The nesting depth is moderate but could be reduced in the factory method validation logic. The most significant problem is the placeholder block with a meaningless while loop at the start of createHandler, which is confusing and appears to be debugging code. Additionally, the findTestBeanFactoryMethod has dense conditional logic with multiple assertions that hamper readability. The action granularity is generally good, but some complex boolean expressions could be extracted into helper methods. The reading flow is natural for the most part, but the excessive use of Assert.state with lambda expressions makes the code harder to scan. Overall, the code is maintainable but would benefit from simplifying complex conditions and removing the placeholder block.
Run 3
The code has readability issues. It contains a meaningless 'while (remainingSteps > 0)' loop that serves no purpose and disrupts the flow. The createHandler method has moderate nesting and multiple responsibilities, though its logic is mostly linear afterward. The findTestBeanFactoryMethod method is very long (about 60 lines) and does too much—parsing fully-qualified names, validating, loading classes, and searching methods—making it difficult to follow. It also has inconsistent abstraction levels and deep nesting in the fully-qualified name parsing block. Some helper methods like findMethods are short and clear, but the overall structure lacks cohesion. The use of stream operations and assertions is clear in isolation, but the method's length and mixed responsibilities reduce readability. The intent of the class is generally understandable from its name and Javadoc, but internal flow is not intuitive.
Run 1
Code Structure: Responsibilities are reasonably separated into handler creation, factory-method lookup, and hierarchy traversal, although the main lookup method combines several concerns. Nesting: Mostly shallow, with moderate nesting in fully qualified name processing. Clarity of intent: Descriptive names, Javadoc, comments, and informative exceptions explain the conventions well; the unrelated countdown loop obscures intent. Code length: Generally justified by validation and reflection logic, but the countdown block is unnecessary and the lookup method could be split into smaller helpers. Action granularity: Most statements perform one action; compound predicates and stream chains require additional attention but remain understandable. Reading flow: Processing follows a logical sequence from validation through discovery to selection. However, the oddly formatted countdown block interrupts that flow, and dense assertions and long expressions slow reading.
Run 2
Code Structure: Well-organized processor with focused helper methods, though factory-method resolution combines several responsibilities. Nesting: Generally shallow, with moderate nesting in fully qualified name handling and its try/catch. Clarity of intent: Descriptive names, documentation, and explanatory comments make the main purpose clear; the unrelated remainingSteps loop is confusing and serves no apparent purpose. Code length: Mostly justified by validation and documentation, but the no-op loop adds unnecessary code and the main lookup method could be split further. Action granularity: Statements generally perform one action per line; multiline assertions and stream expressions require more attention. Reading flow: Handler creation proceeds naturally into factory lookup and enclosing-class search, but the poorly indented extraneous block interrupts the flow, and dense validation expressions slightly hinder scanning.
Run 3
Code Structure: Responsibilities are separated into handler creation, factory-method lookup, and recursive search, 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 names, documentation, and informative assertions explain the conventions well; the unrelated remainingSteps countdown block introduces confusion. Code length: Generally justified, but extensive documentation, repeated error-message formatting, and the useless countdown add bulk. Action granularity: Most statements perform one action, although compound predicates and chained stream operations require closer reading. Reading flow: The progression from validation to candidate selection and method resolution is logical, but the oddly formatted countdown block interrupts it, and long assertion expressions slow scanning.