Sample
int-55eee861f683-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.744 | 0–1; higher is more readable |
| Dorn | 0.226 | 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.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.474 | 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. | 4371.314 | −144.253 |
| 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.009 | −7.513 |
Intercept 8.87 + feature contributions = -80.496 (log-odds).
Score = sigmoid(-80.496) = 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.91 | +1.769 |
| 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.229 (log-odds).
Score = sigmoid(-1.229) = 0.226.
| Score | 0.589 |
|---|
| Score | 53 |
|---|
Run 1
The code is well-structured, with clear separation of concerns and consistent naming conventions. Methods are concise and focused, generally performing a single action or a small set of related actions. Nesting is minimal, limited to simple conditional blocks and loops. Intent is clear from method names and field declarations. The only minor issues are the use of synchronized blocks in a few methods, which slightly interrupt the reading flow, and the complete() method which catches IOException and wraps it in an IllegalStateException, adding a small layer of complexity. Overall, it is highly readable and maintainable.
Run 2
The code is highly readable with clear structure and intent. It follows a logical organization with fields, constructor, then methods grouped by functionality. Nesting is minimal, with only one synchronized block and a simple loop containing a try-catch. Each method performs a single, well-defined action, and variable names are descriptive. The methods are concise and follow a natural reading flow. Minor deductions: the dispatch() method with three overloads could be slightly simplified, and the Javadoc on setTimeout is quite long. Overall, this is excellent, maintainable code that adheres to clean code principles.
Run 3
The code is well-structured with clear separation of fields, constructors, and methods. It follows consistent naming conventions and maintains a flat structure with minimal nesting. Intent is evident from method names and the single additional comment explains the non-standard timeout default. Most methods are concise, performing one logical action per line, and the synchronized block in addDispatchHandler is clear. Reading flow is natural as methods are grouped logically. Minor deductions: the dispatch(context, path) method ignores the context parameter without comment, and addListener overloads simply add to a list without null checks, which could be slightly ambiguous. Overall highly readable.
Run 1
1. Code Structure: Fields, constructor, and small interface methods are logically organized with clear separation. 2. Nesting: Mostly flat; synchronization with conditionals and the listener loop with exception handling introduce only modest nesting. 3. Clarity of intent: Descriptive names, annotations, and documentation make the mock's purpose clear. However, ignored parameters in dispatch and addListener, and synchronous execution in start, could benefit from brief explanations. 4. Code length: Methods are concise and avoid duplication through delegation; timeout documentation is lengthy but useful. 5. Action granularity: Statements generally perform one action per line, with straightforward assignments and calls. 6. Reading flow: Consistent formatting and simple control flow support easy reading, though imports lack grouping and related dispatch methods are separated by request accessors.
Run 2
Code Structure: Fields, constructor, and focused interface methods are logically organized, with dispatch overloads grouped together. Nesting: Mostly flat; synchronization and listener exception handling introduce only modest nesting. Clarity of intent: Descriptive names, annotations, and documentation make the mock's purpose clear, although ignored parameters and synchronous execution of async operations could use brief explanations. Code length: Concise overall; repetitive accessors and overloads are appropriate for implementing the interface, while timeout documentation is somewhat lengthy. Action granularity: Statements generally perform one action per line, and delegation keeps methods focused. Reading flow: Consistent formatting and straightforward control flow make the class easy to follow. Minor weaknesses include densely grouped imports, a long boolean expression, and limited explanation of mock-specific behavior.
Run 3
Code Structure: Fields, constructor, and focused interface methods are logically organized, with clear separation of responsibilities. Nesting: Mostly flat; synchronization with conditionals and the listener loop with exception handling introduce only modest nesting. Clarity of intent: Descriptive names, interface overrides, and timeout documentation make the mock's purpose clear. However, ignored parameters and synchronous execution of asynchronous operations could benefit from explanatory comments. Code length: Methods are concise and appropriate for the interface; some boilerplate and extensive timeout documentation add length without substantially hindering readability. Action granularity: Statements generally perform one action per line, and delegation is straightforward. Reading flow: Consistent formatting and simple dispatch overloads support natural reading, though tightly packed imports and extra blank lines slightly weaken visual organization.