Sample
int-7d83afcf52da-I05
Rewrite eligible decimal integer literals in hexadecimal notation
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.692 | 0–1; higher is more readable |
| Dorn | 0.752 | 0–1; higher is more readable |
| Mi | 0.705 | 0–1; higher is more readable |
| LLOC | 53 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 18 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.601 | 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.667 | −7.001 |
Intercept 8.87 + feature contributions = -67.588 (log-odds).
Score = sigmoid(-67.588) = 0.
| Score | 0.692 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 147 | −4.168 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 113 | +3.171 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 145.554 | +1.625 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 99.946 | +0.808 |
| 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. | 99.966 | −0.569 |
| 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.12 | −0.224 |
Intercept 0.07 + feature contributions = 1.111 (log-odds).
Score = sigmoid(1.111) = 0.752.
| Score | 0.705 |
|---|
| Score | 53 |
|---|
Run 1
The code is highly readable. It follows a consistent, repetitive delegation pattern with a clear structural organization: each method is short, has one clear action per line, and simply forwards to a delegate. Nesting is completely flat, with no conditional logic or loops. Clarity of intent is excellent, as the class name, Javadoc, and method names explicitly convey the purpose of each delegate method. The code length is appropriate for its purpose, avoiding unnecessary verbosity while maintaining completeness. Reading flow is natural and predictable, grouped logically by related functionalities. The only minor deduction is the absence of inline comments for individual methods, but the uniformity of the pattern makes this unnecessary.
Run 2
The code is highly readable due to its clear structure and consistent pattern. Each method has a single responsibility, delegating to the underlying Network implementation with one action per line. The flat structure avoids deep nesting, and the natural reading flow follows the Network interface's logical grouping. Method names clearly express intent, and the Javadoc provides context for the class's purpose. The code is concise with minimal boilerplate, though the repetitive delegation pattern slightly reduces the score. Overall, this is an excellent example of clean, maintainable code.
Run 3
This is a textbook example of a forwarding/decorator pattern with excellent readability. The code structure is highly organized, with each public API method cleanly delegating to the underlying implementation. There is no nesting beyond the class itself, and each method body is a single clear statement. The intent is immediately obvious: every method forwards to the delegate. Action granularity is perfect—one method call and one return per method. Reading flow is natural, with methods logically grouped by related functionality (nodes, edges, adjacency, degree, connectivity). The only minor deductions are for the slight verbosity of the boilerplate nature of the forwarding pattern itself and the lack of inline comments explaining why certain methods exist, though the class-level Javadoc addresses the purpose well. Overall, this is highly maintainable and readable code.
Run 1
Code Structure: Logically organized forwarding methods, with related operations and overloads grouped together. Nesting: Minimal nesting; every implementation is a simple return statement. Clarity of intent: The class documentation, delegate() abstraction, descriptive method names, and @Override annotations make its forwarding purpose explicit. Code length: Long overall due to repetitive interface coverage, but each method is concise and the boilerplate is justified. Action granularity: Each statement performs one clear forwarding operation, with no unrelated actions combined. Reading flow: Consistent formatting and predictable method bodies make scanning easy. Minor drawbacks are the repetitive length and missing blank line between the package declaration and imports.
Run 2
Code Structure: Well-organized forwarding class with logically grouped methods and adjacent overloads. Nesting: Flat method bodies with no nested control flow. Clarity of intent: The class documentation, descriptive method names, and consistent delegate() calls clearly communicate its purpose. Code length: The class is long due to necessary forwarding boilerplate, but each method is minimal; repetition slightly increases scanning effort. Action granularity: Each method contains one straightforward return statement, without combining unrelated actions. Reading flow: Consistent formatting, annotations, and predictable implementation patterns make the code easy to follow.
Run 3
Code Structure: Cleanly organized around a single delegation pattern, with related operations and overloads grouped together. Nesting: Flat method bodies with no conditionals or loops. Clarity of intent: The class name, documentation, descriptive method names, and consistent forwarding calls make the purpose explicit. Code length: Long overall because of necessary forwarding boilerplate, but each method is minimal; repetition slightly reduces scanning efficiency. Action granularity: Each method contains one return statement performing a single forwarding operation. Reading flow: Consistent formatting, annotations, spacing between methods, and predictable ordering make the code easy to follow.