Sample
int-84a6c92a7182-I08
Select one of ten high-readability unrelated code templates per class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.902 | 0–1; higher is more readable |
| Dorn | 0.387 | 0–1; higher is more readable |
| Mi | 0.616 | 0–1; higher is more readable |
| LLOC | 31 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 12 | 0–20; mean of three runs |
| GPT-6.1 Sol | 15.67 | 0–20; mean of three runs |
| BTTF | 0.481 | 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. | 2059.138 | −67.952 |
| Source linesThe number of non-empty source lines. | 143 | +57.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.892 | −7.339 |
Intercept 8.87 + feature contributions = -9.22 (log-odds).
Score = sigmoid(-9.22) = 0.
| Score | 0.902 |
|---|
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. | 144 | −4.062 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 89 | +2.341 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 89 | −1.621 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 142.805 | +1.586 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 80.868 | +0.5 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.046 | +0.491 |
| 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.972 | +0.236 |
Intercept 0.07 + feature contributions = -0.459 (log-odds).
Score = sigmoid(-0.459) = 0.387.
| Score | 0.616 |
|---|
| Score | 31 |
|---|
Run 1
The code is generally well-structured and readable, with clear class-level Javadoc and method-level documentation. It follows Spring conventions with flat nesting and clear intent. However, a significant issue is a confusing dead-code block inside setPatterns() that toggles a local boolean variable without any effect, which interrupts reading flow and obscures intent. The field declarations contain partial type annotations ('String @Nullable []' and '@Nullable AbstractRegexpMethodPointcut'), which may slightly reduce readability but are acceptable in modern Java. Methods are concise, action granularity is good, and the synchronization logic is straightforward. Overall, the code is maintainable, but the dead block and minor annotation style prevent a higher score.
Run 2
The code is generally well-structured with clear class-level documentation and logical method organization, but it contains a significant readability issue: an unrelated dead code block inside setPatterns (a pointless loop toggling a boolean) that breaks flow and confuses intent. The class uses shallow nesting and mostly one action per line, but the dead block adds unnecessary length and ambiguity. Other minor issues include a blank constructor that could be omitted, and slightly dense toString concatenation. Overall, the code is mostly maintainable but the dead code and minor clutter reduce clarity.
Run 3
The code is generally well-structured with logical organization, clear naming, and appropriate documentation, but it contains a significant issue: a dead-code block with meaningless toggling logic inside setPatterns. This unreachable feature toggling code adds confusion and violates clarity of intent. Nesting is mostly flat, except the odd nested braces, which disrupts reading flow. Action granularity is good — most lines perform one logical action. However, the pointless iteration loop is unnecessarily long and unrelated to the method’s purpose. The class overall is readable and easy to follow, but the inserted dead code significantly lowers its score.
Run 1
Code Structure: Fields, constructors, configuration methods, and pointcut creation are logically organized, but an unrelated toggle block disrupts setPatterns. Nesting: Most methods are flat; synchronized lazy initialization has moderate, understandable nesting, while the extra block and loop are unnecessary. Clarity of intent: Descriptive names and Javadoc clearly explain the advisor, but featureEnabled is repeatedly toggled and never used, creating confusion. Code length: Methods are concise, though repetitive constructor documentation and dead toggle logic add avoidable length. Action granularity: Statements generally perform one action per line. Reading flow: Consistent ordering and formatting support natural reading, except for the abruptly inserted, inconsistently indented block in setPatterns.
Run 2
Code Structure: Fields, constructors, configuration methods, and pointcut creation are logically organized, but an unrelated toggle block disrupts setPatterns. Nesting: Most methods are flat; getPointcut has moderate nesting for synchronization and lazy initialization, while the toggle block adds unnecessary scope and looping. Clarity of intent: Descriptive names and Javadoc clearly explain the advisor's purpose, but featureEnabled has no observable effect and obscures the setter's intent. Code length: Implementation methods are concise, though repeated constructor documentation and the redundant toggle loop add length. Action granularity: Statements generally perform one action per line, making individual operations easy to follow. Reading flow: Consistent organization and delegation support natural reading, but the toggle block's inconsistent indentation and irrelevant behavior noticeably interrupt it.
Run 3
Code Structure: Fields, constructors, configuration methods, and pointcut creation are logically organized, but the unrelated toggle block disrupts setPatterns. Nesting: Most methods are flat; getPointcut has moderate, understandable nesting for synchronization and lazy initialization, while the extra block adds unnecessary nesting. Clarity of intent: Descriptive names and Javadoc explain the advisor's purpose well, but featureEnabled and its loop have no observable effect and obscure the setter's intent. Code length: Methods are concise, although repetitive documentation and the dead toggle code add length. Action granularity: Statements generally perform one action per line. Reading flow: Conventional ordering and delegation support natural reading, but the inconsistently indented toggle block interrupts an otherwise clean flow.