Sample
int-79d8f6dc2a96-I01
Remove line comments, block comments, and Javadoc
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.519 | 0–1; higher is more readable |
| Dorn | 0.123 | 0–1; higher is more readable |
| Mi | 0.277 | 0–1; higher is more readable |
| LLOC | 35 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs |
| BTTF | 0.435 | 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. | 3171.581 | −104.662 |
| Source linesThe number of non-empty source lines. | 93 | +37.2 |
| 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.819 | −7.228 |
Intercept 8.87 + feature contributions = -65.821 (log-odds).
Score = sigmoid(-65.821) = 0.
| Score | 0.519 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 93 | +2.48 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 94 | −2.292 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 93 | −1.713 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 92.86 | +0.888 |
| 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.135 | −0.366 |
| 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. | 91.989 | −0.231 |
Intercept 0.07 + feature contributions = -1.969 (log-odds).
Score = sigmoid(-1.969) = 0.123.
| Score | 0.277 |
|---|
| Score | 35 |
|---|
Run 1
The code is generally well-structured and readable. It has a clear class hierarchy, logical method organization, and good naming conventions. The nesting is minimal (max 2-3 levels), and action granularity is mostly one operation per line. The intent is clear through method names like predecessorsOrEmpty and successorsOrEmpty, which handle edge type filtering elegantly. The size() calculation is slightly complex but well-commented with the ternary operator. Minor readability improvements could include extracting the self-loop counting logic into a helper method and adding Javadoc for the private helper methods. The contains() method handles both directed and undirected cases cleanly with early returns. Overall, the code demonstrates good practices with immutable returns, type checking, and clear separation of concerns.
Run 2
The code is well-structured with clear separation of concerns, using a base class and enums to model edge types. Methods are short, focused, and mostly flat. Naming is clear and intent is easy to follow. Some minor weaknesses: the size() and contains() methods contain moderately complex boolean logic and conditional expressions, which slightly reduce readability. But overall the code is concise, avoids deep nesting, and follows a natural reading flow. Helper methods reduce repetition. The score reflects strong readability with minor complexity in a few methods.
Run 3
The code is generally clear and well-structured, with a sensible class hierarchy and helper methods that improve readability. Nesting is mostly flat, and the intent of methods like `contains()` and `size()` is understandable. However, the `contains()` method has some complex multi-line boolean expressions that reduce clarity. Action granularity is good overall, but the conditional arithmetic in `size()` (subtracting 1 when the node is its own predecessor) is a bit terse and would benefit from a comment or a named boolean variable. The `predecessorsOrEmpty` and `successorsOrEmpty` helper methods reduce duplication nicely. The empty comments and inconsistent spacing are minor issues. Overall, it is readable but could be improved with small refactors for the trickier logic.
Run 1
Code Structure: Fields, enum, constructor, overrides, and helper methods are logically organized. Nesting: Shallow conditionals and early returns keep complexity manageable. Clarity of intent: Descriptive names make edge-direction filtering understandable, but the self-loop adjustment in size() would benefit from a brief explanation. Code length: Generally concise, though repeated helper calls, redundant else blocks, and excessive blank lines add minor clutter. Action granularity: Statements mostly perform one action per line; compound return expressions are appropriately split across lines. Reading flow: Methods follow a natural progression, and helpers encapsulate direction checks well. Dense boolean expressions and the size calculation require some careful reading, slightly reducing overall readability.
Run 2
Code Structure: Fields, enum, constructor, overrides, and private helpers are logically organized with clear responsibilities. Nesting: Shallow conditionals and early returns keep complexity manageable. Clarity of intent: Descriptive names make incident-edge membership and direction filtering understandable, though the self-loop subtraction in size() would benefit from a brief explanation. Code length: Mostly concise; repeated helper calls and unnecessary else blocks add minor verbosity. Action granularity: Statements generally perform one action per line, while compound return expressions remain reasonably formatted. Reading flow: Type validation precedes graph-specific membership checks naturally, but excessive blank lines interrupt the flow. Overall, the code is readable with minor formatting and explanatory improvements needed.
Run 3
Code Structure: Well-organized class with focused methods and helpers separating edge-direction filtering. Nesting: Shallow conditionals and early validation returns keep complexity low. Clarity of intent: Descriptive names and the EdgeType enum communicate purpose, though the self-loop subtraction in size() requires interpretation. Code length: Generally concise, but repeated helper calls, explicit else branches after returns, and excessive blank lines add minor clutter. Action granularity: Statements generally perform one action per line; compound return expressions are sensibly formatted but require some mental parsing. Reading flow: Fields, enum, constructor, public methods, and private helpers follow a natural order. Inconsistent whitespace slightly interrupts otherwise smooth reading.