Sample
int-ff58eaed0fae-I11
Split eligible integer literals into pairs of short-named intermediate variables
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.016 | 0–1; higher is more readable |
| Scalabrino | 0.907 | 0–1; higher is more readable |
| Dorn | 0.817 | 0–1; higher is more readable |
| Mi | 0.616 | 0–1; higher is more readable |
| LLOC | 27 | 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.578 | 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. | 1820.128 | −60.064 |
| Source linesThe number of non-empty source lines. | 136 | +54.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.88 | −7.319 |
Intercept 8.87 + feature contributions = -4.114 (log-odds).
Score = sigmoid(-4.114) = 0.016.
| Score | 0.907 |
|---|
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. | 137 | −3.814 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 82 | +2.099 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 135.793 | +1.488 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.043 | +0.519 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 80.92 | +0.501 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| 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. | 80.964 | +0.236 |
Intercept 0.07 + feature contributions = 1.498 (log-odds).
Score = sigmoid(1.498) = 0.817.
| Score | 0.616 |
|---|
| Score | 27 |
|---|
Run 1
The code is highly readable due to its clear structure, consistent formatting, and comprehensive Javadoc documentation. It uses flat nesting with only one level of synchronization, and each method performs a single logical action. Constructors are concise and delegate appropriately. The class follows Spring conventions, with fields clearly named and annotated for nullability. The use of a dedicated monitor object for synchronization is a good practice. Minor deductions: the empty constructor adds slight length, and the toString method could be marginally clearer, but overall the code is well-organized and easy to understand.
Run 2
This code is highly readable. The structure is logical: class declaration, fields, constructors, then setters, core logic, and helper class. Javadoc comments clearly explain intent for each public member. Nesting is minimal—only a synchronized block with a single if-statement. Methods are concise and perform one primary action per line. The reading flow is natural, with related methods grouped together and clear naming conventions. Minor deductions stem from slightly verbose import/package overhead and the serializable monitor field which could be further documented, but overall maintainability is excellent.
Run 3
The code is well-structured and highly readable. It follows clear package/import ordering, uses Javadoc consistently, and organizes fields, constructors, and methods logically. Nesting is minimal—only a single synchronized block and a conditional check. Intent is explicit through descriptive method names and meaningful Javadoc. Class and method lengths are appropriate; no unnecessary verbosity. Each line generally performs one action, improving comprehension. Reading flow is natural: fields, constructors, setters, core logic, helper methods, and a small inner class. Minor deductions include the slight redundancy in constructor overloads and the null-check block within getPointcut(), which could be slightly more concise, but these do not meaningfully impact readability. Overall, the code is a strong example of maintainable Spring-style Java.
Run 1
Code Structure: Fields, constructors, configuration methods, pointcut initialization, and supporting class are logically organized. Nesting: Most methods are flat; getPointcut has moderate nesting from synchronization and two conditional checks, but remains easy to follow. Clarity of intent: Descriptive names and thorough Javadoc clearly explain configuration, delegation, and lazy initialization. However, the fact that pattern changes after initialization do not update the existing pointcut is not explicit. Code length: Implementation methods are concise, though repetitive constructor documentation increases overall length. Action granularity: Statements generally perform one action per line, with clean separation of initialization steps. Reading flow: Consistent formatting and conventional ordering support natural reading; the multiline toString expression and specialized nullable-array syntax introduce only minor friction.
Run 2
Code Structure: Logically organized into fields, constructors, configuration methods, pointcut initialization, and a helper class. Nesting: Mostly flat; getPointcut has moderate nesting from synchronization and two conditional checks, but remains easy to follow. Clarity of intent: Descriptive names and detailed Javadoc clearly explain configuration, lazy initialization, and extension points. Code length: Implementation is concise, although repeated constructor documentation and generous spacing increase overall length. Action granularity: Statements generally perform one action per line; the multiline toString expression is straightforward. Reading flow: Consistent formatting and conventional member ordering support natural reading. Minor friction comes from framework-specific types, unusual array annotation placement, and the need to understand lazy initialization to follow when patterns are applied.
Run 3
Code Structure: Fields, constructors, configuration methods, initialization, and helpers are logically grouped. Nesting: Most methods are flat; getPointcut has moderate nesting from synchronization and two conditional checks, but remains easy to follow. Clarity of intent: Descriptive names and useful Javadoc clearly explain regex configuration, lazy initialization, and the extension point. Code length: Implementation is concise, though repetitive constructor documentation and generous spacing increase its visual length. Action granularity: Statements generally perform one action per line; the wrapped toString expression is still readable. Reading flow: Consistent formatting and a natural progression from construction to configuration and use support smooth reading. Minor friction comes from the unusual nullable-array annotation syntax and the need to understand inherited advisor behavior.