Sample
Scalabrio36
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 35.7Δ 35.2 |
| Scalabrino | 0.041 | 0–1; higher is more readable | 2.0Δ 1.5 |
| Dorn | 0.003 | 0–1; higher is more readable | 1.0Δ 0.5 |
| Mi | 0.02 | 0–1; higher is more readable | 11.1Δ 10.6 |
| LLOC | 6 | Logical lines; fewer is more readable | 86.9Δ 86.4 |
| DeepSeek V4 Pro | 5.33 | 0–20; mean of three runs | 0.5Δ 0.0 |
| GPT-6.1 Sol | 9 | 0–20; mean of three runs | 0.0Δ 0.5 |
| BTTF | 0.201 | 0–1; higher is more readable | 2.0Δ 1.5 |
| Human | 2.22 | 1–5; original rating | 0.5 |
Views
Select the downloaded ZIP or its extracted folder. Files stay in your browser.
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. | 810 | −26.73 |
| 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.659 | −6.989 |
| Source linesThe number of non-empty source lines. | 12 | +4.8 |
Intercept 8.87 + feature contributions = -20.049 (log-odds).
Score = sigmoid(-20.049) = 0.
| Score | 0.041 |
|---|
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. | 195 | −4.594 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.191 | −0.916 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 12 | +0.611 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 10 | −0.391 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 10.76 | −0.259 |
Intercept 0.07 + feature contributions = -5.886 (log-odds).
Score = sigmoid(-5.886) = 0.003.
| Score | 0.02 |
|---|
| Score | 6 |
|---|
Run 1
The code is difficult to read due to severe nesting, ambiguity, and overloading of multiple actions and conditions into single lines. The first two guard clauses (null and self-checks) are clear, but the final return statement is a dense, tangled expression with nested ternary operators and mixed logical ANDs, making intent hard to follow. The repeated pattern for schema and catalog comparisons is duplicated, leading to unnecessary length and complexity. Action granularity is poor—multiple ternary decisions and equality checks occur in a single line, obscuring logic. Reading flow suffers because the reader must parse deeply nested ternary logic to understand the return value. Clarity of intent is low; the code fails to express conditions in a straightforward if-else or helper-method form. Overall, the code lacks structure, readability, and maintainability. Refactoring into guarded if blocks or helper methods would greatly improve clarity.
Run 2
The code is difficult to read due to a heavily condensed return statement that combines multiple ternary operations and boolean logic. The method starts clearly with null and identity checks, but the main comparison logic is tangled in one line, making it hard to follow. Nesting is symbolic rather than structural, but the dense expression creates cognitive overload. Clarity of intent is poor: the logic for schema and catalog comparison is repeated and obscured. Code length is concise but at the cost of readability. Action granularity is violated—multiple actions occur on one line. Reading flow is disjointed; the reader must parse complex conditionals without formatting or helper methods. Overall, the code needs decomposition and better formatting to be maintainable.
Run 3
The code has a clear structure with early returns for null and identity checks, but the main equality logic is severely compromised by deeply nested ternary expressions that span multiple lines. The intent is difficult to discern - the reader must mentally trace through multiple conditional branches to understand when schemas and catalogs are considered equal. While the method is relatively concise, it achieves this at the cost of readability through excessive brevity. Action granularity is poor as multiple complex comparisons are chained in single expressions. The reading flow is disrupted by the tangled ternary operations and boolean logic. Refactoring the nested ternaries into helper methods or explicit if-statements would dramatically improve clarity.
Run 1
Code Structure: Clear null and identity guards, but the remaining comparisons are compressed into one tangled expression. Nesting: Multiple nested ternaries make schema and catalog checks difficult to parse. Clarity of intent: Comparing table names, schemas, and catalogs is apparent, but mixing ternaries with && obscures precedence; schema and catalog checks apply only to the unquoted-name branch. Code length: Short, but excessively compressed rather than usefully concise. Action granularity: Several comparison decisions share each line, increasing cognitive load. Reading flow: Early returns read naturally, while the final expression requires careful backtracking to understand grouping. Explicit parentheses and extracted comparison helpers would improve readability.
Run 2
Code Structure: Simple guard clauses provide a clear opening, but the final return combines several distinct comparisons. Nesting: Deeply chained ternary expressions make schema and catalog checks difficult to parse. Clarity of intent: Equality checking is apparent, but mixing ternaries with logical AND obscures precedence; schema and catalog checks apply only to the unquoted-name branch. Code length: Short overall, yet excessively dense rather than helpfully concise. Action granularity: Multiple decisions and comparisons are packed into each line instead of separated into named intermediate results. Reading flow: The initial checks read naturally, but the long return expression requires careful backtracking to understand grouping and null handling.
Run 3
Code Structure: Clear null and identity checks precede a tangled comparison expression. Nesting: Control-flow nesting is shallow, but chained nested ternaries impose substantial cognitive load. Clarity of intent: Names suggest table equality with quote-sensitive comparisons, yet operator precedence obscures that schema and catalog checks apply only to the unquoted-name branch. Code length: Short overall, but overly compressed rather than effectively concise. Action granularity: Initial checks are simple; the return expression combines several comparisons and null-handling decisions into dense lines. Reading flow: Early returns read naturally, while the final expression forces careful parsing and repeated interpretation of similar schema and catalog logic.