Sample
int-04977a141eed-I10
Remove about 40% of line-break groups while retaining structure
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Scalabrino | 0.55 | 0–1; higher is more readable |
| Dorn | 0.078 | 0–1; higher is more readable |
| Mi | 0 | 0–1; higher is more readable |
| LLOC | 18 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 7 | 0–20; mean of three runs |
| GPT-6.1 Sol | 10.67 | 0–20; mean of three runs |
| BTTF | 0.412 | 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. | 2411.137 | −79.568 |
| Source linesThe number of non-empty source lines. | 50 | +20 |
| 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.953 | −7.429 |
Intercept 8.87 + feature contributions = -58.126 (log-odds).
Score = sigmoid(-58.126) = 0.
| Score | 0.55 |
|---|
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. | 232.98 | −6.203 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 233 | +2.955 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 51 | −0.769 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 34 | +0.439 |
| 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.061 | +0.349 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 49.821 | +0.287 |
Intercept 0.07 + feature contributions = -2.475 (log-odds).
Score = sigmoid(-2.475) = 0.078.
| Score | 0 |
|---|
| Score | 18 |
|---|
Run 1
The code suffers from severe formatting issues that make it extremely difficult to read. Multiple statements are crammed onto single lines (e.g., package declaration followed by multiple imports on one line, class declaration concatenated with Javadoc, method signatures combined with method bodies). This violates fundamental readability principles. The logic itself is relatively simple - a factory pattern that delegates to either FileJwtRetriever or ClientCredentialsJwtRetriever based on URL protocol - but the poor formatting obscures this intent. Nesting is minimal and action granularity is acceptable in some places but compromised elsewhere by line compression. The reading flow is disrupted by inconsistent spacing and the mixing of unrelated code elements on single lines. While the code's purpose is understandable once deciphered, a developer would need to reformat it first to work with it effectively. Proper formatting alone would likely raise this to a 15+ score.
Run 2
The code has several readability problems. Multiple statements are packed onto single lines, and imports are jumbled together with class declarations and Javadocs on the same physical lines. The class-level Javadoc is thorough but visually cramped due to formatting. The configure() method combines variable declarations, conditional logic, logging, and delegation into a compact block, making the flow harder to follow. While the overall logic is straightforward and the structure could be clear with standard formatting, the current presentation significantly hinders scanning and comprehension. Nesting is minimal, and intent is generally understandable, but the lack of whitespace and conventional line breaks undermines clarity and creates a disorganized reading experience.
Run 3
The code is functional but poorly structured. Multiple imports and class declarations are compressed onto single lines, breaking the natural reading flow. The `configure()` method has an if-else with single-line bodies and no braces, reducing clarity. Javadoc is dense and complex. The `delegate` field, while simple, is not immediately obvious from the structure. On the positive side, methods are relatively short and each performs a single action per line. However, the inconsistent formatting, lack of vertical separation between members, and mixed style choices (some braces used, some not) all contribute to reduced readability and maintainability.
Run 1
Code Structure: The delegation design and separation into configure, retrieve, close, and accessor methods are logical, but compressed declarations obscure boundaries. Nesting: Control flow is shallow and easy to follow, although missing braces reduce visual clarity. Clarity of intent: Descriptive class and method names, logging, and the initialization check communicate purpose; the documentation misleadingly describes formatter creation rather than the actual retriever selection. Code length: The implementation is concise without substantial unnecessary logic, though documentation is disproportionately long. Action granularity: Multiple imports, annotations, declarations, and statements share lines, making scanning difficult. Reading flow: The configuration-to-delegation sequence is natural, but inconsistent line breaks and formatting repeatedly interrupt readability.
Run 2
Code Structure: The delegation design and separate configure, retrieve, and close methods provide logical organization, but compressed declarations obscure boundaries. Nesting: Control flow is shallow and straightforward, although missing conditional braces reduce visual clarity. Clarity of intent: Descriptive class and method names, logging, and documentation explain the purpose; however, the documentation names request formatters where the implementation creates ClientCredentialsJwtRetriever. Code length: The implementation is concise without substantial redundant logic, though the documentation is relatively verbose. Action granularity: Multiple imports, annotations, declarations, and statements share lines, making individual actions harder to scan. Reading flow: Inconsistent line breaks and formatting interrupt otherwise natural initialization and delegation flow. Standard formatting would substantially improve readability.
Run 3
Code Structure: The class logically separates configuration, retrieval, cleanup, and delegate access, but compressed declarations obscure these boundaries. Nesting: Shallow conditionals and a simple guard clause keep control flow easy to follow. Clarity of intent: Descriptive names and documentation explain delegation clearly, although the documentation refers to request formatters rather than the actual HTTP delegate instantiated. Code length: The implementation is concise without substantial redundancy; the documentation is relatively lengthy for the small class. Action granularity: Multiple imports, annotations, declarations, and statements share lines, making individual operations harder to scan. Reading flow: Inconsistent formatting, missing conditional braces, and method boundaries sharing lines interrupt otherwise straightforward execution flow. Overall, simple logic supports readability, but presentation significantly weakens it.