Sample
Schnappinger/diarymanagement/TBA.Data.User#ddf7c5b75ed4
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Dorn | 0.895 | 0–1; higher is more readable | 96.0Δ 0.3 |
| Mi | 0.818 | 0–1; higher is more readable | 97.4Δ 1.0 |
| LLOC | 30 | Logical lines; fewer is more readable | 49.2Δ 47.2 |
| DeepSeek V4 Pro | 14 | 0–20; mean of three runs | 29.9Δ 66.5 |
| GPT-6.1 Sol | 16.67 | 0–20; mean of three runs | 48.0Δ 48.3 |
| BTTF | 0.692 | 0–1; higher is more readable | 78.9Δ 17.5 |
| Human | 4 | 1–4; original rating | 96.4 |
Views
Loading feature diagnosis…
Source regions
Feature contributions
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. | 121 | −3.248 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 85 | +2.203 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 124.731 | +1.334 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.041 | +0.543 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 76.952 | +0.437 |
| 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. | 76.952 | +0.406 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
Intercept 0.07 + feature contributions = 2.143 (log-odds).
Score = sigmoid(2.143) = 0.895.
| Score | 0.818 |
|---|
| Score | 30 |
|---|
Run 1
The code is functional but has several readability issues. The class provides basic getters/setters with JavaDoc, which is clear, but inconsistent naming (e.g., 'Diaries' field and parameter names starting with uppercase) breaks Java conventions and reduces clarity. The field 'Diaries' should be 'diaries'. JavaDoc comments are repetitive and not consistently formatted. The 'replaceDiary' method has a loop with a conditional and a break, which could be clearer using streams or better separation. Overall structure is simple and reasonably organized, but naming and documentation issues, along with minor formatting inconsistencies, diminish readability. The code would benefit from following standard Java naming conventions and reducing redundant comments.
Run 2
The code is generally readable and follows a simple JavaBean pattern with clear getter/setter methods and Javadoc comments. Structure is logical, nesting is minimal, and each method performs one action. However, readability suffers slightly due to inconsistent formatting (uneven indentation), unconventional field naming (`Diaries` starts with uppercase), and redundant documentation. Some comments add little value, like 'Sets the sessionID field of a user.' The class is concise and straightforward, but lacks constructor initialization, which could make intent clearer. Overall, it is functional and understandable, but not polished.
Run 3
The code is generally readable with clear intent, simple getters/setters, and logical organization. It benefits from flat nesting and one action per line. However, issues slightly reduce readability: inconsistent indentation (some methods use 3 spaces vs other blocks), non-standard field naming (`Diaries` should be `diaries`), parameter names shadowing field names without clarity, redundant/no-value Javadoc on trivial getters/setters, and a lack of constructor or null-checking for the `Diaries` list. The `replaceDiary` method is clear but relies on `Diaries` being initialized elsewhere. Overall, it's maintainable but could be improved with better naming conventions and consistent formatting.
Run 1
1. Code Structure: Fields precede straightforward accessors and a diary-update method, providing logical organization, though getter/setter pairing is inconsistent. 2. Nesting: Accessors are flat; replaceDiary has only a loop and conditional, making nesting easy to follow. 3. Clarity of intent: Descriptive method and field names communicate purpose. However, capitalized Diaries violates Java naming conventions, and comments incorrectly describe ArrayList as Vector. 4. Code length: Method bodies are concise, but repetitive Javadoc adds unnecessary length for obvious accessors. 5. Action granularity: Each statement performs one action, with no compressed multi-action lines. 6. Reading flow: The class is easy to scan, but inconsistent indentation, spacing, and accessor ordering slightly disrupt flow.
Run 2
Code Structure: Fields and methods are logically organized, though grouping each getter with its setter would improve navigation. Nesting: Accessors are flat; replaceDiary uses only a straightforward loop and conditional. Clarity of intent: Descriptive method names make the user-data model and diary update clear, but capitalized Diaries is unconventional, and comments incorrectly describe ArrayList as Vector. Code length: Implementation is concise, but repetitive accessor documentation adds unnecessary bulk. Action granularity: Each statement performs one clear action on its own line. Reading flow: Consistent braces and simple methods support easy reading, while uneven indentation and inconsistent accessor ordering mildly disrupt the flow.
Run 3
Code Structure: Fields and small methods are logically organized, though grouping matching getters and setters would improve navigation. Nesting: Most methods are flat; replaceDiary has only a straightforward loop and conditional. Clarity of intent: Descriptive method names make the purpose clear, but the capitalized Diaries field violates naming conventions, and comments incorrectly describe ArrayList as Vector. Code length: The implementation is concise, although repetitive accessor documentation adds unnecessary length. Action granularity: Each statement performs a single action, making operations easy to follow. Reading flow: Consistent brace placement and simple control flow support readability, but uneven indentation and scattered accessor pairs slightly disrupt the flow.