Sample
Schnappinger/argoUML/org.argouml.util.PredicateTrue
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 1 | 0–1; higher is more readable | 98.3Δ 47.0 |
| Scalabrino | 0.943 | 0–1; higher is more readable | 97.3Δ 45.9 |
| Dorn | 0.782 | 0–1; higher is more readable | 80.9Δ 29.5 |
| Mi | 0.642 | 0–1; higher is more readable | 71.3Δ 20.0 |
| LLOC | 6 | Logical lines; fewer is more readable | 79.7Δ 28.4 |
| DeepSeek V4 Pro | 17.67 | 0–20; mean of three runs | 83.0Δ 31.7 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 73.8Δ 22.4 |
| BTTF | 0.893 | 0–1; higher is more readable | 100.0Δ 48.7 |
| Human | 3.9 | 1–4; original rating | 51.3 |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 66 | +26.4 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 252.009 | −8.316 |
| Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value. | 5.149 | −7.723 |
Intercept 8.87 + feature contributions = 19.23 (log-odds).
Score = sigmoid(19.23) = 1.
| Score | 0.943 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 67 | −1.336 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.008 | +0.859 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 65.838 | +0.51 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 74.463 | +0.397 |
| 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. | 78.925 | +0.322 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 23 | +0.058 |
Intercept 0.07 + feature contributions = 1.28 (log-odds).
Score = sigmoid(1.28) = 0.782.
| Score | 0.642 |
|---|
| Score | 6 |
|---|
Run 1
The code is highly readable with excellent structure: a single class with a clear singleton pattern, minimal methods, and logical organization. Nesting is completely flat, and intent is unambiguous—a Predicate that always returns true. Code length is concise and appropriate for its purpose. Each action in the methods is on its own line, aiding readability. The reading flow is natural from constructor to evaluate to singleton accessor. The only minor drawback is the lengthy copyright header, which can obscure the actual code at first glance; removing it from the visible portion would improve the immediate readability without affecting the code logic.
Run 2
The code is highly readable due to its clear structure and simple purpose. It implements a singleton predicate with a private constructor, a single evaluate method, and a static accessor. There is no nesting and each line performs one action, aiding clarity. The class is concise and focused. The only drawback is the lengthy license header, which, while standard for open-source files, adds visual noise before the actual code and somewhat disrupts the initial reading flow. Excluding the header, the implementation is exemplary in clarity and intent.
Run 3
The code is highly readable. It follows a clear logical structure with license headers, package declaration, class definition, constructor, methods, and singleton field in sensible order. The nesting is flat, with no conditional or loop complexity. The intent of the PredicateTrue class is immediately clear from the class name and Javadoc comment, which explains the singleton pattern and purpose. The code is concise, containing only what is necessary with minimal boilerplate beyond required licensing. Each action occupies its own line with clear method boundaries, demonstrating good action granularity. The reading flow is natural, progressing from documentation through declaration to implementation details. Minor deductions include the long license header, which interrupts the flow before reaching code, and the singleton field placement after methods rather than at the top, which is slightly unconventional. Overall, the implementation is straightforward and self-documenting.
Run 1
Code Structure: A simple, logically organized singleton class, though placing the instance field before the methods would improve conventional organization. Nesting: Minimal nesting with no conditional branches. Clarity of intent: The class name, documentation, and unconditional return clearly convey an always-true predicate. Code length: The implementation is concise; the extensive license header adds reading overhead but serves a legitimate purpose. Action granularity: Each statement performs one action, with no compressed multi-action lines. Reading flow: Consistent formatting and short methods make the code easy to follow, although the lengthy header delays reaching the implementation and the singleton field interrupts the method sequence.
Run 2
Code Structure: The small class cleanly separates construction, evaluation, and singleton access, though declaring the singleton field before methods would improve organization. Nesting: There is no nested control flow. Clarity of intent: The class name, documentation, and unconditional return clearly communicate an always-true predicate; the private constructor makes the singleton pattern evident. Code length: Implementation is concise, although extensive license comments dominate the file. Action granularity: Each statement performs one simple action. Reading flow: Formatting and short methods make the code easy to follow, with minor interruption from the field placement and lengthy header.
Run 3
Code Structure: The small class cleanly separates construction, predicate evaluation, and singleton access, although placing the singleton field before the methods would be more conventional. Nesting: There is no nested control flow. Clarity of intent: The class name, documentation, and unconditional return clearly communicate an always-true predicate; the private constructor makes the singleton design evident. Code length: The implementation is concise, but extensive licensing comments dominate the file. Action granularity: Each statement performs one action, with no compressed operations. Reading flow: Formatting and short methods make the implementation easy to follow, though the lengthy header and late field declaration slightly interrupt the flow.