Sample

Buse/33

Human rating uses the original dataset scale.

DatasetBuse
Human4.02
Lines10

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.9320–1; higher is more readable
92.9Δ 5.6
Scalabrino0.8960–1; higher is more readable
93.9Δ 6.6
Dorn0.6610–1; higher is more readable
60.6Δ 26.8
Mi0.4630–1; higher is more readable
34.3Δ 53.0
LLOC4Logical lines; fewer is more readable
59.6Δ 27.8
DeepSeek V4 Pro13.330–20; mean of three runs
41.9Δ 45.5
GPT-6.1 Sol180–20; mean of three runs
84.8Δ 2.5
BTTF0.7230–1; higher is more readable
92.9Δ 5.6
Human4.021–5; original rating
87.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)
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.639−6.958
Source linesThe number of non-empty source lines.10+4
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.100−3.3

Intercept 8.87 + feature contributions = 2.612 (log-odds).
Score = sigmoid(2.612) = 0.932.

Score0.896

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.115−1.206
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.114.818+1.048
Indentation frequencyHow rapidly indentation changes from line to line.1−0.703
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.026+0.686
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.11+0.647
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.9.871−0.272

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

Score0.463
Score4
Run 1

The code is a simple constructor with clear parameters and Javadoc, which makes its intent understandable. However, readability suffers due to inconsistent formatting: there is no space around the assignment operator in 'fContextLength= contextLength' versus 'fExpected= expected'. The use of Hungarian notation ('f' prefix) is outdated and adds noise. The Javadoc is useful but could be more concise. The constructor body is flat and straightforward, but the missing spacing disrupts the reading flow and visual consistency. Overall, the code is readable enough to follow but requires minor cleanup for professional clarity.

Run 2

The code is generally readable with clear intent and logical structure. The Javadoc comments are descriptive, explaining parameters well. The constructor assigns three parameters using a consistent naming convention (f-prefix for fields). Nesting is non-existent, and each assignment is on its own line, demonstrating good action granularity. However, readability is slightly reduced by the lack of spaces around the equals signs (fContextLength= contextLength), which is inconsistent with standard Java formatting and makes the code slightly harder to scan. The parameter names are clear, and the code is concise without being overly verbose. Overall, it's a well-structured snippet that would benefit from minor formatting improvements.

Run 3

The code is partially readable due to clear parameter names and a straightforward constructor that assigns fields, but it suffers from inconsistent formatting (odd indentation, non-standard field naming with 'f' prefix), missing Javadoc for the class itself, and implicit behavior not explained in the code. The structure is simple with one action per line, but the intent is slightly obscured by the naming convention and lack of context about what happens when the length is exceeded. The reading flow is natural, but nesting is minimal. Overall, it is understandable but not exemplary.

Run 1

Code Structure: The constructor logically groups three field initializations. Nesting: The code is flat, with no conditionals or loops. Clarity of intent: Descriptive parameter names and Javadoc clearly explain the constructor's purpose, although the f-prefixed field names are less conventional. Code length: The implementation is concise, with no unnecessary statements. Action granularity: Each line performs one assignment. Reading flow: Assignments follow the parameter order, making the code easy to scan. Minor readability issues include inconsistent spacing around assignment operators and the missing closing brace in the provided snippet.

Run 2

Code Structure: The constructor is logically organized, with documentation followed by straightforward field initialization. Nesting: There is no nested control flow. Clarity of intent: Descriptive parameter names and Javadoc clearly explain the constructor's purpose, though the f-prefixed fields are slightly less natural to read. Code length: The implementation is concise, with no unnecessary logic. Action granularity: Each assignment occupies its own line. Reading flow: Assignments follow the parameter order, making the code easy to scan. Minor drawbacks include inconsistent spacing around assignment operators, an awkwardly wrapped documentation sentence, and the missing closing brace in the provided snippet.

Run 3

Code Structure: The constructor logically groups three straightforward field assignments. Nesting: The code is flat, with no nested control flow. Clarity of intent: Descriptive parameter names and Javadoc clearly explain initialization and the context-length setting; the 'f' field prefix is slightly dated but understandable. Code length: The implementation is concise, with no unnecessary logic. Action granularity: Each line performs a single assignment. Reading flow: Parameters and assignments appear in the same order, making the code easy to follow. Minor drawbacks are inconsistent spacing around assignment operators and the missing closing brace in the supplied snippet, which leaves the structure incomplete.