Sample
Schnappinger/jsweet/def.dom.MSFileSaver
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.01 | 0–1; higher is more readable | 71.2Δ 22.9 |
| Scalabrino | 0.756 | 0–1; higher is more readable | 51.4Δ 3.0 |
| Dorn | 0.585 | 0–1; higher is more readable | 66.0Δ 17.7 |
| Mi | 0.253 | 0–1; higher is more readable | 16.8Δ 31.5 |
| LLOC | 4 | Logical lines; fewer is more readable | 87.0Δ 38.6 |
| DeepSeek V4 Pro | 17.67 | 0–20; mean of three runs | 83.0Δ 34.7 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 73.8Δ 25.4 |
| BTTF | 0.611 | 0–1; higher is more readable | 59.4Δ 11.1 |
| Human | 3.89 | 1–4; original rating | 48.3 |
Views
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. | 304.313 | −10.042 |
| 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.654 | −6.981 |
| Source linesThe number of non-empty source lines. | 9 | +3.6 |
Intercept 8.87 + feature contributions = -4.554 (log-odds).
Score = sigmoid(-4.554) = 0.01.
| Score | 0.756 |
|---|
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. | 10 | +0.682 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 8 | −0.46 |
| 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 | +0.446 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.066 | +0.3 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 8.857 | −0.286 |
Intercept 0.07 + feature contributions = 0.345 (log-odds).
Score = sigmoid(0.345) = 0.585.
| Score | 0.253 |
|---|
| Score | 4 |
|---|
Run 1
The code is highly readable due to its clean, flat structure and clear purpose. It defines a concise interface with four overloaded native methods, each on a single line, showing excellent action granularity. There is no nesting, and the naming is straightforward and self-documenting. The brevity avoids unnecessary length while clearly conveying intent.
Run 2
The code is well-structured and easy to read. It has a clear package declaration, a concise interface annotation, and a logical class definition extending a base object. Nesting is minimal—just one class with four methods. Each method is declared on a single line, aligning with the 'one action per line' principle. Intent is clear: this is an interface abstraction for browser file-saving functionality, with overloaded methods for optional parameters. Code length is minimal and avoids unnecessary verbosity. Reading flow is natural: package, annotation, class, then methods in a logical order. Minor deductions include the use of 'Object' instead of a more specific type like 'Blob', and the class name 'MSFileSaver' could be more descriptive, but these are minor clarity issues. Overall, the code is concise, readable, and well-organized.
Run 3
The code is highly readable due to its clear, concise structure. It defines an interface with two overloaded methods, each declared on a single line, demonstrating flat nesting and simple action granularity. Naming conventions are consistent and intent is obvious: saving or opening blobs in a Microsoft-specific API. The class is focused and avoids unnecessary length or complexity. Minor deductions: lack of documentation or annotations explaining the difference between the two methods, and the duplicated overloads could potentially be consolidated, but overall the code is exceptionally clear and easy to scan.
Run 1
Code Structure: A small, logically organized interface-like class, though grouping overloads by method name would improve organization. Nesting: Only the class scope; no nested control flow. Clarity of intent: Method and parameter names clearly convey blob-saving operations, supported by the interface annotation; return semantics are undocumented. Code length: Concise, with no unnecessary implementation or boilerplate. Action granularity: Each declaration occupies its own line. Reading flow: Straightforward package-to-annotation-to-class progression, slightly weakened by interleaved overloads and the lack of spacing after the package declaration.
Run 2
Code Structure: A simple interface-style class contains closely related methods, though grouping overloads by method name would improve organization. Nesting: No nested control flow; only the class scope. Clarity of intent: Method and parameter names clearly describe saving or opening blobs, although Object provides little type specificity. Code length: Very concise, with no unnecessary implementation. Action granularity: Each declaration occupies its own line. Reading flow: Straightforward, but a blank line after the package declaration and consistent overload grouping would make scanning easier.
Run 3
Code Structure: A single, logically organized class contains related native method declarations, though grouping overloads by method name would improve organization. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Method names clearly distinguish saving from saving or opening a blob; the Object parameter type and lack of documentation leave some details unspecified. Code length: Compact, with no unnecessary implementation or repetition beyond useful overloads. Action granularity: Each declaration occupies its own line. Reading flow: Consistent indentation supports smooth reading, although a blank line after the package declaration and adjacent overloads would improve presentation.