Sample
Buse/77
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.049 | 0–1; higher is more readable | 32.3Δ 10.6 |
| Dorn | 0.115 | 0–1; higher is more readable | 2.0Δ 19.7 |
| Mi | 0.345 | 0–1; higher is more readable | 22.2Δ 0.5 |
| LLOC | 3 | Logical lines; fewer is more readable | 88.9Δ 67.2 |
| DeepSeek V4 Pro | 14 | 0–20; mean of three runs | 47.5Δ 25.8 |
| GPT-6.1 Sol | 17 | 0–20; mean of three runs | 62.1Δ 40.4 |
| BTTF | 0.191 | 0–1; higher is more readable | 3.0Δ 18.7 |
| Human | 2.73 | 1–5; original rating | 21.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) |
|---|---|---|
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 245.269 | −8.094 |
| 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.364 | −6.546 |
| Source linesThe number of non-empty source lines. | 7 | +2.8 |
Intercept 8.87 + feature contributions = -2.97 (log-odds).
Score = sigmoid(-2.97) = 0.049.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 121 | −1.46 |
| 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. | 7 | +0.788 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 1 | −0.703 |
| 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.803 | −0.315 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.098 | −0.011 |
Intercept 0.07 + feature contributions = -2.036 (log-odds).
Score = sigmoid(-2.036) = 0.115.
| Score | 0.345 |
|---|
| Score | 3 |
|---|
Run 1
The code is moderately readable. It separates file creation, stream creation, and writing into distinct steps with clear variable names and simple action granularity (one action per line). However, it suffers from a long, chained method call for file path construction that harms clarity and could be extracted into a helper method or variable. There is no nesting, and the logic is linear, which supports a natural reading flow. The intent is generally clear but relies on unfamiliar domain-specific API calls without context. The unused `data` variable after stream creation is a minor redundancy. Overall, the code is functional but could be improved by simplifying the path construction and adding error handling or context comments.
Run 2
The code is generally readable with a clear structure and intent. It follows a logical sequence: create File object, open ObjectOutputStream, write data. Nesting is minimal with only one level. Action granularity is appropriate, with each major operation on its own line. The main readability issues are: the File constructor call is split awkwardly across lines with a mix of concatenation, making the path construction slightly harder to scan. Variable naming is decent but could be more expressive ('data' vs 'captureDeviceFile', 'dev' vs 'device'). The missing try-with-resources or stream closure in the snippet is a concern for maintainability but not readability per se. Overall, the code is concise and the flow is natural, but the path concatenation formatting slightly reduces clarity.
Run 3
The code is fairly readable due to its straightforward purpose: serializing a device object to a file. It uses clear variable names like 'data', 'stream', and 'dev'. However, it loses points for a few reasons. The first line is too long due to chained method calls and string concatenation, making it harder to parse at a glance. There is no null checking or exception handling visible, which could make the intent ambiguous in a real-world context. The action granularity is acceptable—one main action per line—but the flow is slightly disorganized because the file path construction is not separated into its own variable or helper method. The nesting is minimal, and the code length is concise. Overall, it is understandable but would benefit from better formatting and separation of concerns.
Run 1
Code Structure: Logically ordered into file creation, stream initialization, and data writing, with blank lines separating steps. Nesting: Flat, with no nested control flow. Clarity of intent: The serialization workflow is clear, though generic names such as data, stream, and dev provide limited context, and the chained settings lookup adds complexity. Code length: Concise without unnecessary statements, but the file-path expression is long. Action granularity: Each statement performs one primary action, although file creation combines configuration lookup and path construction. Reading flow: Natural top-to-bottom progression; the wrapped path expression slightly interrupts readability.
Run 2
Code Structure: Logically organized into file-path creation, stream creation, and data writing. Nesting: No nested control flow, though constructor nesting and chained calls add slight visual complexity. Clarity of intent: The serialization purpose is clear, but names such as dev and mCount provide limited context. Code length: Concise, although the long path expression could be extracted for readability. Action granularity: Each statement performs one main action; stream initialization combines two closely related constructions. Reading flow: Natural sequential progression with whitespace separating steps, but the wrapped path expression slightly interrupts scanning.
Run 3
Code Structure: Logically organized into file creation, stream initialization, and data writing. Nesting: Flat, with no nested control flow; nested constructor calls are straightforward. Clarity of intent: Clearly writes device data to a numbered file, though 'dev', 'mCount', and 'data' provide limited contextual meaning. Code length: Concise, but the chained settings access and path concatenation make the first statement lengthy. Action granularity: Each statement performs one main action, although file and stream construction combine several operations. Reading flow: Natural setup-to-write progression with useful whitespace; the wrapped path expression slightly interrupts scanning.