Sample
int-50fe6b1e3fa0-I10
Remove about 40% of line-break groups while retaining structure
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.994 | 0–1; higher is more readable |
| Scalabrino | 0.791 | 0–1; higher is more readable |
| Dorn | 0.776 | 0–1; higher is more readable |
| Mi | 0.04 | 0–1; higher is more readable |
| LLOC | 2 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 13 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.764 | 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. | 25 | +10 |
| 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.663 | −6.994 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 206.716 | −6.822 |
Intercept 8.87 + feature contributions = 5.054 (log-odds).
Score = sigmoid(5.054) = 0.994.
| Score | 0.791 |
|---|
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. | 118 | −1.333 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 113.615 | +1.029 |
| 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.02 | +0.749 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 9 | −0.426 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 9 | +0.214 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 24.857 | −0.062 |
Intercept 0.07 + feature contributions = 1.242 (log-odds).
Score = sigmoid(1.242) = 0.776.
| Score | 0.04 |
|---|
| Score | 2 |
|---|
Run 1
The code is logically structured as an interface and uses Javadoc, but readability is significantly harmed by formatting. The interface declaration and first constant share the same line, and Javadoc comments are placed on the same line as the code they document, disrupting the natural reading flow. Nesting is minimal and action granularity is adequate, but the layout makes intent harder to parse than necessary. The code length is reasonable, yet the compressed formatting undercuts clarity. Overall, the content is sound but the presentation requires reformatting for better readability.
Run 2
The code is a short interface with clear purposes for each method, but the formatting severely hurts readability. The constant `INDEX_NOT_IN_QUEUE` and its Javadoc share a line, and the start of the next Javadoc begins on the same line, making the structure confusing. This style is unconventional and breaks the natural vertical flow. While there is no deep nesting and the methods are concise, the action granularity and reading flow are negatively impacted by the compressed declarations. The code's intent is understandable from the comments, but the layout requires extra effort.
Run 3
The code is a small interface with clear purpose and minimal nesting, but its readability is undermined by poor formatting. The interface declaration and a constant are awkwardly placed on the same line as Javadoc comments, making the structure harder to parse. The constant 'INDEX_NOT_IN_QUEUE' lacks an 'INDEX_NOT_IN_QUEUE' comment format alignment, and method signatures, while clear, are slightly compressed. The Javadoc is helpful but not consistently separated from code. Overall, the logic is simple and the number of actions is minimal, but layout and formatting choices reduce clarity and natural reading flow.
Run 1
Code Structure: A small, logically organized interface groups a sentinel constant with index getter and setter methods. Nesting: No nested control flow or implementations, making scanning easy. Clarity of intent: Descriptive names and Javadoc clearly explain queue-specific state and usage restrictions, though the setter parameter 'i' is less descriptive than 'index'. Code length: Concise declarations with useful documentation and no unnecessary implementation. Action granularity: Each method declaration occupies its own line, but placing the interface declaration and constant immediately after comment endings, and starting another comment on the constant's line, weakens visual separation. Reading flow: The order is natural, but inconsistent comment/declaration formatting interrupts otherwise straightforward reading.
Run 2
Code Structure: The interface logically groups a sentinel constant and two related index-access methods. Nesting: There is no nested control flow, making the code easy to scan. Clarity of intent: Descriptive names and Javadoc clearly explain the queue-specific index and internal-use contract, although the overloaded getter/setter names require attention. Code length: The implementation is concise, with documentation proportionate to its purpose. Action granularity: Each method declaration stands alone, but the constant shares a line with documentation boundaries. Reading flow: The sequence from interface purpose to constant, getter, and setter is natural. However, placing declarations immediately after closing Javadoc delimiters and starting another comment on the constant's line disrupts visual separation and reduces readability.
Run 3
Code Structure: The interface logically groups a sentinel constant and related index getter/setter methods. Nesting: There is no unnecessary nesting. Clarity of intent: Javadoc clearly explains the interface's internal role, queue-specific state, and exception constraints; the parameter name 'i' is less descriptive than 'index'. Code length: The code is concise, with documentation proportional to its purpose. Action granularity: Each method declaration represents one operation, but placing declarations immediately after comment endings and starting another comment on the constant's line reduces visual separation. Reading flow: The constant-to-getter-to-setter order is natural, but the compressed formatting around the interface declaration and constant interrupts otherwise readable documentation and declarations.