Sample
Scalabrio149
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 12.6Δ 0.8 |
| Scalabrino | 0.448 | 0–1; higher is more readable | 41.7Δ 29.9 |
| Dorn | 0.757 | 0–1; higher is more readable | 86.9Δ 75.1 |
| Mi | 0.179 | 0–1; higher is more readable | 44.2Δ 32.4 |
| LLOC | 29 | Logical lines; fewer is more readable | 5.5Δ 6.3 |
| DeepSeek V4 Pro | 10.67 | 0–20; mean of three runs | 23.4Δ 11.6 |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs | 34.7Δ 22.9 |
| BTTF | 0.624 | 0–1; higher is more readable | 75.9Δ 64.1 |
| Human | 2.89 | 1–5; original rating | 11.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. | 1662.208 | −54.853 |
| Source linesThe number of non-empty source lines. | 42 | +16.8 |
| 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.796 | −7.195 |
Intercept 8.87 + feature contributions = -36.377 (log-odds).
Score = sigmoid(-36.377) = 0.
| Score | 0.448 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 97.929 | +0.776 |
| 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. | 97.952 | −0.484 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 42 | −0.451 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 33 | +0.404 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.07 | +0.26 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 40.818 | +0.161 |
Intercept 0.07 + feature contributions = 1.134 (log-odds).
Score = sigmoid(1.134) = 0.757.
| Score | 0.179 |
|---|
| Score | 29 |
|---|
Run 1
The code has a clear purpose but suffers from multiple readability issues. The method is a single flat block with one main conditional, but it's overloaded with many sequential helper calls, making the logic hard to follow. There is minimal nesting (good), but the method is too long and does too many things at once — initializing collection tables, overrides, access types, and more. Action granularity is one per line, which is positive, but several local variables are reused and reassigned (e.g., 'annotation'), reducing clarity. The Javadoc is informative but very dense. The code reads as a long checklist rather than a structured sequence of logical groupings. Extracting sub-steps into smaller, named private methods or adding inline comments for each mapping concern would improve readability. The lack of blank lines or grouping further reduces flow. Overall, the code is functional but not maintainable for a reader unfamiliar with the mapping process.
Run 2
The code has a clear purpose and helpful Javadoc-style comment, but readability suffers from a monolithic structure and a deeply nested 'if' block that spans the entire method. The method performs many distinct actions (parsing target class, fetch type, ordering, map keys, columns, overrides, etc.) without decomposition into smaller, named helper methods, which hurts action granularity and clarity of intent. Nesting is relatively flat (only one level), and each call is on its own line, which is positive. However, the long sequence of similar-looking 'get...' calls without accompanying explanatory comments for groups makes the reading flow poor and forces readers to parse the entire block to understand what is being built. The variable 'annotation' is reused, slightly reducing clarity. Overall, the method is functional but dense, and would benefit from extracting cohesive sub-steps into well-named methods.
Run 3
The code is fairly readable with one main method containing a single conditional block, keeping nesting flat. Most lines perform one action, and method names clearly express intent (e.g., 'getOrderBy', 'buildAttributeOverrides'). The initial comment provides useful context for why the method must override mapping behavior. However, the method is long and mixes concerns: parsing multiple sub-elements and annotation merging all in one place. The repeated 'getX' calls create a somewhat monotonous but predictable flow. A minor issue is the vague variable name 'ad' for AnnotationDescriptor, and the comment formatting with tabs is slightly inconsistent. Overall, the logic is understandable but could be improved by extracting helper methods for related groups of operations.
Run 1
Code Structure: A cohesive method delegates mapping details to clearly named helpers, though the long processing sequence could be grouped into smaller sections. Nesting: Only a loop and conditional, keeping depth manageable; an early continue could flatten the main body. Clarity of intent: The specification comment explains override semantics, and most helper names communicate purpose. However, the generic variable names ad and annotation, plus the get-prefixed method's mutation of annotationList, slightly obscure intent. Code length: Reasonable for the mapping coverage, but repetitive helper calls and annotation additions make it somewhat lengthy. Action granularity: Each statement performs one main action, making individual steps easy to inspect. Reading flow: Processing proceeds sequentially and logically, although the largely unbroken list of calls and a duplicated word in the override comment slightly reduce readability.
Run 2
Code Structure: Logically groups element-collection mapping operations, although extracting override handling would improve organization. Nesting: Only a loop and conditional, but a guard clause could reduce indentation. Clarity of intent: The JPA comment clearly explains override semantics, and helper names mostly reveal purpose; 'ad' and repeated reassignment of 'annotation' are less expressive. Code length: Reasonable for the mapping work performed, though the long sequence of helper calls is somewhat repetitive. Action granularity: Each statement performs one clear operation, making individual steps easy to inspect. Reading flow: Processing follows a straightforward sequence from descriptor creation through mapping details to annotation registration. However, the largely uninterrupted list of calls lacks visual grouping, and the duplicated 'need' in a comment slightly detracts from polish.
Run 3
Code Structure: Logically organized around processing element-collection mappings, with specialized work delegated to helper methods; the long sequence could be grouped into smaller stages. Nesting: Only a loop and conditional, though the conditional indents the entire processing block. Clarity of intent: Descriptive helper names and the specification comment explain the purpose well; abbreviated 'ad', reused 'annotation', and boolean arguments slightly obscure details. Code length: Mostly concise delegation, but the lengthy method and repeated addIfNotNull calls introduce some verbosity. Action granularity: Each statement occupies its own line, making individual operations easy to follow. Reading flow: Processing proceeds naturally from descriptor creation through mapping extraction to annotation registration; the override comment clarifies grouping, although its duplicated 'need' and limited visual separation between stages mildly interrupt readability.