Sample
int-7f6e4d6d6c09-I01
Remove line comments, block comments, and Javadoc
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.125 | 0–1; higher is more readable |
| Dorn | 0.035 | 0–1; higher is more readable |
| Mi | 0.076 | 0–1; higher is more readable |
| LLOC | 49 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 13.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15 | 0–20; mean of three runs |
| BTTF | 0.34 | 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.077 | −7.616 |
Intercept 8.87 + feature contributions = -187.657 (log-odds).
Score = sigmoid(-187.657) = 0.
| Score | 0.125 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 159 | +4.763 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 160 | −4.629 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 159 | −3.228 |
| 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. | 0 | −0.804 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.112 | −0.151 |
Intercept 0.07 + feature contributions = -3.33 (log-odds).
Score = sigmoid(-3.33) = 0.035.
| Score | 0.076 |
|---|
| Score | 49 |
|---|
Run 1
The code is generally readable but has significant issues with its structure and length. The main method `findTestBeanFactoryMethod` is overly long, mixing multiple concerns like parsing qualified names, validating method signatures, and finding candidates. This reduces clarity and action granularity. Nesting is moderate but becomes deep in conditional blocks. The reading flow is disrupted by scattered blank lines and dense expressions. Some parts are clear, such as the initial annotation conversion and the use of descriptive assertions. However, the logic for handling method names and filtering is tangled, making intent harder to follow. The recursive helper `findMethods` is concise and clear, but the longer method overwhelms the overall readability. More extraction into smaller, focused methods would improve the score significantly.
Run 2
The code shows moderate readability. The class has a clear single responsibility (processing @TestBean overrides) and methods are logically organized. However, the findTestBeanFactoryMethod method is complex with multiple nested conditionals and lengthy validation logic, making it harder to follow. The method handles multiple concerns: parsing fully-qualified names, finding methods, validation of uniqueness, and error messaging. Some lines are very long with chained boolean conditions (>100 chars), reducing scanability. Action granularity is mixed - some lines do multiple things with && chains in conditions. The blank comments (empty comment blocks) add clutter. While naming is generally descriptive and the intent is understandable, the two similar method overloads and dense method body create nesting that could be flattened. The code would benefit from extracting smaller helper methods for validation and name parsing to improve clarity.
Run 3
The code has a clear overall structure with sensible method separation and consistent naming. However, readability suffers from several issues: the main 'findTestBeanFactoryMethod' is overly long and handles multiple responsibilities (resolving fully-qualified names, validating static methods, filtering candidates). There is deep nesting in the for-loop with multiple try-catch blocks and conditional assertions. The method uses a mutable 'originalNames' set that is modified during iteration, making intent harder to trace. The large gaps of blank lines break reading flow without adding clarity. Multiple assertion statements with complex boolean conditions reduce clarity of intent. While the parameterized helper methods and use of 'MethodFilter' show good abstraction, the overall granularity and length of the main method make it hard to quickly understand the logic.
Run 1
Code Structure: Handler creation, factory-method lookup, and recursive discovery are logically separated, though the main lookup method combines several responsibilities. Nesting: Mostly shallow, with moderate nesting in the loop handling qualified method names and its try/catch. Clarity of intent: Descriptive names, explicit validation, and informative error messages make the purpose clear; reflection and mutable candidate sets require closer attention. Code length: Generally purposeful, but excessive blank lines and a lengthy lookup method reduce concision. Action granularity: Most lines perform one action; compound predicates and chained stream operations are denser but conventional. Reading flow: Processing follows a natural sequence from annotation validation to method discovery and handler construction, although large whitespace gaps and multiline assertions interrupt scanning.
Run 2
Code Structure: Responsibilities are logically separated into handler creation, factory-method resolution, and recursive lookup, though the main resolution method handles several concerns. Nesting: Mostly shallow, with moderate nesting in the loop that resolves fully qualified names and its try/catch. Clarity of intent: Descriptive identifiers, explicit validation, and informative error messages communicate purpose well; reflection and method-selection rules require closer reading. Code length: Generally economical, but excessive blank lines inflate the listing, and the resolution method could benefit from extracting external-method lookup. Action granularity: Most statements perform one action; compound predicates and stream chains remain reasonably readable. Reading flow: Execution follows a natural progression from configuration through discovery and validation to handler construction, but irregular whitespace and wrapped assertions interrupt scanning.
Run 3
Code Structure: Responsibilities are logically separated into handler creation, factory-method lookup, and recursive discovery, though the main lookup method combines several concerns. Nesting: Mostly shallow, with moderate nesting in the loop handling fully qualified method names and its try/catch. Clarity of intent: Descriptive identifiers, explicit validation, and informative error messages make the purpose clear; reflection and mutable candidate sets require closer reading. Code length: Generally economical, but excessive blank lines and a lengthy lookup method reduce readability. Action granularity: Most statements perform one action, although compound predicates and chained stream operations pack several checks or transformations together. Reading flow: Processing follows a natural sequence from annotation validation to method selection and handler construction, but large whitespace gaps and wrapped assertions interrupt scanning.