Sample
int-beef024260f6-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.822 | 0–1; higher is more readable |
| Dorn | 0.747 | 0–1; higher is more readable |
| Mi | 0.195 | 0–1; higher is more readable |
| LLOC | 21 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.661 | 0–1; higher is more readable |
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. | 1829.317 | −60.367 |
| Source linesThe number of non-empty source lines. | 115 | +46 |
| 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.834 | −7.251 |
Intercept 8.87 + feature contributions = -12.749 (log-odds).
Score = sigmoid(-12.749) = 0.
| Score | 0.822 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 109 | −2.823 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 72 | +1.753 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 114.55 | +1.191 |
| 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. | 109.94 | −0.991 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 109.966 | +0.97 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.044 | +0.515 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
Intercept 0.07 + feature contributions = 1.083 (log-odds).
Score = sigmoid(1.083) = 0.747.
| Score | 0.195 |
|---|
| Score | 21 |
|---|
Run 1
The code is highly readable. It follows a logical single-class structure with clear field declarations and well-organized constructor overloads. Nesting is minimal, limited to concise getter methods. Each constructor's purpose is well-documented with Javadoc, making intent unambiguous. Code length is appropriate given the multiple constructor variants, and each action is typically on its own line. Reading flow is natural: fields, constructors, then getters. Minor minor deductions for slight repetition in constructor patterns and the moderately verbose Javadoc, but overall this is clean, maintainable exception code.
Run 2
The code is highly readable. It has a clear, logical class structure with well-defined constructors and getter methods. Nesting is minimal, limited to simple conditional checks. Intent is explicit through meaningful method names and thorough Javadoc. Code length is appropriate for an exception class with multiple construction scenarios. Each action is on its own line, improving clarity. Reading flow is natural, progressing from constructors to accessors. Minor deductions: the constructor chaining and message concatenation add slight verbosity, but they remain clear and justified within the domain context.
Run 3
The code is highly readable with a clear, logical structure. It follows standard Java exception class conventions with a clean class hierarchy and well-organized constructor overloads. Nesting is minimal, and each method performs a single, focused action. Javadoc comments thoroughly explain each constructor and method's purpose, enhancing clarity of intent. The use of @Nullable annotations and modern Java pattern matching improves readability and type safety. The class is appropriately concise for its purpose, though the multiple constructor overloads create some unavoidable repetition. Methods like getPersistentClassName() have clear logic flow despite using ternary conditional expressions. The code maintains consistent formatting, proper line breaks for long constructor parameters, and follows Spring framework coding standards. It could be slightly improved by reducing constructor overloads through a builder pattern, but for an exception class, this approach is conventional and appropriate.
Run 1
Code Structure: Fields, related constructor overloads, and getters are logically grouped. Nesting: Methods are flat, with only one simple conditional. Clarity of intent: Descriptive names, Javadoc, and nullability annotations clearly explain the exception's purpose; storing either a Class or String in an Object field slightly obscures its representation. Code length: Implementation is concise, though repeated constructor documentation and default-message construction add some verbosity. Action granularity: Each statement performs a single clear action; multiline constructor calls remain easy to follow. Reading flow: Consistent formatting and constructor delegation support natural top-to-bottom reading, with minor repetition across overloads.
Run 2
Code Structure: Fields, constructors, and accessors are logically grouped, with constructor delegation reducing duplication. Nesting: Almost entirely flat, with only one shallow conditional. Clarity of intent: Descriptive names, Javadoc, and nullability annotations clearly explain the exception and its metadata; storing either a Class or String in an Object field slightly obscures the representation. Code length: Appropriate for the supported overloads, though repeated constructor documentation and message construction add some verbosity. Action granularity: Each statement performs a single clear action; wrapped constructor calls remain understandable. Reading flow: Consistent formatting and a natural progression from initialization to retrieval make the code easy to follow. Minor drawbacks are long message expressions and repeated overload patterns.
Run 3
Code Structure: Fields, constructors, and getters are logically grouped, with consistent formatting and useful documentation. Nesting: Almost entirely flat; the only conditional block is simple and shallow. Clarity of intent: Descriptive names, Javadoc, and nullability annotations clearly communicate the exception's purpose. Storing either a Class or String in an Object field slightly obscures its representation. Code length: Reasonably concise, although parallel constructor overloads and repeated documentation add some redundancy. Action granularity: Each statement performs one clear action; constructor delegation avoids unnecessary repetition. Reading flow: Natural progression from state to initialization to accessors. Long constructor signatures and concatenated message expressions introduce minor reading friction.