Sample
Schnappinger/diarymanagement/TBA.Exceptions.MessagesException
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 1 | 0–1; higher is more readable | 95.3Δ 4.7 |
| Scalabrino | 0.927 | 0–1; higher is more readable | 95.2Δ 4.8 |
| Dorn | 0.905 | 0–1; higher is more readable | 96.7Δ 3.3 |
| Mi | 0.759 | 0–1; higher is more readable | 92.1Δ 7.9 |
| LLOC | 4 | Logical lines; fewer is more readable | 87.0Δ 13.0 |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs | 59.9Δ 40.1 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 73.8Δ 26.2 |
| BTTF | 0.802 | 0–1; higher is more readable | 96.7Δ 3.3 |
| Human | 4 | 1–4; original rating | 100.0 |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 46 | +18.4 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 267.96 | −8.843 |
| 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.336 | −6.504 |
Intercept 8.87 + feature contributions = 11.923 (log-odds).
Score = sigmoid(11.923) = 1.
| Score | 0.927 |
|---|
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. | 60.935 | +1.084 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.039 | +0.566 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 43 | −0.486 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 28 | +0.231 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 44.597 | +0.214 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 60.913 | +0.178 |
Intercept 0.07 + feature contributions = 2.255 (log-odds).
Score = sigmoid(2.255) = 0.905.
| Score | 0.759 |
|---|
| Score | 4 |
|---|
Run 1
The code is highly readable, with clear separation between constructors, minimal nesting, and straightforward intent. Each constructor follows a single-purpose pattern, and the action granularity is excellent—one action per line. The only minor issues are the placeholder auto-generated template comment at the top, which adds noise, and slightly verbose Javadoc comments that state the obvious. Otherwise, the code is concise, logically organized, and easy to follow.
Run 2
The code is highly readable due to its simple, conventional structure. It defines a custom exception with four standard constructors, mirroring the typical Java exception pattern. Nesting is nonexistent, and each constructor contains a single, clear action (a super() call). Intent is unambiguous: it provides multiple ways to instantiate the exception. Although the file includes somewhat noisy auto-generated template comments and redundant Javadoc (e.g., “Constructor does nothing”), these are minor. The reading flow follows a logical progression from default constructor to those accepting message and cause, making it easy for any Java developer to understand immediately.
Run 3
The code is a simple custom exception class with a clear, conventional structure. It follows standard Java patterns with four overloaded constructors, each delegating to the appropriate superclass constructor. Nesting is nonexistent, and each constructor is a single, focused action. Intent is unambiguous: provide multiple ways to instantiate a MessagesException. The code length is appropriate for its purpose — not overly verbose, though the comment 'Constructor does nothing' is slightly misleading since the default constructor implicitly calls super(). The reading flow is natural, following the conventional constructor ordering. Minor deductions: the class lacks a serialVersionUID (a best practice for exceptions), and the default constructor comment could be improved. The placeholder template comment at the top is unnecessary noise but does not significantly harm readability. Overall, it is clean, idiomatic, and easy to understand.
Run 1
Code Structure: The class is logically organized, with four conventional exception constructors. Nesting: There is no unnecessary nesting; each constructor is simple and flat. Clarity of intent: Extending Exception and delegating to superclass constructors clearly communicates purpose, although MessagesException is a somewhat vague name. Code length: The implementation is concise, but the template header and repetitive Javadoc add unnecessary length. Action granularity: Each nonempty constructor contains one action per line. Reading flow: The constructor order is natural and easy to follow, though inconsistent indentation and the inline empty constructor slightly reduce visual consistency.
Run 2
Code Structure: The class is logically organized, with related constructor overloads grouped together. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Extending Exception and forwarding arguments to superclass constructors clearly communicates its purpose, though the class name provides limited domain context. Code length: The implementation is concise, but template boilerplate and repetitive comments add unnecessary length. Action granularity: Each constructor performs a single action, with no crowded statements. Reading flow: Constructor ordering is natural and predictable; slightly inconsistent indentation and largely redundant documentation mildly interrupt the flow.
Run 3
Code Structure: A logically organized exception class with related constructor overloads grouped together. Nesting: Minimal, limited to the class and constructor bodies. Clarity of intent: The class name, parameter names, and superclass calls clearly communicate its purpose; comments are mostly redundant, and parameter documentation is incomplete. Code length: Implementation is concise, but template boilerplate and repetitive comments add unnecessary length. Action granularity: Each constructor performs a single action, with superclass calls on separate lines. Reading flow: Constructor ordering progresses naturally from no arguments to message, cause, and both. Minor indentation inconsistencies and nonstandard package capitalization slightly reduce polish.