Sample
MBJP/2
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.009 | 0–1; higher is more readable | 50.0Δ 21.9 |
| Scalabrino | 0.467 | 0–1; higher is more readable | 12.5Δ 59.4 |
| Dorn | 0.716 | 0–1; higher is more readable | 62.5Δ 9.4 |
| Mi | 0.605 | 0–1; higher is more readable | 37.5Δ 34.4 |
| LLOC | 8 | Logical lines; fewer is more readable | 62.5Δ 9.4 |
| DeepSeek V4 Pro | 17.33 | 0–20; mean of three runs | 75.0Δ 3.1 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 65.6Δ 6.2 |
| BTTF | 0.607 | 0–1; higher is more readable | 75.0Δ 3.1 |
| Human | 4.5 | 1–5; original rating | 71.9 |
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. | 509.049 | −16.799 |
| 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.488 | −6.732 |
Intercept 8.87 + feature contributions = -4.661 (log-odds).
Score = sigmoid(-4.661) = 0.009.
| Score | 0.467 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 96.96 | +0.76 |
| 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. | 96.84 | −0.437 |
| 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.072 | +0.243 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 16 | −0.184 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 25 | +0.151 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 23.745 | −0.078 |
Intercept 0.07 + feature contributions = 0.924 (log-odds).
Score = sigmoid(0.924) = 0.716.
| Score | 0.605 |
|---|
| Score | 8 |
|---|
Run 1
The code is highly readable. It has a clear, single-purpose function with good naming, minimal nesting (one loop and one conditional), and natural reading flow. The logic is concise and uses appropriate data structures (HashSet for O(1) lookups). Each line performs one action. The only minor deductions are for slightly redundant imports and a DocBlock format that could be more idiomatic, but overall the code is clean and understandable.
Run 2
The code is well-structured with a clear class and method. It uses a HashSet for efficient lookup and a simple loop to find common elements, then sorts the result. Nesting is minimal (one loop with one conditional), and intent is clear from the method name and Javadoc examples. The code is concise and each logical action is on its own line. Reading flow is natural: create set, initialize list, iterate, add matches, sort, return. Minor deductions: the Javadoc formatting has an odd '*' and '>' prefixes in examples that slightly reduce readability, but the core logic is highly readable.
Run 3
The code is well-structured with a clear method containing a straightforward algorithm. Nesting is minimal, with only one level inside the loop. The intent is evident: find common elements between two lists and return them sorted. The use of a HashSet for efficient lookups demonstrates clarity of thought. Code length is appropriate—no unnecessary verbosity. Each action is on its own line, except the if-statement which is concise and readable. The reading flow is natural: convert first list to set, iterate second list, collect matches, sort, return. The Javadoc examples add helpful context. Minor deduction for potentially misleading use of 'tuple' terminology and that the method omits duplicates if they appear multiple times, which could be ambiguous to maintainers unfamiliar with set semantics.
Run 1
Code Structure: Logically organized into set construction, intersection collection, sorting, and return. Nesting: Shallow, with only one conditional inside a loop. Clarity of intent: The method name and examples clearly communicate the purpose, though testTup1/testTup2 are less descriptive than firstList/secondList, and the documentation refers to tuples rather than Java lists. Duplicate handling is not explained. Code length: Concise, with no unnecessary implementation steps. Action granularity: Each statement performs one clear action. Reading flow: Natural and sequential, with consistent formatting. The wildcard import and minor documentation issues slightly reduce readability.
Run 2
Code Structure: Logically organized into set construction, intersection collection, sorting, and return. Nesting: Shallow, with only an if statement inside a loop. Clarity of intent: The method name and examples clearly communicate the purpose, though testTup1/testTup2 are less descriptive and the documentation calls Java lists tuples. Code length: Concise, with no unnecessary implementation steps. Action granularity: Each statement performs one clear action. Reading flow: Natural and sequential, supported by consistent formatting. Minor readability drawbacks include the wildcard import, the stray asterisk in the documentation, and unspecified duplicate-handling behavior.
Run 3
Code Structure: Logically organized into set creation, matching, sorting, and return. Nesting: Shallow, with only an if statement inside a loop. Clarity of intent: The method name and examples clearly communicate finding shared elements, although testTup1/testTup2 and set1 are generic names, and the documentation incorrectly refers to tuples rather than lists. Duplicate handling is not explained. Code length: Concise, with no unnecessary implementation steps. Action granularity: Each statement performs one clear action on its own line. Reading flow: Natural progression from input preparation to result construction and sorting. The wildcard import and minor documentation issues slightly reduce readability.