Sample

Schnappinger/jsweet/def.dom.SVGPathSegMovetoRel

Human rating uses the original dataset scale.

Human3.95
Lines8

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.6880–1; higher is more readable
82.9Δ 13.5
Scalabrino0.8190–1; higher is more readable
67.1Δ 2.3
Dorn0.8010–1; higher is more readable
84.8Δ 15.3
Mi0.6330–1; higher is more readable
69.3Δ 0.2
LLOC4Logical lines; fewer is more readable
87.0Δ 17.5
DeepSeek V4 Pro17.330–20; mean of three runs
73.9Δ 4.5
GPT-6.1 Sol180–20; mean of three runs
73.8Δ 4.3
BTTF0.6430–1; higher is more readable
65.7Δ 3.8
Human3.951–4; original rating
69.5

Views

Source code

package def.dom; public class SVGPathSegMovetoRel extends SVGPathSeg { public double x; public double y; public static SVGPathSegMovetoRel prototype; public SVGPathSegMovetoRel(){} }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.623−6.935
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.131.686−4.346
Source linesThe number of non-empty source lines.8+3.2

Intercept 8.87 + feature contributions = 0.789 (log-odds).
Score = sigmoid(0.789) = 0.688.

Score0.819

Feature contributions

FeatureValueContribution
(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.53+1.42
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.9+0.718
Indentation frequencyHow rapidly indentation changes from line to line.7−0.495
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.057+0.385
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.7.833−0.3

Intercept 0.07 + feature contributions = 1.392 (log-odds).
Score = sigmoid(1.392) = 0.801.

Score0.633
Score4
Run 1

The code is highly readable due to its simple, flat structure and clear intent. It represents a single class with two numeric properties, a static prototype field, and a constructor. Each declaration sits on its own line, making action granularity and reading flow natural. There is no nesting or logical complexity, so criteria 1 and 2 score strongly. However, it is extremely minimal and lacks context, comments, or method implementations, which slightly limits clarity of intent beyond basic data structure declaration. Code length is appropriate for the task, though the empty constructor and static prototype add little explanation. Overall, very readable but context-dependent.

Run 2

The code is highly readable. It has a clear, flat structure with a single class extending SVGPathSeg, making its purpose evident. There is no nesting or complex logic. Field declarations are concise, with one action per line, and properties are clearly named. The static prototype field follows a common pattern. The empty package-private constructor, while fine, could be omitted but does not harm clarity. Overall, the code is straightforward and easy to understand, with only minor room for improvement in the constructor's explicitness.

Run 3

The code is highly readable due to its straightforward structure and clarity. It defines a single class with a clear purpose, inheriting from a parent class and exposing two numeric properties. The nesting is minimal—only one level of class members—and the intent is unambiguous. The length is concise, containing no unnecessary code. Each member is declared on its own line, following good action granularity. The reading flow is natural: package, imports, class declaration, properties, and constructor. Minor deductions are for the lack of Javadoc comments and the public field usage, which could be improved with encapsulation, but these do not significantly affect readability.

Run 1

Code Structure: A straightforward class declaration logically groups coordinate fields, a prototype field, and a constructor. Nesting: Minimal, with no nested control flow. Clarity of intent: The class name and inheritance identify a relative SVG move-to path segment, and x/y clearly represent coordinates; the prototype field's purpose is less obvious without context. Code length: Very concise, with no unnecessary logic. Action granularity: Each declaration occupies its own line. Reading flow: Natural top-to-bottom organization, though blank lines between member groups and conventional spacing in the empty constructor would improve visual readability.

Run 2

Code Structure: A simple, logically organized class with related fields and a constructor. Nesting: Minimal, with no nested control flow. Clarity of intent: The class name and inheritance convey a relative SVG move-to segment; x and y are recognizable coordinates, though prototype's role is unexplained. Code length: Concise, with no unnecessary logic. Action granularity: Each declaration occupies its own line. Reading flow: Natural progression from package to class, fields, and constructor; spacing around the empty constructor and separation between sections could improve readability.

Run 3

Code Structure: A simple, logically organized class with fields followed by its constructor. Nesting: Minimal, with no nested control flow. Clarity of intent: The class name, superclass, and x/y fields clearly suggest a relative SVG move-to segment, though the prototype field's role is not explained. Code length: Concise, with no unnecessary implementation. Action granularity: Each declaration occupies its own line. Reading flow: Natural and easy to scan, but spacing around the empty constructor and a blank line after the package declaration would improve readability.