Sample
int-e6b7dda05ba0-I12
Inline all eligible single-use intermediate local variables
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 | 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 well-structured and highly readable. The class follows a clear logical organization with fields, constructor, and methods grouped logically. It maintains a flat structure with minimal nesting, only using one level inside synchronized blocks and loops. Each method has a single, clear purpose, and the action granularity is appropriate—most lines perform one operation. The reading flow is natural, with methods following a sensible order. The code is concise without being overly compressed; methods are appropriately sized. Naming is clear and descriptive, and the use of annotations and nullability markers adds clarity. Minor deductions: the getListeners method exposes internal state directly, and the addListener method ignores its parameters, which could confuse readers. Overall, this is exemplary Spring framework code demonstrating good practices, clear intent, and maintainable structure.
Run 3
The code is well-structured, with clear separation of fields, constructor, and methods, and follows consistent naming conventions. Nesting is minimal—only a few synchronized blocks and a single if/else. Intent is generally clear, with descriptive method names and a helpful Javadoc explaining the non-standard timeout default. Code length is appropriate; methods are concise and focused. Action granularity is good, with one logical operation per line in most cases. Reading flow is natural, progressing from fields to constructor to core async lifecycle methods, followed by utility methods. Minor deductions: the dispatch methods create slight redundancy, and the synchronized block in addDispatchHandler could be simplified. Overall, this is highly readable code with only minor areas for improvement.
Run 1
Code Structure: Well-organized class with clearly separated fields, constructors, and focused interface methods. Nesting: Mostly flat; synchronization, conditionals, and listener exception handling introduce only modest nesting. Clarity of intent: Descriptive names, overrides, nullability annotations, and documentation make the mock's purpose clear. However, ignored parameters in dispatch and addListener, plus synchronous execution in start, could benefit from brief explanations of mock-specific behavior. Code length: Concise overall, with justified interface boilerplate; timeout documentation is somewhat lengthy relative to the implementation. Action granularity: Statements generally perform one action per line, and delegation keeps methods focused. Reading flow: Consistent formatting and straightforward method bodies support natural reading, though imports lack visual grouping and related dispatch methods are separated by 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, explicit overrides, and timeout documentation make the mock's purpose clear. However, ignored context and listener request/response parameters, plus synchronous start execution, could benefit from brief explanatory comments. Code length: Concise overall; repetitive accessors and overloads are largely required by the interface. Action granularity: Statements generally perform one action per line, and the method reference expresses handler execution cleanly. Reading flow: Consistent formatting and straightforward delegation support natural reading, though the dense import block and a few long lines slightly reduce scanability.
Run 3
Code Structure: Clearly organized fields, constructor, and focused interface methods; dispatch overloads delegate consistently. Nesting: Mostly flat, with modest nesting limited to synchronization, conditionals, and listener exception handling. Clarity of intent: Descriptive names, annotations, and straightforward implementations make the mock's purpose clear, though ignored parameters and synchronous execution of asynchronous operations could use brief explanations. Code length: Appropriately concise overall; interface boilerplate and detailed timeout documentation add length but remain useful. Action granularity: Statements generally perform one action per line, and the method reference expresses handler execution compactly. Reading flow: Consistent formatting and predictable method progression support easy scanning, although unseparated imports and extra blank lines slightly reduce polish.