Sample
int-b7349a111c7f-I01
Remove line comments, block comments, and Javadoc
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.432 | 0–1; higher is more readable |
| Dorn | 0.072 | 0–1; higher is more readable |
| Mi | 0.473 | 0–1; higher is more readable |
| LLOC | 38 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 15.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16.67 | 0–20; mean of three runs |
| BTTF | 0.457 | 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. | 3763.655 | −124.201 |
| Source linesThe number of non-empty source lines. | 107 | +42.8 |
| 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.917 | −7.376 |
Intercept 8.87 + feature contributions = -79.907 (log-odds).
Score = sigmoid(-79.907) = 0.
| Score | 0.432 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 107 | +2.964 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 108 | −2.788 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 107 | −2.034 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 106.841 | +1.084 |
| 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. | 111.981 | −1.078 |
| 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.094 | +0.03 |
Intercept 0.07 + feature contributions = -2.557 (log-odds).
Score = sigmoid(-2.557) = 0.072.
| Score | 0.473 |
|---|
| Score | 38 |
|---|
Run 1
The code is generally well-structured with clear class and method responsibilities. It follows Spring conventions with useful assertions for validation, contributing to predictable error handling. However, readability is slightly reduced by excessive blank lines between methods and within the class body, making the file feel disjointed. The generate method's length is acceptable, but the varargs flattening logic within doGenerate makes for dense conditional branching — it might read better is isolated in a named helper method. The dual constructors and nullable target strategy are clearly handled, but the 'No key generator' assertion duplication adds minor clutter. Overall intent is clear, with reasonable method lengths and flat nesting.
Run 2
The code is generally well-structured and follows consistent patterns, but it has several readability issues. There are excessive blank lines between members, which disrupts visual flow. The class does not implement the interface it claims to adapt (missing 'implements' keyword in the class declaration), which is confusing. The generate() method has moderate nesting but could be simplified. Multiple null checks and Assert statements create some noise. The doGenerate() method mixes varargs handling logic inline, making it harder to follow. Variable naming is clear, and method purposes are mostly evident, but the overall organization could be tighter. Action granularity is reasonable, with one logical operation per line mostly maintained. The code would benefit from removing unnecessary blank lines, extracting the varargs logic, and perhaps using Optional or cleaner null handling.
Run 3
The code is well-structured with clear separation of concerns: constructors, accessor methods, and utility methods are logically organized. Nesting is minimal, with only one conditional branch in the generate method and a single if-else inside doGenerate, keeping the code flat and readable. Intent is clear—adapting two key generator interfaces—with descriptive method and variable names. Code length is appropriate for the functionality, though there are multiple blank lines that slightly disrupt flow. Action granularity is good; most lines perform a single, meaningful operation. Reading flow is natural, moving from construction to target access to key generation and finally helper methods. Minor readability improvements could include tightening the excessive blank lines and consistent field initialization, but overall the code is highly readable and maintainable.
Run 1
Code Structure: Well-organized adapter with constructors, public methods, and focused private helpers; excessive blank lines weaken presentation. Nesting: Shallow overall, with only a loop containing an if/else. Clarity of intent: Descriptive names and explicit validation make generator delegation clear; varargs flattening and the unchecked cast require some framework knowledge. Code length: Mostly concise, though constructor validation is duplicated and whitespace unnecessarily extends the listing. Action granularity: Statements generally perform one action per line, with readable intermediate variables. Reading flow: Methods progress naturally from initialization to delegation and context creation; the multiline condition and surplus spacing slightly interrupt scanning.
Run 2
Code Structure: Logically organized into constructors, delegation methods, and focused helpers, with minor constructor duplication. Nesting: Shallow overall; only the parameter-processing loop contains a nested conditional. Clarity of intent: Descriptive class, method, and variable names make the adapter purpose clear, though nullable alternative delegates and the unchecked cast require some interpretation. Code length: Implementation is reasonably concise, but excessive blank lines unnecessarily lengthen the presentation. Action granularity: Each statement performs a distinct action, with no crowded multi-statement lines. Reading flow: Validation, context creation, and delegation follow a natural sequence; inconsistent spacing and the compound varargs condition slightly interrupt readability.
Run 3
Code Structure: Well-organized adapter with constructors, public methods, and focused helpers; duplicated constructor validation is minor. Nesting: Shallow overall, with only a loop containing a conditional. Clarity of intent: Descriptive class, method, and variable names communicate delegation and key generation clearly, though the mutually exclusive nullable generators and unchecked cast require some inference. Code length: Functional code is reasonably concise, but excessive blank lines unnecessarily expand the listing. Action granularity: Statements generally perform one action per line; the final delegation expression combines several straightforward calls. Reading flow: Validation, context creation, and delegation follow a natural sequence, while irregular whitespace and the wrapped varargs condition slightly interrupt scanning.