Sample

Scalabrio37

Human rating uses the original dataset scale.

DatasetScalabrino
Human3.78
Lines21

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett00–1; higher is more readable
63.3Δ 4.3
Scalabrino0.3090–1; higher is more readable
27.6Δ 31.4
Dorn0.1910–1; higher is more readable
24.1Δ 34.9
Mi0.1020–1; higher is more readable
36.2Δ 22.9
LLOC8Logical lines; fewer is more readable
76.9Δ 17.8
DeepSeek V4 Pro9.670–20; mean of three runs
17.3Δ 41.7
GPT-6.1 Sol160–20; mean of three runs
34.7Δ 24.4
BTTF0.4320–1; higher is more readable
19.1Δ 39.9
Human3.781–5; original rating
59.0

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.673.875−22.238
Source linesThe number of non-empty source lines.21+8.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.3.834−5.751

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

Score0.309

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.136−2.095
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.1+1.001
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.0−0.804
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.19.81−0.133
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.083+0.131
Indentation frequencyHow rapidly indentation changes from line to line.21−0.011

Intercept 0.07 + feature contributions = -1.443 (log-odds).
Score = sigmoid(-1.443) = 0.191.

Score0.102
Score8
Run 1

The code has a clear purpose but suffers from several readability issues. The method is moderately concise (11 lines), and nesting is minimal with only one try-catch block. However, the nested ternary-style exception message uses awkward line breaks and concatenation, making the reading flow choppy. The ambiguous comparison `getSqlTypeCode() != null && getSqlTypeCode() != sqlTypeCode` mixes primitive and wrapper types, hiding intent. Multiple method calls are chained in the first line (`type.sqlTypes(mapping)[getTypeIndex()]`), reducing action granularity. The catch block catches generic `Exception` rather than a specific type, obscuring error handling. The indentation and line wrapping for the exception message are inconsistent. While the core logic is understandable, these issues make it harder to scan and maintain.

Run 2

The method has a clear purpose but suffers from readability issues. It has moderate nesting with a try-catch block, but the line 'type.sqlTypes( mapping )[getTypeIndex()]' bundles multiple operations (method call, array access, method call) into one line, reducing clarity. The conditional check comparing 'getSqlTypeCode()' (Integer) to 'sqlTypeCode' (int) is implicit and potentially confusing. Error handling catches generic 'Exception' and wraps it, which is acceptable but obscures the root cause. The exception message concatenation is verbose and awkwardly formatted across multiple lines. Variable naming is clear, and the overall logic is straightforward, but the code length and formatting reduce readability.

Run 3

The method has a clear purpose and logical structure, but readability suffers from several issues. The nesting is shallow (one try-catch and one if), which is good, but the clarity of intent is muddled by ambiguous method naming: 'getSqlTypeCode()' appears both as the method itself and as a recursive call within its own body, suggesting confusion with a field or getter. The if condition is difficult to parse due to null-checking and comparison on what appears to be a recursive call. Exception handling is verbose, with a multi-line string concatenation that disrupts reading flow. Action granularity is mostly reasonable (one major action per line), though the mapping array access and method call on one line could be split for clarity. Overall, the code is functional but not immediately intuitive for a reader unfamiliar with the domain model.

Run 1

Code Structure: Logically organized into type lookup, validation, return, and exception handling, though the broad catch also wraps the explicitly thrown validation exception. Nesting: Shallow, with only one conditional inside the try block. Clarity of intent: The SQL type lookup and consistency check are clear, but similarly named overloaded methods and the awkward mismatch message introduce minor ambiguity. Code length: Compact overall, although the exception message is spread across more lines than necessary. Action granularity: Most statements perform one clear action; repeated getSqlTypeCode() calls could be replaced with a local variable. Reading flow: Execution proceeds naturally from lookup to validation to return, with error handling clearly separated, but fragmented string concatenation slightly interrupts readability.

Run 2

Code Structure: Logically organized into type retrieval, SQL type resolution, validation, and exception handling. Nesting: Shallow, with only an if statement inside a try block. Clarity of intent: The method name and variables clearly convey SQL type resolution, though the overloaded getSqlTypeCode() calls require context, and catching all exceptions obscures distinct failure cases. Code length: Mostly concise, but repeated getter calls and the heavily split error message add avoidable verbosity. Action granularity: Statements generally perform one action each; resolving SQL types and indexing the result in one expression remains understandable. Reading flow: Natural progression from lookup to validation to return, followed by error handling. The fully qualified type name, awkward exception wording, and fragmented string concatenation slightly interrupt readability.

Run 3

Code Structure: Logically organized into type lookup, validation, return, and exception handling, though the broad catch also wraps the deliberately thrown MappingException. Nesting: Shallow, with only one conditional inside the try block. Clarity of intent: The SQL type lookup and consistency check are understandable; repeated getSqlTypeCode() calls and an awkward error message slightly reduce clarity. Code length: Mostly concise, but the exception-message concatenation spans more lines than necessary. Action granularity: Statements generally perform one action each, although lookup combines method calls and array indexing. Reading flow: Execution follows a natural sequence, but the fully qualified type name, long validation exception line, and fragmented catch message interrupt scanning.