Sample

Scalabrio170

Human rating uses the original dataset scale.

DatasetScalabrino
Human3.11
Lines36

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
50.8Δ 29.4
Scalabrino0.6060–1; higher is more readable
60.3Δ 38.9
Dorn0.6680–1; higher is more readable
75.9Δ 54.5
Mi0.060–1; higher is more readable
24.6Δ 3.3
LLOC11Logical lines; fewer is more readable
63.1Δ 41.7
DeepSeek V4 Pro16.330–20; mean of three runs
80.9Δ 59.5
GPT-6.1 Sol180–20; mean of three runs
83.7Δ 62.3
BTTF0.5520–1; higher is more readable
56.3Δ 34.9
Human3.111–5; original rating
21.4

Views

Download official ZIP ↗

Select the downloaded ZIP or its extracted folder. Files stay in your browser.

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(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.932.042−30.757
Source linesThe number of non-empty source lines.36+14.4
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.846−7.269

Intercept 8.87 + feature contributions = -14.757 (log-odds).
Score = sigmoid(-14.757) = 0.

Score0.606

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.111.944−1.076
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.111.944+1.002
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.303
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.36−0.238
Indentation frequencyHow rapidly indentation changes from line to line.26+0.162
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.34.85+0.077

Intercept 0.07 + feature contributions = 0.698 (log-odds).
Score = sigmoid(0.698) = 0.668.

Score0.06
Score11
Run 1

The code demonstrates good structure with clear separation of concerns and logical organization. It builds an XML entity in a stepwise manner, with each section (schema setup, entity creation, revision type handling) clearly delimited by comments. Nesting is minimal—only one if statement and a ternary expression maintain flat readability. Variable and method names are descriptive, revealing intent without requiring deep domain knowledge. The code is appropriately concise, with each line performing a single logical action, and helper methods (addRevisionInfoRelation, addRevisionType) prevent duplication. Reading flow is natural, moving from setup through entity construction to revision handling. Minor deductions could be made for the slightly long method signature and the overhead of XML-building code, which may be less intuitive to readers unfamiliar with Hibernate Envers internals.

Run 2

The code is reasonably well-structured with clear variable naming, logical separation of schema/catalog extraction, entity creation, and progressive assembly of the XML entity. Nesting is minimal (one conditional), and each line generally performs one action, aiding readability. Comments clarify non-obvious steps. However, readability is slightly reduced by the multi-line parameter alignment in MetadataTools.createEntity, which can feel visually heavy, and the method mixes retrieval, building, and mutation in one block. The interaction between mainGenerator and the XML elements assumes domain knowledge, which may obscure intent for unfamiliar readers. Overall, the flow is natural and purposeful but could be improved by extracting a helper method for the composite-id assembly or the schema/catalog retrieval.

Run 3

The code is generally readable with clear logical organization and good use of blank lines to separate steps. Variables are well-named, and comments explain non-obvious intent. However, there are some minor issues: method parameters are numerous and could benefit from grouping; the method name contains 'EntityXml' which is slightly redundant since the return type is Element; and some lines are densely packed with chained method calls (e.g., MetadataTools.createEntity with nested arguments). The if-block for the where clause is clean, but the conditional on the addRevisionType call adds minor cognitive load. Overall, the code follows good practices like extracting repeated schema/catalog lookups into variables and maintaining one primary action per line, but slightly deep nesting in method calls and parameter lists prevents a higher score.

Run 1

Code Structure: Logically organized into schema/catalog resolution, entity creation, and audit metadata configuration. Nesting: Nearly flat, with only one simple conditional. Clarity of intent: Descriptive names and comments explain the XML mapping steps, though framework-specific calls require domain knowledge and the method name does not make its composite-id return value obvious. Code length: Appropriately concise; some comments repeat the operations they describe. Action granularity: Each statement performs one principal action, with multiline calls improving legibility. Reading flow: Natural progression from setup to configuration and return, supported by whitespace and consistent formatting.

Run 2

Code Structure: Logically organized into schema/catalog resolution, entity creation, and mapping configuration. Nesting: Almost entirely flat, with one simple conditional. Clarity of intent: Descriptive names and comments explain the audit mapping, though returning the composite-id element from a method named createMiddleEntityXml is slightly surprising. Code length: Concise for its responsibilities; some comments repeat what the calls already convey. Action granularity: Each statement performs a distinct operation, and multiline calls keep arguments readable. Reading flow: Sequential construction and consistent formatting make the method easy to follow, although chained getters and the ternary argument require minor extra attention.

Run 3

Code Structure: Logically organized into schema/catalog resolution, entity creation, optional filtering, and revision metadata configuration. Nesting: Very shallow, with only one simple conditional. Clarity of intent: Descriptive names and comments make the XML mapping purpose clear, although returning the composite-id element rather than the entity suggested by the method name is slightly surprising. Code length: Appropriately concise; multiline calls improve scanning, though some comments restate the operations. Action granularity: Each statement performs one main action, with a few nested calls and a readable ternary expression. Reading flow: Natural, sequential construction with useful spacing; domain-specific helper methods and configuration chains require some contextual knowledge.