Sample
int-9a1ef64e65b9-I05
Rewrite eligible decimal integer literals in hexadecimal notation
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.744 | 0–1; higher is more readable |
| Dorn | 0.227 | 0–1; higher is more readable |
| Mi | 0.589 | 0–1; higher is more readable |
| LLOC | 53 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.337 | 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. | 4385.876 | −144.734 |
| Source linesThe number of non-empty source lines. | 156 | +62.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. | 5.008 | −7.513 |
Intercept 8.87 + feature contributions = -80.976 (log-odds).
Score = sigmoid(-80.976) = 0.
| Score | 0.744 |
|---|
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. | 157 | −4.523 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 141 | +4.14 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 141 | −2.815 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 155.928 | +1.77 |
| 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. | 109.968 | −0.993 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 109.955 | +0.97 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.081 | +0.152 |
Intercept 0.07 + feature contributions = -1.228 (log-odds).
Score = sigmoid(-1.228) = 0.227.
| Score | 0.589 |
|---|
| Score | 53 |
|---|
Run 1
The code is well-structured, with clear separation of methods and a single responsibility for each. The nesting level is minimal, with only a couple of synchronized blocks and simple conditionals. Intent is mostly clear, although the purpose of `dispatchHandlers` and the behavior in `addDispatchHandler` requires some domain knowledge. The code is appropriately concise for a mock implementation. Action granularity is good: each line generally performs one logical step, and method bodies are short. The use of `0xa * 0x3e8L` for the timeout is slightly obscure and hurts readability; a numeric literal or named constant would be clearer. The `start(Runnable)` method is trivial but expected for the interface. Overall, the code follows conventional Java structure and is easy to follow with a natural top-down flow.
Run 2
The code is well-structured with clear separation of concerns and consistent formatting. It follows standard Java conventions with proper package organization, logical method ordering, and clear field declarations. The nesting is minimal - only one level in the synchronized blocks and loops, maintaining flat, readable code. Each method has a single, clear purpose with descriptive names that convey intent well. The code is concise without being cryptic, though a few methods like addListener are trivially short. Action granularity is good - most lines perform single operations, though the complete() method could be slightly more decomposed. Reading flow is natural and progressive, with methods arranged logically. Minor deductions: the timeout initialization using hex (0xa * 0x3e8L) is slightly obscure compared to direct literal, and the dispatch(String) method's null context parameter could use a brief comment. Overall, this is exemplary Spring framework code that balances clarity with functionality effectively.
Run 3
The code is highly readable with clear structure and purpose. Each method serves a single responsibility, and the class is logically organized with fields, constructors, and methods grouped coherently. Nesting is minimal, with only one synchronized block and one conditional, keeping the flow flat. Action granularity is appropriate—most lines perform one operation, though the conditional in addDispatchHandler could be slightly clearer. Intent is explicit thanks to descriptive method names and a helpful Javadoc explaining the non-standard timeout default. Length is concise, avoiding unnecessary verbosity. Reading flow is natural, progressing from simple getters to more complex dispatch and listener logic. Minor deductions: the magic number `0xa * 0x3e8L` obscures the timeout value, and methods like addListener overloads simply ignore parameters without explanation, which could confuse readers.
Run 1
Code Structure: Well-organized fields, constructor, and small interface methods keep responsibilities distinct. Nesting: Mostly flat, with limited nesting in synchronization blocks and listener exception handling. Clarity of intent: Descriptive names, annotations, and documentation make the mock behavior clear; however, the hexadecimal timeout expression obscures a simple value, and ignored parameters are unexplained. Code length: Concise overall, with appropriate delegation and minimal duplication; the timeout documentation is somewhat lengthy. Action granularity: Statements generally perform one action per line, and the method reference clearly expresses handler execution. Reading flow: Consistent formatting and straightforward method implementations support natural reading, although imports lack grouping whitespace and field ordering could better group dispatch-related state.
Run 2
Code Structure: Well organized into fields, construction, dispatch operations, lifecycle methods, listener management, and timeout accessors. Nesting: Mostly flat, with modest nesting in synchronized dispatch handling and listener exception handling. Clarity of intent: Descriptive names, interface overrides, and documentation make the mock's purpose clear; the hexadecimal timeout expression unnecessarily obscures a simple default value, and ignored parameters lack explanation. Code length: Methods are concise and focused, though the timeout documentation is comparatively lengthy. Action granularity: Statements generally perform one action per line, with clear separation of validation, state changes, and callbacks. Reading flow: Consistent formatting and straightforward delegation support natural reading; closely related operations are mostly grouped, although dispatchHandlers could sit alongside the other dispatch-related field.
Run 3
Code Structure: Fields, construction, dispatch operations, listeners, and timeout accessors are logically organized into focused methods. Nesting: Mostly flat, with modest nesting in synchronization blocks and listener exception handling. Clarity of intent: Descriptive names, interface overrides, and nullability annotations make behavior clear; the hexadecimal timeout expression obscures a simple 10000 value, and unused parameters in mock implementations could benefit from explanation. Code length: Methods are concise, though the timeout documentation is comparatively lengthy and some overloads repeat behavior. Action granularity: Statements generally perform one action per line, making state changes and callbacks easy to follow. Reading flow: Consistent formatting and straightforward delegation support natural reading, although tightly packed imports, extra blank lines, and a long type-check expression slightly reduce visual polish.