Sample
int-b50ebc1ce280-I01
Remove line comments, block comments, and Javadoc
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.738 | 0–1; higher is more readable |
| Dorn | 0.507 | 0–1; higher is more readable |
| Mi | 0.272 | 0–1; higher is more readable |
| LLOC | 16 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs |
| BTTF | 0.614 | 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. | 1061.18 | −35.019 |
| Source linesThe number of non-empty source lines. | 52 | +20.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.392 | −6.589 |
Intercept 8.87 + feature contributions = -11.938 (log-odds).
Score = sigmoid(-11.938) = 0.
| Score | 0.738 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 51 | +1.027 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 53 | −0.84 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| 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. | 95.943 | −0.399 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 51.814 | +0.314 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.07 | +0.26 |
Intercept 0.07 + feature contributions = 0.026 (log-odds).
Score = sigmoid(0.026) = 0.507.
| Score | 0.272 |
|---|
| Score | 16 |
|---|
Run 1
The code is well-structured with clear method separation and appropriate imports. Nesting is minimal, with only single-level conditionals in isTimeoutException. Intent is obvious from method names and error messages. The methods are concise and each performs a single logical action. Reading flow is natural and linear. Minor deductions: several blank lines between methods (lines 8-9, 17-21, 31-35) are excessive and disrupt visual rhythm; the duplicated else-block returning 'No controller appears to be active.' could be extracted as a helper or constant for DRYness. Overall, the code is highly readable and maintainable.
Run 2
The code is well-structured and highly readable. Methods are concise with clear purposes, and the logic flows naturally. Nesting is minimal, with early returns reducing complexity in isTimeoutException. Each line generally performs a single action, enhancing clarity. Naming is descriptive, and the separation of concerns between methods is logical. Minor deductions: some methods (newPreMigrationException, newWrongControllerException) contain duplicated 'No controller appears to be active' logic, which could be extracted for brevity, and the unused imports (TimeoutException, ExecutionException) are slightly misleading. The large comment block between methods creates unnecessary visual noise, slightly interrupting reading flow. Overall, the code is approachable and maintainable with a clean, flat structure.
Run 3
The code is generally clean and readable. Each method has a single, clear purpose, and the logic is straightforward with minimal nesting. The use of early returns in isTimeoutException keeps the code flat and avoids unnecessary indentation. The if-else blocks in the other methods are simple and easy to follow. However, the excessive vertical whitespace (large blank gaps between methods) disrupts the reading flow and adds unnecessary length. The absence of Javadoc or comments explaining method contracts slightly reduces clarity. Import ordering and style are conventional. Overall, the code is maintainable but could be improved by removing excessive blank lines and adding brief documentation.
Run 1
Code Structure: Three focused utility methods are logically organized, though excessive blank lines disrupt the layout. Nesting: Shallow conditionals and early returns keep complexity low. Clarity of intent: Descriptive method names, explicit exception types, and clear error messages make the purpose easy to understand. Code length: Implementations are concise, but redundant else branches after returns and repeated error messages add minor verbosity. Action granularity: Statements generally perform one action each; inline null checks slightly compress condition and return onto one line. Reading flow: Control flow is natural and straightforward, but inconsistent spacing, ungrouped imports, and large whitespace gaps reduce visual continuity.
Run 2
Code Structure: Three focused methods are logically organized, although excessive blank lines disrupt presentation. Nesting: Shallow conditionals and early returns make control flow easy to follow. Clarity of intent: Descriptive method names, explicit exception types, and clear messages communicate purpose well. Code length: The implementation is concise, but redundant else branches after returns and repeated inactive-controller messages add minor verbosity. Action granularity: Most lines perform one action; inline null checks combine a condition and return but remain understandable. Reading flow: Execution proceeds naturally within each method, though inconsistent whitespace and ungrouped imports reduce visual consistency.
Run 3
Code Structure: Three focused utility methods are logically organized, though excessive blank lines weaken visual cohesion. Nesting: Shallow conditionals and early returns keep complexity low. Clarity of intent: Descriptive method names, parameter names, and exception messages make each purpose clear. Code length: The implementation is concise, but redundant else branches after returns and repeated inactive-controller messages add minor duplication. Action granularity: Statements generally perform one action each; inline null-check returns slightly compress condition and action. Reading flow: Control flow is natural and easy to follow, but inconsistent whitespace and ungrouped imports interrupt scanning.