Sample
Buse/70
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0 | 0–1; higher is more readable | 4.0Δ 5.1 |
| Scalabrino | 0.372 | 0–1; higher is more readable | 7.6Δ 1.5 |
| Dorn | 0.171 | 0–1; higher is more readable | 7.1Δ 2.0 |
| Mi | 0.203 | 0–1; higher is more readable | 9.1Δ 0.0 |
| LLOC | 5 | Logical lines; fewer is more readable | 29.8Δ 20.7 |
| DeepSeek V4 Pro | 16.33 | 0–20; mean of three runs | 77.3Δ 68.2 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 62.1Δ 53.0 |
| BTTF | 0.286 | 0–1; higher is more readable | 5.1Δ 4.0 |
| Human | 2.4 | 1–5; original rating | 9.1 |
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) |
|---|---|---|
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 392.551 | −12.954 |
| 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.361 | −6.542 |
| Source linesThe number of non-empty source lines. | 7 | +2.8 |
Intercept 8.87 + feature contributions = -7.826 (log-odds).
Score = sigmoid(-7.826) = 0.
| Score | 0.372 |
|---|
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 8 | +0.753 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| 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. | 98.875 | −0.523 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.144 | −0.458 |
| 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. | 6.82 | −0.315 |
Intercept 0.07 + feature contributions = -1.581 (log-odds).
Score = sigmoid(-1.581) = 0.171.
| Score | 0.203 |
|---|
| Score | 5 |
|---|
Run 1
The code is highly readable with clear structure and intent. It early-returns on invalid state, avoiding nesting. Variable names 'f' and 'loc' are context-dependent but acceptable in a mouse handler. Each line performs a single logical action across two concise statements. The flow is natural: validate state, convert point, begin dragging. Minor deduction for the single-letter variable 'f' (presumably a JInternalFrame) and the slightly long conversion call, but overall the logic is clear and maintainable.
Run 2
The code is logically structured with a clear early return for invalid states, avoiding unnecessary nesting. Intent is evident: guard against missing desktop pane/manager, then initiate frame dragging. Lines are concise and each performs a distinct action. Minor drawbacks: the repeated call to f.getDesktopPane() and f.getDesktopPane().getDesktopManager() slightly reduces readability and could be extracted into a local variable. The cast of e.getSource() to Component is somewhat awkward but necessary given the API. Overall, the method is short, flat, and easy to follow, with only minor opportunities for refactoring.
Run 3
The code is highly readable. It has a clear structure, minimal nesting, and each action is on its own line. The intent—handle mouse press for frame dragging—is unambiguous due to the clear guard clause and method names. The reading flow is logical: check guards, compute location, then begin dragging. The only minor detraction is lack of comment or constant extraction for the repeated desktop pane retrieval, but overall it is concise and well-organized.
Run 1
Code Structure: Logically organized into a guard clause, coordinate conversion, and drag initiation. Nesting: Flat, with only one conditional and an early return. Clarity of intent: The method and API names clearly indicate mouse-driven frame dragging, but abbreviated variables such as f and loc reduce clarity. Code length: Concise, though repeated desktop-pane and manager access adds minor verbosity. Action granularity: Each statement performs one main action. Reading flow: Natural progression from validation to preparation to action. The missing closing brace makes the provided snippet structurally incomplete.
Run 2
Code Structure: A straightforward event handler uses a guard clause before drag initialization. Nesting: Minimal; the early return avoids nested logic. Clarity of intent: The mouse event and beginDraggingFrame call clearly indicate drag initiation, but abbreviated names f and loc obscure their roles. Code length: Concise, although repeated desktop-pane and manager access adds minor clutter. Action granularity: Each statement performs one primary action, with conversion arguments kept together. Reading flow: Validation, coordinate conversion, and drag initiation follow a natural sequence. The missing closing brace makes the provided snippet incomplete and slightly reduces readability.
Run 3
Code Structure: Logically organized into a prerequisite check, coordinate conversion, and drag initiation. Nesting: A shallow guard clause avoids unnecessary nesting. Clarity of intent: Swing API calls make the purpose understandable, but abbreviated names such as f and loc obscure context. Code length: Concise, though repeated desktop-pane lookups add minor visual clutter. Action granularity: Each statement performs one main action. Reading flow: Natural progression from validation to setup and execution. The missing closing brace leaves the provided method incomplete and slightly reduces readability.