Sample
int-d1e78074e6fd-I01
Remove line comments, block comments, and Javadoc
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.565 | 0–1; higher is more readable |
| Dorn | 0.587 | 0–1; higher is more readable |
| Mi | 0.228 | 0–1; higher is more readable |
| LLOC | 21 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 15 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs |
| BTTF | 0.559 | 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.902 | −7.353 |
Intercept 8.87 + feature contributions = -12.85 (log-odds).
Score = sigmoid(-12.85) = 0.
| Score | 0.565 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 115 | +3.241 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 109 | −2.823 |
| 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. | 0 | −0.804 |
| 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.09 | +0.071 |
Intercept 0.07 + feature contributions = 0.352 (log-odds).
Score = sigmoid(0.352) = 0.587.
| Score | 0.228 |
|---|
| Score | 21 |
|---|
Run 1
The code is generally readable but has some issues. The class structure is logical, extending DataRetrievalFailureException with clear field names and appropriate @Nullable annotations. Constructors are well-organized with proper delegation between them. However, there are several readability problems: excessive blank lines between members (some sections have 10+ empty lines), which disrupts natural reading flow. The fluent getter methods use pattern matching effectively but the ternary expressions could be clearer. The constructor parameters alternate between Class<?> and String types for persistentClass, which may cause confusion. Action granularity is mostly one action per line, but the constructor calls with string concatenation are dense. The code length is reasonable for what it does, though the error message construction is duplicated. The nesting is minimal, which is good. Overall structure is sound but the inconsistent spacing and some complex expressions prevent a higher score.
Run 2
The code is well-structured as a simple exception class with clear purpose. Constructors are logically organized and delegate appropriately, showing good action granularity. Nesting is minimal—only one conditional level in getPersistentClassName. Reading flow is natural, with fields, constructors, and accessors in conventional order. The main readability issue is excessive blank lines between members (7–10 empty lines), which disrupts visual flow and makes the file longer than necessary. Method names clearly express intent. The ternary and instanceof pattern in getPersistentClass is concise but slightly less immediately readable than an if-else. Overall, the code is clean and maintainable, but the formatting inconsistency with excessive vertical whitespace prevents a higher score.
Run 3
The code is generally readable with clear structure and intent. It follows a logical organization with fields, constructors, and getters. The exception class is concise and each constructor serves a distinct purpose. However, there are several readability issues: excessive blank lines between methods create unnecessary visual gaps, the constructors with multiple parameters could benefit from better formatting, and the getPersistentClass() method has a somewhat convoluted cast expression. The nesting is shallow, which is good. Action granularity is mostly one action per line. The reading flow is natural but disrupted by the excessive spacing. The code would be more readable with consistent method spacing and slightly cleaner type handling in getter methods.
Run 1
Code Structure: Fields, constructor overloads, and getters are logically organized; constructor delegation reduces duplication. Nesting: Very shallow, with only one simple conditional. Clarity of intent: Descriptive class and method names clearly communicate retrieval failure details, although storing either a Class or a String in an Object field requires readers to infer its dual role. Code length: Methods are concise, but excessive blank lines unnecessarily expand the code, and similar constructors repeat initialization and message formatting. Action granularity: Statements generally perform one action per line; ternary expressions remain straightforward. Reading flow: The ordering is natural and formatting is consistent within methods, but large whitespace gaps interrupt scanning.
Run 2
Code Structure: Fields, constructors, and getters are logically grouped, with constructor delegation reducing duplication. Nesting: Almost entirely flat, with only one simple conditional. Clarity of intent: Descriptive class, method, and parameter names make the exception's purpose clear; using Object to represent either a Class or class name slightly weakens type clarity. Code length: Methods are concise, but excessive blank lines unnecessarily inflate the listing, and parallel constructor overloads repeat some logic. Action granularity: Each statement performs a single clear action, while multiline constructor calls remain readable. Reading flow: Conventional Java organization and consistent indentation support natural reading, though large whitespace gaps interrupt continuity.
Run 3
Code Structure: Fields, constructor overloads, and getters are logically organized, with constructor delegation reducing duplication. Nesting: Minimal; only one shallow conditional appears. Clarity of intent: Descriptive class and method names make the exception's purpose clear, though storing either a Class or String in an Object field requires some interpretation. Code length: Methods are concise, but excessive blank lines unnecessarily lengthen the file, and error-message construction is duplicated. Action granularity: Statements generally perform one action per line; multiline constructor calls remain easy to follow. Reading flow: Ordering and consistent indentation support natural reading, but large whitespace gaps interrupt continuity.