Sample
int-aade970569c2-I01
Remove line comments, block comments, and Javadoc
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.676 | 0–1; higher is more readable |
| Dorn | 0.563 | 0–1; higher is more readable |
| Mi | 0.59 | 0–1; higher is more readable |
| LLOC | 36 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.737 | 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. | 2903.683 | −95.822 |
| Source linesThe number of non-empty source lines. | 126 | +50.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.005 | −7.508 |
Intercept 8.87 + feature contributions = -44.059 (log-odds).
Score = sigmoid(-44.059) = 0.
| Score | 0.676 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 126 | +3.621 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 127 | −3.46 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 125.805 | +1.349 |
| 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. | 116.969 | −1.289 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.059 | +0.369 |
Intercept 0.07 + feature contributions = 0.253 (log-odds).
Score = sigmoid(0.253) = 0.563.
| Score | 0.59 |
|---|
| Score | 36 |
|---|
Run 1
The code achieves good readability through clear structure: fields grouped at top, simple getter/setter pairs, then unsupported operations grouped by category. Nesting is flat with no conditional complexity. Intent is clear—this is a mock implementation that throws UnsupportedOperationException for unsupported methods. Methods are concise with one action per line. Reading flow is logical. Minor deductions: inconsistent exception-message styles (some multiline, some single-line), excessive blank lines between import statements, and a few stray whitespace artifacts. The class is inherently repetitive due to interface implementation but remains easy to scan.
Run 2
The code is generally readable with clear structure and consistent formatting. It implements a mock ServerContainer with straightforward getter/setter methods and unsupported operation stubs. The class has a logical organization with fields at the top, followed by timeout methods, connection methods, and endpoint methods. Nesting is minimal and action granularity is appropriate. Reading flow is natural with clear method grouping. However, there are minor issues: excess blank lines between import statements and the class declaration, unused field indentation, and trailing whitespace in method parameters. The unsupported operation methods are repetitive but acceptable for a mock implementation. The import statements could be grouped more standardly, and some line breaks in method signatures feel unnecessary. Overall, the code follows Java conventions and maintains consistent naming and structure.
Run 3
The code has clear organization with a logical grouping of methods for connection vs endpoint operations, flat structure with minimal nesting, and good action granularity with one operation per line. The intent of each method is obvious through clear naming and consistent UnsupportedOperationException messages. However, there are some readability issues: multiple blank lines and stray whitespace/indentation inconsistencies between method groups; the class name 'MockServerContainer' could be more descriptive; and some methods have slightly inconsistent formatting for exception declarations. While the code is straightforward, the unnecessary whitespace and minor formatting inconsistencies prevent it from being excellent.
Run 1
Code Structure: Fields, configuration accessors, connection methods, and endpoint operations are logically grouped. Nesting: Methods are flat, with no nested control flow. Clarity of intent: The class name, descriptive fields, and explicit unsupported-operation messages clearly communicate a limited mock implementation. Code length: Methods are concise; interface-required overloads account for most repetition, though excessive blank lines add unnecessary visual length. Action granularity: Each statement performs one action, making behavior easy to scan. Reading flow: Consistent annotations, indentation, and method patterns support natural reading, slightly disrupted by irregular whitespace and long signatures. Overall, the code is highly readable with minor formatting issues.
Run 2
Code Structure: Fields, accessors, and unsupported operations are logically grouped. Nesting: Methods are flat, with no nested control flow. Clarity of intent: The class name, descriptive fields, and explicit exception messages clearly identify a limited mock implementation; abbreviations such as cec and sec are less descriptive. Code length: Interface-required boilerplate is reasonable, but excessive blank lines and repeated exception text add visual bulk. Action granularity: Each statement performs one straightforward action. Reading flow: Consistent method formatting and predictable accessor ordering make scanning easy, though uneven whitespace and long signatures slightly interrupt the flow.
Run 3
Code Structure: Logically groups configuration fields, accessors, and unsupported operations. Nesting: Completely flat method bodies make the code easy to scan. Clarity of intent: The class name, descriptive method names, and explicit exception messages clearly convey a limited mock implementation; abbreviated parameters such as cec and sec are slightly less clear. Code length: Methods are concise, though interface-required boilerplate and repeated exception messages add length. Action granularity: Each statement performs one action, with no compressed multi-action lines. Reading flow: Consistent annotations and predictable method ordering support natural reading, but excessive blank lines and inconsistent spacing create minor visual interruptions.