Sample
Schnappinger/jsweet/def.dom.intl.CollatorOptions
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.035 | 0–1; higher is more readable | 72.9Δ 25.8 |
| Dorn | 0.722 | 0–1; higher is more readable | 76.9Δ 21.8 |
| Mi | 0.644 | 0–1; higher is more readable | 71.6Δ 27.1 |
| LLOC | 6 | Logical lines; fewer is more readable | 79.7Δ 19.0 |
| DeepSeek V4 Pro | 17.67 | 0–20; mean of three runs | 83.0Δ 15.7 |
| GPT-6.1 Sol | 18.33 | 0–20; mean of three runs | 85.3Δ 13.4 |
| BTTF | 0.661 | 0–1; higher is more readable | 69.6Δ 29.0 |
| Human | 4 | 1–4; original rating | 98.7 |
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. | 370.881 | −12.239 |
| Source linesThe number of non-empty source lines. | 17 | +6.8 |
| 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.492 | −6.738 |
Intercept 8.87 + feature contributions = -3.307 (log-odds).
Score = sigmoid(-3.307) = 0.035.
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. | 61 | +1.082 |
| 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. | 18 | +0.399 |
| 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. | 16.065 | −0.185 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 16 | −0.184 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.079 | +0.179 |
Intercept 0.07 + feature contributions = 0.954 (log-odds).
Score = sigmoid(0.954) = 0.722.
| Score | 0.644 |
|---|
| Score | 6 |
|---|
Run 1
The code is highly readable. It follows a clear structure: package declaration, imported interface annotation, class declaration, and field declarations. The class is flat with no nesting. Each field represents an option, is annotated as optional, and is declared on a single line, making the intent and action granularity clear. The code is concise, with no unnecessary verbosity. The reading flow is natural and consistent. Minor deductions are due to lack of explanatory comments and the use of annotations which may be unfamiliar to some, but these do not significantly hinder readability.
Run 2
The code is highly readable due to its flat, well-organized structure. It defines a single class with a clear purpose—representing Intl.Collator options—and each property is declared on its own line, maintaining one-action-per-line granularity. The use of @jsweet.lang.Optional annotations consistently clarifies intent. The only minor deduction is from the slight verbosity introduced by repeated annotations and the abstract class boilerplate, which somewhat lengthens the code without adding contextual value in this snippet.
Run 3
The code is a clean, well-structured TypeScript declaration file. It has a single logical purpose: defining an interface for Intl.Collator options. Structure is flat with no nesting, and each property is declared on its own line, matching the 'one action per line' criterion. Naming is descriptive and follows domain conventions. Optional annotations clearly signal intent. The class is concise and avoids unnecessary boilerplate. Reading flows naturally from package declaration to interface definition to property list. Minor points deducted for minor verbosity from repeated @jsweet.lang.Optional annotations, though this is idiomatic for the framework.
Run 1
Code Structure: A straightforward class cleanly groups related collator options. Nesting: No nested logic, making the code easy to scan. Clarity of intent: The class and field names communicate their purpose, and Optional annotations clearly indicate optional properties; however, string-valued fields do not reveal their allowed values. Code length: Concise, with no unnecessary implementation. Action granularity: Each annotation and field declaration occupies its own line. Reading flow: The package, class, and consistently formatted fields follow a natural order, though blank lines after the package declaration and before the class would improve visual separation.
Run 2
Code Structure: A straightforward options class with consistently organized fields and annotations. Nesting: Only one class level, with no nested control flow. Clarity of intent: The class and field names clearly describe collation settings, though valid values for String options are not documented. Code length: Concise, with no unnecessary logic or boilerplate beyond the binding annotations. Action granularity: Each annotation and field declaration occupies its own line. Reading flow: Consistent formatting makes the class easy to scan; a blank line after the package declaration would slightly improve separation.
Run 3
Code Structure: A logically organized options class with consistent annotations and field declarations. Nesting: Flat, with no nested control flow. Clarity of intent: The class name and descriptive fields clearly convey collator configuration, though documentation or constrained types would clarify valid string values. Code length: Concise, with no unnecessary implementation. Action granularity: Each annotation and field declaration occupies its own line. Reading flow: Consistent formatting makes scanning natural; a blank line between the package declaration and class annotation would slightly improve visual separation.