Sample
Buse/68
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.346 | 0–1; higher is more readable | 55.6Δ 4.5 |
| Scalabrino | 0.628 | 0–1; higher is more readable | 34.8Δ 16.2 |
| Dorn | 0.656 | 0–1; higher is more readable | 59.6Δ 8.6 |
| Mi | 0.545 | 0–1; higher is more readable | 44.4Δ 6.6 |
| LLOC | 4 | Logical lines; fewer is more readable | 59.6Δ 8.6 |
| DeepSeek V4 Pro | 12 | 0–20; mean of three runs | 27.8Δ 23.2 |
| GPT-6.1 Sol | 17.33 | 0–20; mean of three runs | 71.7Δ 20.7 |
| BTTF | 0.591 | 0–1; higher is more readable | 68.7Δ 17.7 |
| Human | 3.36 | 1–5; original rating | 51.0 |
Views
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.553 | −6.829 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 141.777 | −4.679 |
| Source linesThe number of non-empty source lines. | 5 | +2 |
Intercept 8.87 + feature contributions = -0.638 (log-odds).
Score = sigmoid(-0.638) = 0.346.
| Score | 0.628 |
|---|
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. | 55 | +1.336 |
| 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 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 4.75 | −0.343 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.11 | −0.131 |
Intercept 0.07 + feature contributions = 0.646 (log-odds).
Score = sigmoid(0.646) = 0.656.
| Score | 0.545 |
|---|
| Score | 4 |
|---|
Run 1
The code is concise and clearly structured. It demonstrates a flat hierarchy with no unnecessary nesting, making the logic easy to follow. The intent is straightforward: create a test result, attach a listener adapter, and run the test. Each line performs a single action, aligning with good action granularity. The reading flow is natural, from setup to execution. Minor deductions could be made for the inline variable assignment without a space (`result= new TestResult();`) and the slightly compressed listener creation, but overall this is highly readable and maintainable.
Run 2
The provided snippet is not a complete method: it lacks closing braces and shows only a fragment of the logic. Structure is essentially absent, making it impossible to judge organization or nesting. The intent is vaguely clear (running a test with a notifier), but the code is severely truncated, so clarity is undermined. Length is very short, but this is due to incompleteness, not conciseness. Action granularity appears low (one main action per line), but the missing closing context and abrupt end make reading flow feel broken. Overall, unreadable as presented.
Run 3
The code snippet is concise and mostly clear. It demonstrates a logical sequence: create a result object, add a listener, then run the test. The structure is flat with minimal nesting, and each line performs a distinct action, aligning well with action granularity and reading flow. However, there is a minor formatting inconsistency ('result= new TestResult();' has a space before '=' but not after), and variable naming like 'fTest' could be more explicit, slightly reducing clarity of intent. Since this is only a partial method, the overall context and complexity assessment is limited.
Run 1
Code Structure: A logically ordered sequence creates a result, attaches a listener, and runs the test. Nesting: Flat, with no nested control flow. Clarity of intent: Descriptive method and variable names make the purpose clear, though fTest uses a less readable naming convention. Code length: Concise, with no unnecessary statements. Action granularity: Each statement occupies its own line; the inline listener creation remains easy to understand. Reading flow: Natural setup-to-execution progression. Minor drawbacks are inconsistent spacing around '=' and the missing closing brace in the provided snippet.
Run 2
Code Structure: The method follows a logical sequence: create a result, attach a listener, and execute the test. Nesting: The code is flat, with no nested control flow. Clarity of intent: Names such as TestResult, addListener, and createAdaptingListener make the purpose clear, though fTest depends on surrounding context. Code length: The snippet is concise without unnecessary statements. Action granularity: Each statement performs one primary action; the nested listener-creation call remains easy to follow. Reading flow: Execution reads naturally from setup to test invocation. Inconsistent spacing around '=' slightly reduces polish, and the missing closing brace leaves the provided method incomplete.
Run 3
Code Structure: The method follows a logical setup-and-execute sequence, but the snippet lacks a closing brace. Nesting: Flat, with no nested control flow. Clarity of intent: Creating a test result, attaching an adapting listener, and running the test clearly convey the purpose; fTest is slightly less descriptive. Code length: Concise, with no unnecessary statements. Action granularity: Each statement performs one primary action, though listener creation is embedded in registration. Reading flow: Natural and easy to follow; inconsistent spacing around the assignment and the incomplete method slightly reduce readability.