Sample
int-5f637e1a4ef1-I10
Remove about 40% of line-break groups while retaining structure
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.999 | 0–1; higher is more readable |
| Scalabrino | 0.723 | 0–1; higher is more readable |
| Dorn | 0.929 | 0–1; higher is more readable |
| Mi | 0.705 | 0–1; higher is more readable |
| LLOC | 2 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 15.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs |
| BTTF | 0.744 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 24 | +9.6 |
| 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.712 | −7.068 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 118.593 | −3.914 |
Intercept 8.87 + feature contributions = 7.488 (log-odds).
Score = sigmoid(7.488) = 0.999.
| Score | 0.723 |
|---|
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. | 1 | +1.001 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.021 | +0.738 |
| 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. | 75.96 | +0.448 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 9 | −0.426 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 75.96 | +0.421 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 23.896 | −0.076 |
Intercept 0.07 + feature contributions = 2.575 (log-odds).
Score = sigmoid(2.575) = 0.929.
| Score | 0.705 |
|---|
| Score | 2 |
|---|
Run 1
The code is generally readable with a clear interface definition and good Javadoc documentation. The structure is logical, with methods separated by documentation, and nesting is minimal (none beyond the interface itself). Intent is clearly expressed through method names like getTestClass and getCacheAwareContextLoaderDelegate. However, the code has an unusual formatting issue where the first method declaration and its preceding Javadoc are on the same line as the closing brace of one Javadoc comment and the opening of another. This breaks reading flow and makes the code feel visually cluttered. The second Javadoc comment begins immediately after the semicolon of getTestClass(), which is unconventional. Additionally, the action granularity is somewhat poor in that critical syntactic elements are compressed onto single lines. While not overly long in total, the formatting choices reduce readability compared to standard Java conventions.
Run 2
The code is generally well-structured as a simple interface with clear purpose and Javadoc. However, the readability is significantly hindered by placing method declaration and Javadoc on the same line for getTestClass(), then placing the next method's Javadoc immediately after its return type on the following line. This violates action granularity and disrupts natural reading flow. Nesting is minimal, length is concise, and intent is clear, but the formatting creates ambiguity and makes scanning difficult. Splitting statements and adding blank lines between methods would improve clarity and raise the score.
Run 3
The code is a small, well-documented interface with clear structure and intent. It has no nesting and each method is a single action. Javadoc comments are informative and include useful metadata like author and since tags. However, there is a minor formatting issue: the closing Javadoc comment and the method signature for getTestClass() are on the same line, which disrupts natural reading flow. Separating them would improve readability. Overall, this is highly readable code with only a small style flaw.
Run 1
Code Structure: A logically organized interface with two related accessor methods. Nesting: Flat, with no nested control flow. Clarity of intent: Descriptive names and informative Javadoc clearly explain the interface and return values. Code length: Concise, with appropriate documentation and no unnecessary implementation. Action granularity: Each declaration represents one operation, but the first method shares a line with the end of its Javadoc and the opening of the next comment. Reading flow: Generally natural, though that compressed formatting disrupts visual separation between methods and makes the second comment harder to scan.
Run 2
Code Structure: A small, logically organized interface with two related accessor methods. Nesting: Flat, with no nested control flow. Clarity of intent: Descriptive interface and method names, supported by Javadoc, clearly communicate purpose and non-null return expectations. Code length: Concise, with documentation proportional to the API. Action granularity: Each method expresses one operation, but the first declaration shares a line with two comment boundaries. Reading flow: Generally natural, though placing getTestClass() between the closing Javadoc and the next opening Javadoc on the same line disrupts visual separation. Standard line breaks would make this highly readable.
Run 3
Code Structure: A small, logically organized interface with two related accessors. Nesting: No nested control flow; only the interface scope. Clarity of intent: Descriptive names and Javadoc clearly explain the bootstrap context and non-null return contracts. Code length: Concise, with documentation proportionate to the API. Action granularity: Each method represents a single operation, but the first declaration shares a line with the closing Javadoc delimiter and the next comment opener. Reading flow: The package, interface documentation, and methods follow a natural order, though the compressed comment/declaration formatting interrupts scanning and weakens separation between methods.