Sample
Buse/46
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.929 | 0–1; higher is more readable | 90.9Δ 19.2 |
| Scalabrino | 0.856 | 0–1; higher is more readable | 75.8Δ 4.0 |
| Dorn | 0.791 | 0–1; higher is more readable | 79.8Δ 8.1 |
| Mi | 0.586 | 0–1; higher is more readable | 53.5Δ 18.2 |
| LLOC | 4 | Logical lines; fewer is more readable | 59.6Δ 12.1 |
| DeepSeek V4 Pro | 16 | 0–20; mean of three runs | 73.2Δ 1.5 |
| GPT-6.1 Sol | 16.33 | 0–20; mean of three runs | 50.0Δ 21.7 |
| BTTF | 0.72 | 0–1; higher is more readable | 91.9Δ 20.2 |
| Human | 3.76 | 1–5; original rating | 71.7 |
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.521 | −6.782 |
| Source linesThe number of non-empty source lines. | 11 | +4.4 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 118.536 | −3.912 |
Intercept 8.87 + feature contributions = 2.577 (log-odds).
Score = sigmoid(2.577) = 0.929.
| Score | 0.856 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 12 | +0.611 |
| 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. | 73 | +0.573 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.039 | +0.559 |
| 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. | 10.851 | −0.258 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 55 | +0.083 |
Intercept 0.07 + feature contributions = 1.334 (log-odds).
Score = sigmoid(1.334) = 0.791.
| Score | 0.586 |
|---|
| Score | 4 |
|---|
Run 1
The code is highly readable. It has a clear logical structure with a simple recursive pattern. Nesting is minimal (single if-else). The method's intent is documented with a Javadoc comment that even notes a potential improvement (returning type bsh.This), showing awareness of design consistency. Code length is appropriately concise for the functionality. Each line performs one clear action — checking for parent, recursing, or returning the current instance. The reading flow is natural: check if there's a parent, if so delegate upward, otherwise return this namespace. Variable naming is descriptive and consistent with domain conventions. The indentation is slightly inconsistent but minor. The recursive logic could benefit from an explicit base case comment, but the structure makes it self-evident. Overall, this is close to exemplary readable code with only trivial formatting issues preventing a perfect score.
Run 2
The code is reasonably readable: the method name and Javadoc clearly state intent, and the logic is straightforward with minimal nesting. The if-else structure is flat and returns are explicit, with one action per line. However, readability is reduced by inconsistent indentation (mixing tabs and spaces) and the Javadoc comment formatting is misaligned. The note about returning type 'bsh.This' adds useful context but also indicates potential ambiguity in the return type, slightly weakening clarity of intent. Parameter naming is clear, and the overall length is concise. With cleaner formatting and consistent indentation, this would score higher.
Run 3
The code is quite readable. The structure is logical—a simple conditional determining top-level namespace. Nesting is minimal, with only one level. Intent is clear from the method name and Javadoc comment. Length is concise, with no unnecessary lines. Action granularity is mostly one action per line, though the if/else could be slightly more expanded. Reading flow is natural: check parent, return global or this. Minor deductions: the Javadoc is slightly verbose and references a potential future change, and it's a bit terse, but overall very understandable.
Run 1
Code Structure: A simple recursive method is logically organized, though the missing closing brace makes the snippet incomplete. Nesting: One shallow conditional is easy to follow. Clarity of intent: The method name, descriptive comment, and parent traversal clearly convey retrieval of the top-level namespace reference. Code length: Concise, although the else is unnecessary after an immediate return. Action granularity: Each statement performs one action. Reading flow: The condition and two return paths read naturally, but inconsistent indentation and the absent closing brace slightly disrupt readability.
Run 2
Code Structure: The method has a simple, logical conditional structure, though the snippet lacks a closing method brace and has inconsistent indentation. Nesting: Minimal nesting makes both branches easy to follow. Clarity of intent: The method name, comment, and recursive parent traversal clearly convey retrieval of the top-level namespace representation. Code length: Concise, with no unnecessary implementation detail; the else could be omitted after the early return. Action granularity: Each line performs a single clear action. Reading flow: The parent check followed by recursive traversal or a local return reads naturally, but mixed formatting and the incomplete method slightly disrupt readability.
Run 3
Code Structure: A simple recursive method with logically organized branches, though the missing closing brace makes the snippet incomplete. Nesting: Only one shallow if/else, so it is easy to follow. Clarity of intent: The method name and comment clearly explain that it retrieves the top-level namespace; the type-consistency note adds useful context. Code length: Concise, with no unnecessary logic, although the else could be omitted after the first return. Action granularity: Each statement performs one action. Reading flow: The parent check naturally leads either to recursion or to returning the current namespace, but inconsistent indentation and spacing slightly disrupt readability.