Sample
int-445e68af00cc-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.999 | 0–1; higher is more readable |
| Scalabrino | 0.791 | 0–1; higher is more readable |
| Dorn | 0.795 | 0–1; higher is more readable |
| Mi | 0.296 | 0–1; higher is more readable |
| LLOC | 2 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 18.33 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.776 | 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. | 29 | +11.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.655 | −6.983 |
| 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 = 6.666 (log-odds).
Score = sigmoid(6.666) = 0.999.
| 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. | 117.967 | −1.331 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 114.167 | +1.038 |
| 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.75 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 13 | −0.287 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 13 | +0.123 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 28.773 | −0.008 |
Intercept 0.07 + feature contributions = 1.354 (log-odds).
Score = sigmoid(1.354) = 0.795.
| Score | 0.296 |
|---|
| Score | 2 |
|---|
Run 1
The code is highly readable due to its clear structure as a simple interface with only two methods and a constant. The nesting is non-existent, and each method has a distinct purpose clearly stated in the Javadoc. The code is concise and not unnecessarily lengthy. Each action is on its own line, and the reading flow is logical, with the constant defined first followed by the getter and setter methods. The documentation is thorough, explaining the purpose and edge cases (like throwing exceptions leading to undefined behavior), which enhances clarity of intent.
Run 2
The code is very readable. It is a simple interface with clear, well-documented methods. Structure is logical: constants and methods are grouped coherently. Nesting is flat—there are no nested blocks or conditionals. Intent is clear from method names and Javadoc, which explicitly describe purpose and undefined behavior. The code is concise, with no unnecessary methods or lines. Action granularity is appropriate: each declaration or method signature is on its own line. Reading flow is natural, moving from constant to getter then setter. Minor deduction for slight verbosity in Javadoc and lack of generic type details in documentation, but overall it is an excellent example of clean, maintainable API design.
Run 3
The code is well-structured and highly readable. It consists of a clear interface with two overloaded methods and a constant. The intent is explicit: the interface provides methods for DefaultPriorityQueue to manage internal state. Documentation comments succinctly explain each member's purpose and warn against throwing exceptions. The structure is flat, with no nesting or complexity. Action granularity is appropriate, with each method or constant on its own line. The reading flow is natural, moving from constant to getter to setter. The code is concise and avoids unnecessary length. Minor areas for potential improvement include slightly verbose Javadoc, but overall the code is exemplary.
Run 1
Code Structure: A logically organized interface groups the sentinel constant, index getter, and index setter. Nesting: No nested control flow; the structure is flat and easy to scan. 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, with documentation proportionate to the API contract. Action granularity: Each declaration occupies its own line, with no combined operations. Reading flow: The progression from interface purpose to initialization constant, retrieval, and update is natural. Overloaded getter/setter names are understandable but slightly less explicit than distinct get/set names.
Run 2
Code Structure: The interface is logically organized, with an initialization constant followed by getter and setter declarations. Nesting: The code is flat, with no nested control flow. Clarity of intent: Javadoc clearly explains the interface's internal purpose, queue-specific state, and exception constraints; however, the overloaded getter/setter name and parameter 'i' are slightly less explicit than distinct names and 'index'. Code length: The interface is concise, and its documentation adds useful context rather than unnecessary complexity. Action granularity: Each declaration occupies its own line and expresses a single responsibility. Reading flow: The progression from purpose to initialization to retrieval and update is natural and easy to follow.
Run 3
Code Structure: The interface logically groups a sentinel constant and related index getter/setter methods. Nesting: Flat declarations with no nested control flow make scanning effortless. Clarity of intent: Descriptive names and Javadoc clearly explain queue-specific state and usage constraints, though the parameter name 'i' and overloaded getter/setter naming are slightly less explicit. Code length: The interface is concise, with documentation proportional to its contract. Action granularity: Each declaration occupies its own line and expresses a single responsibility. Reading flow: The progression from interface purpose to initialization constant, getter, and setter is natural and consistent.