Sample

JetBrains/e41

Human rating uses the original dataset scale.

DatasetJetBrains
Human0.87
Lines9

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0280–1; higher is more readable
96.6Δ 23.7
Scalabrino0.9560–1; higher is more readable
95.8Δ 22.9
Dorn0.4640–1; higher is more readable
39.0Δ 33.9
Mi0.3090–1; higher is more readable
25.4Δ 47.5
LLOC4Logical lines; fewer is more readable
92.8Δ 19.9
DeepSeek V4 Pro11.330–20; mean of three runs
11.9Δ 61.0
GPT-6.1 Sol18.330–20; mean of three runs
90.3Δ 17.4
BTTF0.6390–1; higher is more readable
94.1Δ 21.2
Human0.870–1; original rating
72.9

Views

Source code

import java.math.BigDecimal; public class EulerMascheroniConstant { public static void main(String[] args) { BigDecimal gamma = BigDecimal.valueOf(0.57721566490153286060651209); gamma.setScale(1000, BigDecimal.ROUND_HALF_UP); System.out.println(gamma); } }

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.267.527−8.828
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.792−7.188
Source linesThe number of non-empty source lines.9+3.6

Intercept 8.87 + feature contributions = -3.547 (log-odds).
Score = sigmoid(-3.547) = 0.028.

Score0.956

Feature contributions

FeatureValueContribution
(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.9+0.718
Indentation frequencyHow rapidly indentation changes from line to line.9−0.426
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.7.84−0.3
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.79.889+0.281
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.9+0.214
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.086+0.104

Intercept 0.07 + feature contributions = -0.143 (log-odds).
Score = sigmoid(-0.143) = 0.464.

Score0.309
Score4
Run 1

The code is short and has a clear intent: print an approximation of the Euler-Mascheroni constant with high precision. However, it contains a critical logical flaw: BigDecimal.setScale returns a new BigDecimal; the result is discarded, so the printed value has default scale, not 1000 digits. This misleads the reader and undermines clarity. The structure is flat and simple, but the mistake makes the purpose ambiguous. Naming is reasonable, but the unused method result and lack of comments or error handling reduce readability. Action granularity is fine, but reading flow is disrupted by the ineffective call. Overall, the code looks straightforward at first glance but fails to achieve its apparent goal.

Run 2

The code is clean and straightforward. Structure is logical: a single class with a main method. Nesting is minimal. Intent is clear—printing the Euler–Mascheroni constant. Length is concise but could be slightly misleading because setScale() is not assigned or used. Action granularity and reading flow are good. Minor issue: setScale() has no effect on output, so the scale is not actually applied.

Run 3

The code is short and straightforward, but it contains logical flaws that hurt clarity and intent. The BigDecimal is initialized with a double literal, limiting precision before setScale is called, and the result of setScale is discarded since BigDecimal is immutable. The purpose—printing a high-precision Euler-Mascheroni constant—is ambiguous due to the wrong approach and unused result. Structure is flat and simple, but the unused method call and comment-free code reduce readability. It is concise, with one action per line, and has a natural top-to-bottom flow, but the misleading setScale line creates confusion rather than aiding understanding.

Run 1

Code Structure: A conventional import, class, and main method provide clear organization. Nesting: Minimal, with only the class and method scopes. Clarity of intent: The class name and gamma variable clearly indicate the Euler–Mascheroni constant, but the precision intent is misleading: the literal is converted through double, and setScale returns a new BigDecimal that is discarded. Code length: Short and focused, with no unnecessary verbosity. Action granularity: Each statement performs one action on its own line. Reading flow: Initialization, scaling, and output follow a natural sequence, although the ineffective scaling statement interrupts the apparent logic.

Run 2

Code Structure: A single class and short main method provide clear, logical organization. Nesting: Minimal, limited to the class and method. Clarity of intent: The class name and gamma variable clearly indicate the constant being printed, but setScale(1000) misleadingly suggests increased precision and its returned value is ignored. Code length: Concise, with no unnecessary complexity. Action granularity: Each statement performs one distinct action. Reading flow: The import, declaration, initialization, scaling, and output follow a natural sequence. The main readability weakness is the mismatch between the apparent precision-setting intent and the actual behavior.

Run 3

Code Structure: A straightforward class with a single main method is logically organized. Nesting: Only the necessary class and method scopes are present. Clarity of intent: The class name and gamma variable clearly indicate the constant being printed, but setScale misleadingly suggests an update because its returned value is discarded. The double literal also implies more precision than it preserves. Code length: Short and focused, with no unnecessary scaffolding. Action granularity: Each statement performs one clear action. Reading flow: Import, declaration, scaling attempt, and output follow a natural sequence. The precision and scaling issues slightly reduce clarity despite otherwise strong readability.