Sample
Schnappinger/jsweet/def.dom.intl.ResolvedCollatorOptions
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.228 | 0–1; higher is more readable | 75.3Δ 5.1 |
| Dorn | 0.689 | 0–1; higher is more readable | 74.3Δ 6.1 |
| Mi | 0.653 | 0–1; higher is more readable | 73.9Δ 6.4 |
| LLOC | 7 | Logical lines; fewer is more readable | 75.9Δ 4.5 |
| DeepSeek V4 Pro | 17.67 | 0–20; mean of three runs | 83.0Δ 2.6 |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs | 92.6Δ 12.2 |
| BTTF | 0.635 | 0–1; higher is more readable | 64.4Δ 16.0 |
| Human | 3.96 | 1–4; original rating | 80.4 |
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. | 247.254 | −8.159 |
| 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.488 | −6.732 |
| Source linesThe number of non-empty source lines. | 12 | +4.8 |
Intercept 8.87 + feature contributions = -1.222 (log-odds).
Score = sigmoid(-1.222) = 0.228.
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 |
| 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. | 69 | +0.743 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 13 | +0.576 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.054 | +0.412 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 11 | −0.357 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 11.857 | −0.244 |
Intercept 0.07 + feature contributions = 0.794 (log-odds).
Score = sigmoid(0.794) = 0.689.
| Score | 0.653 |
|---|
| Score | 7 |
|---|
Run 1
The code is highly readable due to its clean and logical structure. It defines a single, cohesive interface with a clear purpose: representing resolved collator options. There is no nesting, and each property is declared on its own line, ensuring excellent action granularity and a natural reading flow. The intent is unambiguous — all fields directly correspond to Intl.Collator options. The code is concise, with no unnecessary verbosity, and the naming of fields is self-explanatory. Minor points deducted only because the Java annotations (@jsweet.lang.Interface) may not be intuitive without context, but overall clarity remains very high.
Run 2
The code is highly readable due to its clear structure and concise declarations. Each property is declared on its own line, adhering to the one-action-per-line principle. The class name and annotation clearly indicate intent: it represents resolved options for an Intl.Collator. The field names are descriptive and follow camelCase conventions, and the types are straightforward. There is no nesting or control flow, so it remains flat and easy to scan. Minor deductions: the class is in a package with a generic name ('def.dom.intl') that may imply a generated or transpiled context, and there's no documentation, though the fields are self-explanatory.
Run 3
The code is highly readable due to its simple, flat structure. It clearly defines a data model with fields related to collation options, each declared on its own line with logical grouping. The class and field names are descriptive and align well with their intended purpose (e.g., 'ignorePunctuation', 'caseFirst'). There is no deep nesting or ambiguity in the code. The use of @Interface annotation and inheritance from def.js.Object is concise and standard for the framework. The only minor deduction is the lack of explicit documentation comments for the fields, which could slightly improve clarity of intent, but the naming is self-explanatory enough.
Run 1
Code Structure: A straightforward interface-style class groups related collator options logically. Nesting: No nested control flow or unnecessary hierarchy. Clarity of intent: The class name and descriptive field names clearly identify resolved collation settings, though documentation could clarify valid string values. Code length: Concise, with no redundant implementation. Action granularity: Each field declaration occupies its own line. Reading flow: Package, annotation, class declaration, and fields follow a natural order; a blank line after the package declaration would slightly improve visual separation.
Run 2
Code Structure: A single, logically organized class contains related collator option fields. Nesting: Flat declarations with no nested control flow. Clarity of intent: The class name, package, annotation, and descriptive field names clearly identify an options interface, though valid string values are not documented. Code length: Concise, with no unnecessary logic or repetition. Action granularity: Each field declaration occupies its own line. Reading flow: Natural progression from package and annotation to class and fields; a blank line after the package would slightly improve visual separation.
Run 3
Code Structure: A straightforward class groups related collator option fields logically. Nesting: No nested control flow or declarations. Clarity of intent: The class and field names clearly describe resolved collation settings, though the interface annotation on an abstract class requires familiarity with JSweet. Code length: Concise, with no unnecessary implementation. Action granularity: Each field declaration occupies its own line. Reading flow: Package, annotation, class declaration, and fields follow a natural order; a blank line after the package declaration would slightly improve visual separation.