Sample
Schnappinger/jsweet/def.dom.SVGFEFuncBElement
Human rating uses the original dataset scale.
Scores
| Method | Score | Scale | Dataset rank (0–100) |
|---|---|---|---|
| Posnett | 0.763 | 0–1; higher is more readable | 83.9Δ 0.6 |
| Scalabrino | 0.841 | 0–1; higher is more readable | 72.3Δ 11.1 |
| Dorn | 0.609 | 0–1; higher is more readable | 68.3Δ 15.0 |
| Mi | 0.742 | 0–1; higher is more readable | 90.4Δ 7.1 |
| LLOC | 2 | Logical lines; fewer is more readable | 94.6Δ 11.2 |
| DeepSeek V4 Pro | 16.67 | 0–20; mean of three runs | 59.9Δ 23.4 |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs | 73.8Δ 9.6 |
| BTTF | 0.664 | 0–1; higher is more readable | 70.6Δ 12.7 |
| Human | 3.97 | 1–4; original rating | 83.3 |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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.71 | −7.066 |
| Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones. | 92 | −3.036 |
| Source linesThe number of non-empty source lines. | 6 | +2.4 |
Intercept 8.87 + feature contributions = 1.168 (log-odds).
Score = sigmoid(1.168) = 0.763.
| Score | 0.841 |
|---|
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. | 7 | +0.788 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 5 | −0.564 |
| 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. | 75.857 | +0.452 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.053 | +0.43 |
| 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. | 5.818 | −0.329 |
Intercept 0.07 + feature contributions = 0.442 (log-odds).
Score = sigmoid(0.442) = 0.609.
| Score | 0.742 |
|---|
| Score | 2 |
|---|
Run 1
The code is concise and follows a clear structure, with the class extending SVGComponentTransferFunctionElement and containing a constructor and a static prototype field. It demonstrates moderate readability: there is no nesting, and each action is on its own line, which improves clarity. However, it lacks any documentation or comments explaining the purpose of the class or the prototype field, which could make intent ambiguous to unfamiliar readers. The class name is descriptive, but abbreviations like 'Func' may require domain knowledge. Overall, it is straightforward and maintainable for those familiar with the DOM API, but additional context would improve readability.
Run 2
The code is concise and clear. It defines a class with a constructor and a static prototype field, following standard Java conventions. Structure and intent are unambiguous, with minimal nesting and one action per line. Minor deduction for lack of documentation.
Run 3
The code is a simple, well-structured DOM class definition. It has a clear package declaration, logical inheritance from SVGComponentTransferFunctionElement, and a minimal constructor. The structure is flat with no nesting, and each action is on its own line. The intent is clear: defining a standard SVG filter function element. The only minor deduction is the empty constructor, which is slightly redundant in Java, but this is a common pattern in generated DOM bindings and does not significantly impact readability. Overall, the code is concise, natural to read, and unambiguous.
Run 1
Code Structure: The package declaration, class, field, and constructor are logically organized. Nesting: Only the necessary class scope is present. Clarity of intent: The descriptive class and superclass names indicate an SVG component-transfer element, although the purpose of the public static prototype field is not explained. Code length: The code is concise without unnecessary content. Action granularity: Each declaration occupies its own line. Reading flow: The order is natural and easy to follow, but blank lines between sections and spacing around the constructor braces would improve readability.
Run 2
Code Structure: The package declaration, class, field, and constructor are logically organized. Nesting: Only standard class and constructor scopes appear, with no deep nesting. Clarity of intent: The class name and inheritance clearly identify an SVG component-transfer element, though the mutable static prototype field's purpose is not explained. Code length: The code is concise with no unnecessary implementation. Action granularity: Each declaration occupies its own line, and no operations are combined. Reading flow: The top-to-bottom progression is natural, but missing blank lines and the tightly formatted empty constructor slightly reduce visual readability.
Run 3
Code Structure: The package declaration, class, field, and constructor are logically organized. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The class name and inheritance clearly identify an SVG blue-channel component-transfer element, although the public static prototype field's role is unexplained. Code length: Very concise, with no unnecessary implementation. Action granularity: Each declaration occupies its own line. Reading flow: Natural top-to-bottom flow, slightly reduced by missing spacing around the empty constructor body and the lack of a blank line after the package declaration.