Sample
Schnappinger/junit4/org.junit.internal.runners.InitializationError
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.002 | 0–1; higher is more readable | 68.9Δ 27.5 |
| Scalabrino | 0.753 | 0–1; higher is more readable | 49.7Δ 46.7 |
| Dorn | 0.749 | 0–1; higher is more readable | 79.2Δ 17.2 |
| Mi | 0.768 | 0–1; higher is more readable | 93.4Δ 3.0 |
| LLOC | 8 | Logical lines; fewer is more readable | 73.8Δ 22.6 |
| DeepSeek V4 Pro | 18 | 0–20; mean of three runs | 91.4Δ 5.0 |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs | 92.6Δ 3.8 |
| BTTF | 0.713 | 0–1; higher is more readable | 84.5Δ 11.9 |
| Human | 4 | 1–4; original rating | 96.4 |
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. | 605.403 | −19.978 |
| Source linesThe number of non-empty source lines. | 30 | +12 |
| 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.687 | −7.03 |
Intercept 8.87 + feature contributions = -6.138 (log-odds).
Score = sigmoid(-6.138) = 0.002.
| Score | 0.753 |
|---|
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. | 74.968 | +0.49 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 75 | +0.406 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 27 | −0.199 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 27 | +0.197 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.078 | +0.183 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 31 | −0.061 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 29.868 | +0.008 |
Intercept 0.07 + feature contributions = 1.093 (log-odds).
Score = sigmoid(1.093) = 0.749.
| Score | 0.768 |
|---|
| Score | 8 |
|---|
Run 1
The code is well-structured with clear logical organization: package, imports, Javadoc, deprecated annotation, class definition, and methods. Nesting is minimal—no deep indentation or conditional complexity. Intent is clear: a deprecated exception class for initialization errors, with three convenient constructors. Code length is concise; there is no unnecessary code. Action granularity is appropriate—each line performs a single purpose (delegating constructors, returning the error list). Reading flow is natural, moving from class-level documentation to fields, constructors, and then the accessor method. Minor deductions could be for the outdated Javadoc date and single-letter field prefix 'f', but these do not meaningfully impair readability.
Run 2
The code is highly readable due to its clear structure, minimal nesting, and concise implementation. Each method performs a single, well-defined action, and the flow from constructors to the getter is logical. Naming is descriptive, and the deprecated class with documentation signals intent clearly. The only minor detraction is the abbreviated field name 'fErrors', which is slightly less intuitive, but this is a common convention in older Java code. Overall, the code is straightforward and easy to follow.
Run 3
The code is highly readable. It has a clear, logical structure with a concise class definition and well-organized constructors. Nesting is minimal, with no deeply nested logic. The intent is unambiguous: it defines a deprecated exception type for storing initialization errors. The code is compact without being cryptic, avoiding unnecessary verbosity. Each constructor delegates cleanly, maintaining a single action per line. The reading flow is natural, starting with imports, class declaration, fields, constructors, and a simple accessor. The only minor drawbacks are the single-letter field prefix 'f' (a dated convention) and the lack of Javadoc on public methods, but these do not significantly hinder comprehension.
Run 1
Code Structure: Clearly organized exception class with fields, constructors, and an accessor. Nesting: Flat, with no nested control flow. Clarity of intent: Constructor delegation and getCauses() make the purpose clear; the deprecation documentation points to the replacement. However, fErrors and string are less descriptive than causes and message. Code length: Concise, with no unnecessary implementation. Action granularity: Each statement performs one focused action. Reading flow: Natural progression from metadata and state to construction and retrieval, supported by consistent formatting.
Run 2
Code Structure: The class is logically organized, with fields followed by constructors and an accessor. Nesting: There is no nested control flow, making the code easy to scan. Clarity of intent: The exception wrapper and constructor overloads clearly express their purpose, while the deprecation documentation directs readers to the replacement. However, fErrors is a dated naming convention, and string is less descriptive than message. Code length: The implementation is concise without unnecessary repetition; constructor delegation avoids duplicated initialization. Action granularity: Each statement performs a single action. Reading flow: Imports, documentation, fields, constructors, and the getter follow a natural order. Minor naming weaknesses prevent a perfect score.
Run 3
Code Structure: The class is logically organized into fields, constructors, and an accessor. Nesting: There is no unnecessary nesting; all methods are flat. Clarity of intent: The exception's purpose and constructor delegation are clear, and the deprecation documentation identifies its replacement. However, fErrors and string are less descriptive than causes and message. Code length: The implementation is concise without redundant logic. Action granularity: Each statement performs a single action, with constructor delegation keeping initialization centralized. Reading flow: The progression from state to construction to retrieval is natural and easy to follow.