Sample
Buse/99
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.012 | 0–1; higher is more readable | 19.2Δ 16.2 |
| Dorn | 0.509 | 0–1; higher is more readable | 34.3Δ 1.0 |
| Mi | 0.504 | 0–1; higher is more readable | 42.4Δ 7.1 |
| LLOC | 4 | Logical lines; fewer is more readable | 59.6Δ 24.2 |
| DeepSeek V4 Pro | 12 | 0–20; mean of three runs | 27.8Δ 7.6 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 62.1Δ 26.8 |
| BTTF | 0.43 | 0–1; higher is more readable | 31.3Δ 4.0 |
| Human | 2.96 | 1–5; original rating | 35.4 |
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. | 351.862 | −11.611 |
| 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.309 | −6.464 |
| Source linesThe number of non-empty source lines. | 12 | +4.8 |
Intercept 8.87 + feature contributions = -4.406 (log-odds).
Score = sigmoid(-4.406) = 0.012.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| 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. | 72.846 | +0.58 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 13 | +0.576 |
| 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. | 12 | −0.322 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 11.905 | −0.243 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.119 | −0.219 |
Intercept 0.07 + feature contributions = 0.035 (log-odds).
Score = sigmoid(0.035) = 0.509.
| Score | 0.504 |
|---|
| Score | 4 |
|---|
Run 1
The code is generally readable with clear intent and flat structure. It checks if an expression type is not one of several constants, then wraps the DDL string in parentheses. However, readability is slightly reduced by the unnecessary StringBuffer allocation — a simple string concatenation would be clearer. The multi-line condition is well-formatted and easy to scan. Action granularity is good with one logical action per line. Reading flow is natural: check condition, modify string, return. Minor improvements could include extracting the condition into a named boolean variable for clarity, and simplifying the string wrapping to avoid StringBuffer overhead. Overall, the code is concise and maintainable.
Run 2
The code is a simple conditional check with a single nested block, so structure and nesting are not major issues. However, readability suffers due to the long, multi-line boolean expression that is hard to scan at a glance. The purpose is somewhat clear—wrapping a DDL string in parentheses under certain conditions—but the repeated `expression.exprType !=` comparisons create noise. The code is concise, but action granularity is mixed: the `StringBuffer` creation is unnecessary overhead and the append/toString chain could be simplified. Reading flow is interrupted by the awkward use of `StringBuffer` and the slightly misleading variable name `temp`. Overall, functional but not clean or immediately clear.
Run 3
The code is reasonably readable but has some structural issues. The multi-line condition is well-formatted and clearly lists all excluded expression types, making intent relatively clear. However, the nesting is moderate and the condition could be simplified using a Set or switch statement for better clarity. The use of StringBuffer is overly verbose for a simple string concatenation, reducing code length efficiency. Action granularity is good — each operation is on its own line. Reading flow is natural, but the temporary StringBuffer variable adds unnecessary complexity. Overall, the logic is understandable but could be more concise and maintainable with simpler constructs.
Run 1
Code Structure: A logically organized conditional transformation followed by a return. Nesting: Only one conditional level, making control flow easy to follow. Clarity of intent: Parenthesizing ddl is clear, but the reason for excluding these expression types is implicit, and ddl is an abbreviated name. Code length: Concise overall, though the repeated comparisons and temporary buffer add verbosity. Action granularity: Most statements perform one logical action; the append chain combines related operations without becoming difficult to understand. Reading flow: Natural top-to-bottom progression, with consistent condition alignment, although the long exclusion list slightly slows reading.
Run 2
Code Structure: Logically organized as a conditional formatting step followed by a return. Nesting: Only one conditional level, making control flow easy to follow. Clarity of intent: Parenthesizing ddl for certain expression types is clear, though the rationale for excluding these six types is not explained. Code length: Short overall, but repeated comparisons and a temporary StringBuffer add some verbosity. Action granularity: Each statement performs one main action; the append chain cohesively constructs the parenthesized string. Reading flow: Natural top-to-bottom flow, with the multiline condition slightly slowing comprehension.
Run 3
Code Structure: The conditional wrapping followed by a return is logically organized. Nesting: Only one conditional level keeps the code easy to follow. Clarity of intent: Adding parentheses for expression types outside the listed exceptions is clear, though the rationale for those exceptions is not explained. Code length: The snippet is short, but repeated expression.exprType comparisons and the temporary buffer add some verbosity. Action granularity: Statements have focused purposes; the append chain combines closely related formatting operations without obscuring them. Reading flow: The condition, formatting step, and return follow a natural sequence, although inconsistent condition wrapping slightly reduces visual consistency.