Sample
Schnappinger/argoUML/org.argouml.uml.diagram.state.ui.ButtonActionNewCallEvent
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 1 | 0–1; higher is more readable | 96.3Δ 42.5 |
| Scalabrino | 0.891 | 0–1; higher is more readable | 86.6Δ 32.8 |
| Dorn | 0.785 | 0–1; higher is more readable | 82.2Δ 28.4 |
| Mi | 0.552 | 0–1; higher is more readable | 42.2Δ 11.6 |
| LLOC | 6 | Logical lines; fewer is more readable | 79.7Δ 25.9 |
| DeepSeek V4 Pro | 17.67 | 0–20; mean of three runs | 83.0Δ 29.2 |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs | 92.6Δ 38.8 |
| BTTF | 0.784 | 0–1; higher is more readable | 94.4Δ 40.6 |
| Human | 3.9 | 1–4; original rating | 53.8 |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Source linesThe number of non-empty source lines. | 61 | +24.4 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 353.108 | −11.653 |
| 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.197 | −7.795 |
Intercept 8.87 + feature contributions = 13.823 (log-odds).
Score = sigmoid(13.823) = 1.
| Score | 0.891 |
|---|
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. | 62 | −1.159 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.012 | +0.822 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 60.886 | +0.441 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| 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. | 77.968 | +0.363 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 70.629 | +0.335 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 22 | +0.024 |
Intercept 0.07 + feature contributions = 1.294 (log-odds).
Score = sigmoid(1.294) = 0.785.
| Score | 0.552 |
|---|
| Score | 6 |
|---|
Run 1
The code is highly readable with a clear, logical structure. The class has a single responsibility and extends an appropriate base class. Methods are short, focused, and well-named, with zero nesting depth. Each method performs one action, maintaining good action granularity. The reading flow is natural: the methods follow a logical order (create, getKeyName, getIconName). The extensive license header is the only detractor from readability, as it adds significant length before reaching the actual code. However, the code itself is concise and unambiguous. The class and method purposes are immediately clear from their names. Overall, this is exemplary readable code with the only minor issue being the verbose legal header that could be shortened or moved to an external file.
Run 2
The code is highly readable due to its clean structure, clear intent, and concise implementation. Each method performs a single action, demonstrating excellent action granularity. The class has a logical organization with minimal nesting and a natural reading flow from class declaration to simple method implementations. The only minor deductions are for lengthy boilerplate license headers that delay reaching the actual code logic, but they do not significantly impact understanding. Method names like createEvent, getKeyName, and getIconName clearly convey their purposes. The code is well-formatted, follows consistent naming conventions, and maintains a flat hierarchy without unnecessary complexity. The inherited base class provides context, keeping this class focused and maintainable.
Run 3
The code is highly readable. The structure is logical and minimal, with a simple class extending a base class and overriding three concise methods. Nesting is essentially flat, with no conditional or loop structures. The intent is clear from the class name and method names: creating a new call event action. Code length is appropriately concise for its purpose. Each method performs a single action, maintaining excellent action granularity. Reading flow is natural, following a standard getter/build method pattern. Minor deductions could be made for the lengthy license header and lack of explicit Javadoc on the overridden methods, but the actual code is clean and maintainable.
Run 1
Code Structure: The class is logically organized into three small, focused methods. Nesting: There is no conditional or loop nesting, making the implementation easy to scan. Clarity of intent: The class name, documentation, method names, and factory call clearly convey creation of a call event; the abbreviated parameter 'ns' and generic Object types slightly reduce clarity. Code length: The implementation is concise, although the lengthy license header delays reaching the relevant code. Action granularity: Each method contains a single return statement, with one clear action per line. Reading flow: The package, import, class documentation, and methods follow a natural Java layout, with consistent indentation and spacing.
Run 2
Code Structure: A small, focused subclass cleanly separates event creation, localization key, and icon name into three methods. Nesting: No nested control flow; each method is flat and easy to scan. Clarity of intent: Descriptive class and method names, plus a short class comment, clearly communicate the purpose. The generic Object type and abbreviated parameter ns slightly reduce clarity. Code length: The implementation is concise, although lengthy license headers dominate the file visually. Action granularity: Each method contains a single return statement, keeping actions clearly separated. Reading flow: Conventional package, import, class, and method ordering makes navigation natural and predictable.
Run 3
Code Structure: A focused class with three small, clearly separated methods and a single import. Nesting: No conditional or loop nesting; method bodies are flat. Clarity of intent: The class name, documentation, factory call, and resource names clearly convey call-event creation, although 'ns' and Object types provide limited context. Code length: Implementation is concise; extensive licensing comments add visual bulk but do not complicate the logic. Action granularity: Each method contains one return statement, keeping operations easy to distinguish. Reading flow: Conventional Java organization and consistent formatting make the code straightforward to scan and understand.