Sample
Buse/73
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.105 | 0–1; higher is more readable | 39.4Δ 13.1 |
| Scalabrino | 0.642 | 0–1; higher is more readable | 36.4Δ 16.2 |
| Dorn | 0.506 | 0–1; higher is more readable | 33.3Δ 19.2 |
| Mi | 0.223 | 0–1; higher is more readable | 11.1Δ 41.4 |
| LLOC | 5 | Logical lines; fewer is more readable | 29.8Δ 22.7 |
| DeepSeek V4 Pro | 12 | 0–20; mean of three runs | 27.8Δ 24.7 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 62.1Δ 9.6 |
| BTTF | 0.42 | 0–1; higher is more readable | 27.3Δ 25.3 |
| Human | 3.38 | 1–5; original rating | 52.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) |
|---|---|---|
| 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.823 | −7.234 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 187.296 | −6.181 |
| Source linesThe number of non-empty source lines. | 6 | +2.4 |
Intercept 8.87 + feature contributions = -2.145 (log-odds).
Score = sigmoid(-2.145) = 0.105.
| Score | 0.642 |
|---|
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. | 65 | +0.912 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 6 | +0.824 |
| 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. | 1 | −0.703 |
| 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.132 | −0.344 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 5.909 | −0.327 |
Intercept 0.07 + feature contributions = 0.026 (log-odds).
Score = sigmoid(0.026) = 0.506.
| Score | 0.223 |
|---|
| Score | 5 |
|---|
Run 1
The code is concise and logically structured, separating the null/equality check from the prefix/suffix analysis. The intent is clear: compact the message if there is a meaningful difference between expected and actual strings. The method is flat, with only one level of nesting, and each line represents a single action. However, readability is slightly reduced because the methods `findCommonPrefix()` and `findCommonSuffix()` are invoked without showing their effects or return values, and the variable names `fExpected` and `fActual` rely on a naming convention that may not be immediately obvious to all readers. The code snippet is incomplete, which limits full assessment of flow, but the visible portion reads naturally.
Run 2
The code snippet shows a method with moderate readability. It has clear intent with the 'compact' method and basic validation, but there are issues. The conditional check combines multiple conditions in one line, reducing clarity. The method calls 'findCommonPrefix()' and 'findCommonSuffix()' suggest good action granularity but the overall structure feels incomplete (likely missing code after suffix). Naming is reasonable but 'fExpected'/'fActual' use Hungarian notation which some find outdated. The reading flow is somewhat natural but the combined condition breaks the flow. The code is concise but perhaps too terse in places. Without seeing the full method, it's difficult to assess the complete structure, but from what's visible, it scores moderate on readability.
Run 3
The code is moderately readable but has issues. It's concise and reasonably structured, with clear intent in the null checks and string comparison. However, there are several concerns: unclear variable naming (fExpected, fActual follow Hungarian notation which is outdated), side-effect methods (findCommonPrefix/findCommonSuffix) that appear to mutate state without returning values, and an incomplete method that ends abruptly. The nesting is flat, and actions are mostly one per line. Reading flow is natural but the method termination leaves the logic unclear. Missing error handling and incomplete implementation reduce clarity.
Run 1
Code Structure: A clear early-return guard precedes logically ordered processing. Nesting: Flat, with no nested branches. Clarity of intent: Descriptive method names explain the comparison and prefix/suffix discovery, although the field names are less descriptive and the method is incomplete. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs one action; the compound condition remains easy to follow. Reading flow: Natural progression from handling exceptional cases to finding shared portions. Missing braces around the guard and the truncated method slightly reduce readability.
Run 2
Code Structure: The early return cleanly separates null or equal-string cases from the subsequent comparison steps. Nesting: The code is flat, with a single conditional and no nested blocks. Clarity of intent: Descriptive method names make formatting and common-prefix/suffix detection understandable, though the purpose of compact and the behavior of areStringsEqual depend on surrounding context. Code length: The excerpt is concise with no apparent redundancy. Action granularity: Each statement performs one action; the combined condition remains readable. Reading flow: The guard clause followed by prefix and suffix detection is natural. However, the excerpt is incomplete, lacking a closing brace and the remaining return logic, so the full method's readability cannot be assessed.
Run 3
Code Structure: A clear guard clause precedes logically ordered processing, but the snippet is incomplete. Nesting: Flat structure with an early return avoids unnecessary nesting. Clarity of intent: Descriptive method names communicate comparison and prefix/suffix detection, though the final compaction behavior is not shown. Code length: Concise, with no visible redundancy. Action granularity: Each statement performs one action; the combined guard conditions are straightforward. Reading flow: Natural progression from handling exceptional cases to finding shared portions. Missing closing code and braces limit evaluation of the complete method.