Sample
int-f5c965f13765-I01
Remove line comments, block comments, and Javadoc
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.692 | 0–1; higher is more readable |
| Dorn | 0.859 | 0–1; higher is more readable |
| Mi | 0.732 | 0–1; higher is more readable |
| LLOC | 53 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.617 | 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. | 3874.457 | −127.857 |
| Source linesThe number of non-empty source lines. | 146 | +58.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. | 4.622 | −6.933 |
Intercept 8.87 + feature contributions = -67.52 (log-odds).
Score = sigmoid(-67.52) = 0.
| Score | 0.692 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 146 | +4.313 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 147 | −4.168 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 145.437 | +1.623 |
| 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. | 69.973 | +0.701 |
| 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.13 | −0.324 |
Intercept 0.07 + feature contributions = 1.808 (log-odds).
Score = sigmoid(1.808) = 0.859.
| Score | 0.732 |
|---|
| Score | 53 |
|---|
Run 1
This code is a textbook example of the Delegation pattern, exhibiting excellent clarity and structure. The inheritance hierarchy is logical, the class is abstract, and the 'delegate()' method is clearly defined. There is no nesting, and every method follows a consistent, terse one-line action of forwarding the call. The reading flow is highly organized, logically grouping related methods (nodes, edges, degree, connectivity). The intent is unambiguous: this class forwards all operations to a delegate, reducing boilerplate in subclasses. While the code is repetitive, this verbosity is necessary for the proxy design and contributes to its predictability. Minor deductions relate to the slight redundancy and the lack of JavaDoc, which could explain the pattern, but the code itself is highly readable.
Run 2
This forwarding/decorator class is highly readable. Structure is logical and consistent: a single abstract delegate() method followed by uniformly implemented overrides. Nesting is essentially flat—each method body is a one-line delegation. Intent is unmistakable; it transparently forwards all Network operations. Code length is appropriate for the number of interface methods, though slightly repetitive by necessity. Action granularity is ideal: one action per line. Reading flow is natural, grouping related methods (nodes/edges, adjacency, degree, connection queries). Minor deductions: the unused Optional import and excessive blank lines after the package declaration slightly detract from polish. Overall, an exemplary use of the forwarding pattern with clear, predictable code.
Run 3
The code is highly readable due to its flat, consistent structure. Each method is a single-line delegation to an abstract 'delegate()', making intent immediately clear. There is no deep nesting or branching logic, and the method ordering follows a natural, logical progression (nodes, edges, properties, adjacency, degree, edge connectivity). While the class is somewhat long, the repetition is necessary for a forwarding wrapper and is not wasteful. One minor deduction is for the unused/extra blank lines after imports, but this does not materially affect readability. Overall, it is an excellent example of a simple, predictable forwarding pattern.
Run 1
Code Structure: Logically organized forwarding class with consistent method definitions and related overloads grouped together. Nesting: Flat, with no conditional or loop nesting. Clarity of intent: The class name, delegate() method, and direct forwarding calls make its purpose clear. Code length: Long overall due to necessary interface forwarding boilerplate, but each method is concise; excessive blank lines before the class add avoidable whitespace. Action granularity: Each method contains one return statement performing a single forwarding action. Reading flow: Consistent formatting and predictable delegation make the code easy to scan, though repetition slightly increases navigation effort.
Run 2
Code Structure: Methods are consistently organized by network properties, adjacency, degrees, and connectivity, with related overloads together. Nesting: Completely flat method bodies with no conditional or loop nesting. Clarity of intent: The class name, delegate() abstraction, and uniform forwarding calls clearly communicate its purpose. Code length: Each method is minimal; the overall length reflects necessary forwarding boilerplate rather than complex logic, although excessive blank lines before the class are unnecessary. Action granularity: Every method contains a single return statement, keeping actions easy to follow. Reading flow: Consistent formatting, descriptive names, and predictable method patterns make scanning straightforward. Minor whitespace clutter prevents a perfect score.
Run 3
Code Structure: Logically organized forwarding methods, with related operations and overloads grouped together. Nesting: Flat method bodies with no conditional or loop nesting. Clarity of intent: The class name, delegate() method, descriptive method names, and consistent forwarding pattern clearly communicate purpose. Code length: Each method is minimal; the overall repetition is appropriate for implementing the network interface rather than unnecessary complexity. Excessive blank lines before the class slightly detract from concision. Action granularity: Each method contains one return statement, keeping actions distinct and easy to inspect. Reading flow: Consistent annotations, indentation, spacing, and method ordering make the code predictable and easy to scan.