Sample
int-eea23b28b273-I01
Remove line comments, block comments, and Javadoc
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.999 | 0–1; higher is more readable |
| Scalabrino | 0.158 | 0–1; higher is more readable |
| Dorn | 0.759 | 0–1; higher is more readable |
| Mi | 0.714 | 0–1; higher is more readable |
| LLOC | 2 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16.67 | 0–20; mean of three runs |
| BTTF | 0.584 | 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.628 | −6.942 |
| 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.706 (log-odds).
Score = sigmoid(6.706) = 0.999.
| Score | 0.158 |
|---|
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 |
| 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. | 65.8 | +0.878 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 29 | +0.266 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 29 | −0.245 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.098 | −0.012 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 28.761 | −0.008 |
Intercept 0.07 + feature contributions = 1.146 (log-odds).
Score = sigmoid(1.146) = 0.759.
| Score | 0.714 |
|---|
| Score | 2 |
|---|
Run 1
This code is highly readable due to its minimal, logical structure. It is a simple interface with one constant and two overloaded methods, organized clearly with package and imports. Nesting is nonexistent, and intent is clear: define a node's index in a priority queue. Code length is concise with no unnecessary elements. Each declaration is on its own logical line, maintaining good action granularity. The reading flow is natural, moving from constant to getter then setter. Minor deductions: the excessive blank lines between statements slightly disrupt flow, and the generic type parameter 'DefaultPriorityQueue<?>' could be simplified or documented. Overall, very clear and maintainable.
Run 2
The code is a simple Java interface with two methods, clearly named and logically organized. It has low nesting and clear intent. However, the excessive blank lines and spacing between elements slightly disrupt the natural reading flow and add unnecessary length.
Run 3
The code is highly readable. The structure is logical and minimal, presenting a clear interface contract. There is no problematic nesting. Intent is evident: it defines constants and accessor/mutator methods for priority queue indexing. The length is concise and appropriate for the interface's purpose. Each method declaration is on its own line, aligning with one action per line. The reading flow is natural, starting with the package, followed by the constant and then the getter/setter pair.
Run 1
Code Structure: A logically organized interface with one sentinel constant and two related methods. Nesting: No nested logic, making it easy to scan. Clarity of intent: The interface and constant names clearly convey queue-index tracking, though the overloaded getter/setter names and parameter 'i' are less explicit; documentation would clarify queue-specific behavior. Code length: The functional code is concise, but excessive blank lines unnecessarily lengthen the snippet. Action granularity: Each declaration occupies its own line, with no combined actions. Reading flow: Package, interface, constant, getter, and setter follow a natural order, although inconsistent vertical spacing disrupts visual continuity.
Run 2
Code Structure: A logically organized interface with one constant and two related methods. Nesting: No nesting, making it easy to scan. Clarity of intent: The constant clearly identifies the not-in-queue state, and the methods imply index retrieval and assignment, though the parameter name 'i' is vague and the getter/setter distinction is implicit. Code length: The functional code is concise, but excessive blank lines unnecessarily increase its visual length. Action granularity: Each declaration occupies its own line. Reading flow: The constant followed by getter and setter provides a natural sequence, but large gaps interrupt the flow.
Run 3
Code Structure: The interface is logically organized around a sentinel constant and two queue-index methods. Nesting: No nested logic, making it easy to scan. Clarity of intent: Names suggest tracking a node's position in a priority queue, but overloaded getter/setter names and the parameter 'i' could be clearer; documentation would help explain the queue-specific index contract. Code length: The substantive code is concise, but excessive blank lines unnecessarily lengthen the snippet. Action granularity: Each declaration occupies its own line, with no bundled actions. Reading flow: The constant followed by getter and setter is natural, though large whitespace gaps interrupt continuity.