Sample
int-4682d20b1569-I05
Rewrite eligible decimal integer literals in hexadecimal notation
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.851 | 0–1; higher is more readable |
| Dorn | 0.458 | 0–1; higher is more readable |
| Mi | 0.255 | 0–1; higher is more readable |
| LLOC | 16 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18.33 | 0–20; mean of three runs |
| BTTF | 0.531 | 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. | 1646.493 | −54.334 |
| Source linesThe number of non-empty source lines. | 73 | +29.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.851 | −7.276 |
Intercept 8.87 + feature contributions = -23.541 (log-odds).
Score = sigmoid(-23.541) = 0.
| Score | 0.851 |
|---|
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. | 74 | −1.584 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 43 | +0.75 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 90.622 | +0.658 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 72.861 | +0.609 |
| 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.959 | −0.569 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 43 | −0.566 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.049 | +0.464 |
Intercept 0.07 + feature contributions = -0.167 (log-odds).
Score = sigmoid(-0.167) = 0.458.
| Score | 0.255 |
|---|
| Score | 16 |
|---|
Run 1
The code is well-structured with clear separation of concerns, organized imports, and meaningful method grouping. Nesting is minimal except for a necessary try-catch in the initialize method. Intent is clearly expressed through descriptive method names, Javadoc comments, and focused helper functions. Code length is concise but not overly compressed; each method accomplishes its task efficiently. Action granularity follows one-action-per-line in most cases, particularly in the newProxy method where the proxy creation is broken into logical steps. Reading flow is natural—methods progress from simple operations to more complex ones, with appropriate documentation guiding the reader. Minor points: the use of hex literals (0x0) is slightly unconventional and could use plain zeros; the initialize method's catch block adds slight complexity. Overall, this is exemplary readable code, consistent with Google Guava style standards.
Run 2
The code is generally readable and well-structured. It uses clear method names, concise Javadoc comments, and flat logic with minimal nesting. Each method performs a single, well-defined action, and the reading flow is natural—from package name handling to class initialization and proxy creation. The private constructor and static imports are appropriate for a utility class. Minor issues include the use of hex literals (0x0) instead of plain 0, which slightly obscures intent, and a somewhat long Javadoc for initialize(). Additionally, the proxy creation line is relatively verbose, but still clear. Overall, the code is clean and maintainable.
Run 3
The code is highly readable. Structure is logical with clear utility class organization, static imports, and Javadoc documentation. Methods are flat with minimal nesting; only a simple loop and try-catch exist, both easy to follow. Intent is explicit in method names and documentation. Code is concise without being cryptic, especially the package-name extraction. Each line generally performs one action, particularly in the proxy creation. Reading flow is natural: package declaration, imports, class, then methods in logical order. Minor points: the hexadecimal literals (0x0) are slightly unusual but harmless; the initialize method's exception handling is a bit dense but still clear. Overall, excellent readability and maintainability.
Run 1
Code Structure: A well-organized utility class with focused methods, related overloads grouped together, and a private constructor. Nesting: Mostly flat; the loop containing try/catch in initialize is shallow and appropriate. Clarity of intent: Descriptive method and parameter names, explicit validation, and informative Javadoc make purposes clear. Hexadecimal 0x0 unnecessarily obscures ordinary zero values, and object is a generic local name. Code length: Implementations are concise; documentation is extensive but useful, with some repetition between overloads. Action granularity: Statements generally perform one clear action each, and the multiline proxy construction remains a single coherent operation. Reading flow: Consistent formatting and straightforward delegation, validation, construction, and return sequences support natural reading. Minor import-spacing and literal-style issues prevent a perfect score.
Run 2
Code Structure: Well-organized utility class with focused methods, adjacent overloads, and a private constructor. Nesting: Mostly flat; the loop with try/catch adds only modest, necessary nesting. Clarity of intent: Descriptive method names and detailed Javadoc clearly explain behavior; hexadecimal zero literals (0x0) are unnecessarily distracting, and 'object' is a generic variable name. Code length: Implementations are concise, though documentation is somewhat verbose and repetitive. Action granularity: Each statement performs a distinct step, with validation, proxy creation, and casting separated cleanly. Reading flow: Methods follow a natural sequence and formatting is consistent overall; missing blank lines between the package declaration and import groups slightly reduce visual separation.
Run 3
Code Structure: Well-organized utility class with focused methods and a private constructor. Nesting: Mostly flat; the loop and try/catch in initialize add only modest depth. Clarity of intent: Descriptive method names and thorough Javadoc make behavior clear, although hexadecimal zero literals are unnecessarily unusual and the local name object is generic. Code length: Implementations are concise; documentation is extensive but useful. Action granularity: Each statement performs a distinct operation, with validation, proxy creation, and casting separated. Reading flow: Related overloads are adjacent and methods follow a consistent layout. Minor distractions include missing spacing between package and imports and the awkward multiline proxy assignment.