Sample
Scalabrio111
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 49.7Δ 32.9 |
| Scalabrino | 0.505 | 0–1; higher is more readable | 50.8Δ 33.9 |
| Dorn | 0.558 | 0–1; higher is more readable | 64.3Δ 47.5 |
| Mi | 0.028 | 0–1; higher is more readable | 15.1Δ 1.8 |
| LLOC | 11 | Logical lines; fewer is more readable | 63.1Δ 46.2 |
| DeepSeek V4 Pro | 13.67 | 0–20; mean of three runs | 43.2Δ 26.4 |
| GPT-6.1 Sol | 15.33 | 0–20; mean of three runs | 24.9Δ 8.0 |
| BTTF | 0.495 | 0–1; higher is more readable | 37.2Δ 20.4 |
| Human | 3 | 1–5; original rating | 16.8 |
Views
Select the downloaded ZIP or its extracted folder. Files stay in your browser.
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. | 781.418 | −25.787 |
| Source linesThe number of non-empty source lines. | 23 | +9.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.724 | −7.086 |
Intercept 8.87 + feature contributions = -14.802 (log-odds).
Score = sigmoid(-14.802) = 0.
| Score | 0.505 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 123 | −1.545 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 123 | +1.18 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 22 | +0.257 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 21.823 | −0.105 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.098 | −0.012 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 21 | −0.011 |
Intercept 0.07 + feature contributions = 0.233 (log-odds).
Score = sigmoid(0.233) = 0.558.
| Score | 0.028 |
|---|
| Score | 11 |
|---|
Run 1
The code has a clear purpose and follows a logical structure, with each conditional check separated into its own block. The intent is fairly easy to understand—determine if an entity is definitively not dirty. However, readability suffers from deep method chaining, long variable names, and repeated casts. The nested conditions and multi-line expressions add some complexity, though the overall nesting depth is low. Action granularity is acceptable, but lines like the customEntityDirtinessStrategy declaration and the chained if conditions are verbose and could be broken down further. The @SuppressWarnings annotation and comments help clarify intent but contribute to visual clutter. Overall, the code is moderately readable but could be improved by simplifying expressions, extracting repeated logic, and using shorter variable names or helper methods.
Run 2
The code is reasonably structured with sequential if-return blocks that avoid deep nesting, but it has several readability issues. The method name is clear but verbose. The suppression annotation adds clutter. Type casts are repeated making lines long — e.g. `(Session) persistenceContext.getSession()` appears multiple times. The logic flow is straightforward: check self-tracking, then custom strategy, then mutable properties, then instrumentation. However, the meaning of `$$_hibernate_hasDirtyAttributes()` and the double negation (`return ! ... isDirty()`) slightly obscure intent. Overall, the code is understandable but could be improved by extracting repeated casts to local variables and simplifying comments.
Run 3
The code has clear logical sections and a natural reading flow, but suffers from several readability issues. It contains unnecessary nesting, multiple actions per line (especially in the second conditional), repetitive verbose casts, and overly long lines that obscure intent. The method name is clear, and the early return pattern helps structure, but the overall implementation could be significantly simplified and flattened.
Run 1
Code Structure: Logically organized as a sequence of checks with early returns. Nesting: Shallow and easy to follow. Clarity of intent: The method name communicates a non-dirty check, but the first branch returns hasDirtyAttributes() directly, apparently contradicting that intent; the negative naming also adds cognitive load. Code length: Reasonably concise, though repeated session, persister, and instrumentation lookups introduce visual noise. Action granularity: Each statement performs one primary action, although long chained calls make some lines dense. Reading flow: The fallback sequence is natural, but inconsistent spacing, an unbraced first conditional, and lengthy expressions slightly interrupt readability.
Run 2
Code Structure: A logical sequence of checks and early returns keeps the method organized. Nesting: Shallow conditionals avoid deep nesting. Clarity of intent: Most checks clearly assess dirtiness, but the first branch returns hasDirtyAttributes() directly, contradicting the method's 'NonDirty' name and the negation used elsewhere. This creates significant interpretive uncertainty. Code length: The method is reasonably concise, though repeated session, persister, and instrumentation lookups add verbosity. Action granularity: Each statement performs one primary action, but chained calls and repeated casts make some expressions dense. Reading flow: Early returns provide a natural top-to-bottom flow; inconsistent spacing, the unbraced first conditional, and long expressions slightly disrupt readability.
Run 3
Code Structure: Sequential checks and early returns provide clear logical organization. Nesting: Minimal nesting makes the method easy to scan. Clarity of intent: Most checks are descriptive, but the method name promises a non-dirty result while the SelfDirtinessTracker branch directly returns hasDirtyAttributes(), suggesting an inversion inconsistency. The generated-looking tracker method name and suppression annotation add noise. Code length: Reasonably concise, though repeated session, persister, and instrumentation lookups could be simplified with local variables. Action granularity: Each statement performs one primary action, although long chained calls make individual expressions harder to parse. Reading flow: The fallback sequence reads naturally, but inconsistent spacing, an unbraced first conditional, and long condition lines reduce polish.