Sample
Dorn/java/165
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 21.7Δ 3.6 |
| Scalabrino | 0.278 | 0–1; higher is more readable | 19.0Δ 0.9 |
| Dorn | 0.347 | 0–1; higher is more readable | 28.1Δ 10.0 |
| Mi | 0.558 | 0–1; higher is more readable | 58.8Δ 40.7 |
| LLOC | 19 | Logical lines; fewer is more readable | 35.5Δ 17.4 |
| DeepSeek V4 Pro | 9 | 0–20; mean of three runs | 34.7Δ 16.6 |
| GPT-6.1 Sol | 12.33 | 0–20; mean of three runs | 24.4Δ 6.3 |
| BTTF | 0.591 | 0–1; higher is more readable | 71.3Δ 53.2 |
| Human | 2.75 | 1–5; original rating | 18.1 |
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. | 1520.21 | −50.167 |
| Source linesThe number of non-empty source lines. | 50 | +20 |
| 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.948 | −7.422 |
Intercept 8.87 + feature contributions = -28.719 (log-odds).
Score = sigmoid(-28.719) = 0.
| Score | 0.278 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 49 | +0.958 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 50 | −0.734 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 49 | −0.704 |
| 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. | 77.941 | +0.364 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 49.342 | +0.28 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.103 | −0.063 |
Intercept 0.07 + feature contributions = -0.634 (log-odds).
Score = sigmoid(-0.634) = 0.347.
| Score | 0.558 |
|---|
| Score | 19 |
|---|
Run 1
The code has poor readability. The initial orphaned closing braces suggest a disorganized excerpt. Nesting is exacerbated by try-catch blocks containing repeated, deep conditional logic. The intent is muddled by repetitive boilerplate for exception handling and unclear method naming conventions (`_addBar_RollbackMethodKey17`). Code length is unnecessarily long due to duplicated catch blocks. Action granularity is mostly one action per line, but the long, fully-qualified class names and complex throw statements hinder flow. Reading flow is disrupted by the redundant structure and lack of abstraction for common error handling.
Run 2
The code shows basic structural organization with clear method boundaries and consistent try-catch blocks, but suffers from several readability issues. The methods are overly verbose, with fully-qualified exception names repeated multiple times, adding unnecessary length. The catch blocks are duplicated across methods, and the error handling logic (checking exception types and rethrowing) is nested and convoluted. While the action granularity is acceptable—one main action per line—the reading flow is disrupted by long fully-qualified names and the repetitive exception handling pattern. The top of the code starts with orphaned closing braces, suggesting the snippet is cut off mid-class, which hurts clarity of intent. The nesting in catch blocks is moderate but could be flattened with cleaner exception handling. Overall, the code is understandable but not optimized for readability.
Run 3
The code is difficult to read due to poor structure, excessive verbosity, and unclear intent. It starts with orphaned closing braces, suggesting a larger tangled context. Fully qualified names (e.g., com.liferay.portal.kernel.exception.SystemException) add unnecessary length and noise. The repeated try-catch blocks duplicate identical exception handling logic, violating DRY principles. Nesting is moderate but adds complexity with multiple type checks and casts. Clarity suffers because the business purpose is obscured by boilerplate proxy invocation and serialization details. Multiple actions are crammed into some lines (e.g., constructing MethodHandler with inline translation), while other lines are overly long. Reading flow is interrupted by inconsistent formatting and lack of abstraction. Overall, the code is functional but far from self-explanatory or maintainable.
Run 1
Code Structure: Methods follow a consistent proxy-invocation pattern, but repeated exception handling adds clutter, and the fragment starts with unmatched closing braces and ends mid-method. Nesting: Moderate try/catch and conditional nesting remains manageable. Clarity of intent: Method names distinguish rollback from success, but generated method-key names and proxy infrastructure obscure actual behavior. Code length: Fully qualified types and duplicated exception logic make simple operations unnecessarily verbose. Action granularity: Statements generally perform one clear action, with conventional multiline formatting. Reading flow: Consistent indentation supports scanning, but long type names, repetitive catch blocks, and incomplete boundaries interrupt the flow.
Run 2
Code Structure: Methods follow a consistent organization, but duplicated proxy invocation and exception-handling logic adds clutter; the fragment also starts and ends mid-structure. Nesting: Moderate nesting within try/catch and conditional branches remains manageable. Clarity of intent: Method names distinguish rollback and success operations, but numbered method keys and proxy indirection obscure the underlying behavior. Code length: Repeated exception handling and fully qualified types make the code longer than necessary. Action granularity: Most statements perform one clear action, though handler construction combines input translation with initialization. Reading flow: Consistent formatting and a predictable setup/invoke/handle sequence help readability, while verbose type names, wrapped lines, and incomplete boundaries interrupt the flow.
Run 3
Code Structure: Methods follow a consistent organization, but the fragment begins with unmatched closing braces and ends before the second method is complete. Nesting: Try/catch blocks and exception checks introduce moderate, manageable nesting. Clarity of intent: Method names suggest rollback and success scenarios, and proxy invocation is clear, but actual behavior is delegated elsewhere; numbered method keys obscure meaning. Code length: Repeated exception-handling boilerplate and fully qualified types make simple operations unnecessarily verbose. Action granularity: Statements generally perform one action each, with sensible line breaks for longer expressions. Reading flow: Both methods follow the same predictable sequence, but long type names, repetitive checks, and incomplete boundaries interrupt readability.