Sample

JetBrains/b40

Human rating uses the original dataset scale.

DatasetJetBrains
Human0.97
Lines10

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0030–1; higher is more readable
78.0Δ 18.6
Scalabrino0.6560–1; higher is more readable
50.0Δ 46.6
Dorn0.5320–1; higher is more readable
52.5Δ 44.1
Mi0.430–1; higher is more readable
40.7Δ 55.9
LLOC4Logical lines; fewer is more readable
92.8Δ 3.8
DeepSeek V4 Pro18.330–20; mean of three runs
97.9Δ 1.3
GPT-6.1 Sol190–20; mean of three runs
96.2Δ 0.4
BTTF0.6210–1; higher is more readable
90.7Δ 5.9
Human0.970–1; original rating
96.6

Views

Source code

import java.math.BigDecimal; import java.math.MathContext; public class Main { public static void main(String[] args) { BigDecimal e = BigDecimal.valueOf(Math.E); String result = e.round(new MathContext(1000)).toString(); System.out.println(result); } }

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.356.122−11.752
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.564−6.846
Source linesThe number of non-empty source lines.10+4

Intercept 8.87 + feature contributions = -5.728 (log-odds).
Score = sigmoid(-5.728) = 0.003.

Score0.656

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.66+0.87
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.10+0.682
Indentation frequencyHow rapidly indentation changes from line to line.10−0.391
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.8.716−0.288
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.118−0.203
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.10+0.191

Intercept 0.07 + feature contributions = 0.127 (log-odds).
Score = sigmoid(0.127) = 0.532.

Score0.43
Score4
Run 1

The code is exceptionally clear and concise. It has a flat structure with no nesting, a single-purpose main method, and one logical action per line. The intent—printing Euler’s number to 1000 significant digits—is immediately obvious. Variable names like 'e' and 'result' are appropriate. No unnecessary verbosity or tangled logic.

Run 2

The code is highly readable. It is well-structured with a single clear purpose: printing Euler's number rounded to 1000 significant digits. There is minimal nesting, no deep indentation, and each line performs one distinct action. The intent is unambiguous—importing necessary classes, defining the entry point, obtaining a BigDecimal from Math.E, rounding it with MathContext, and printing the result. The code is concise and avoids unnecessary verbosity. The only minor deduction is the slightly redundant use of BigDecimal.valueOf(Math.E) instead of a direct constructor, and the lack of comments, but neither significantly hampers readability.

Run 3

The code is highly readable with a clear, linear structure. It uses the well-known constant Math.E, converts it to BigDecimal with high precision, and outputs the result. There is minimal nesting, concise length, and clear intent. Each statement performs a single logical action, and the reading flow is natural. Minor deductions for lack of comments explaining the choice of 1000-digit precision and the slightly redundant BigDecimal.valueOf when BigDecimal could be constructed directly.

Run 1

Code Structure: Imports, class, and main method are logically organized. Nesting: Minimal, with only the standard class and method levels. Clarity of intent: Variable names and straightforward operations clearly convey rounding and printing e, although MathContext(1000) may misleadingly suggest 1,000-digit accuracy when Math.E supplies only double precision. Code length: Compact, with no unnecessary scaffolding beyond Java requirements. Action granularity: Each statement performs a focused step; chaining rounding and conversion remains easy to follow. Reading flow: Natural progression from initialization to formatting and output.

Run 2

Code Structure: Imports, class, and main method are logically organized. Nesting: Minimal, with only the required class and method scopes. Clarity of intent: Variable names and sequential operations clearly convey obtaining, rounding, and printing Euler’s number. However, MathContext(1000) may misleadingly suggest 1,000-digit accuracy; BigDecimal.valueOf(Math.E) only preserves the precision of the double value. Code length: Concise, with no unnecessary boilerplate beyond Java requirements. Action granularity: Each statement performs a focused step. Reading flow: Natural progression from value creation to formatting and output.

Run 3

Code Structure: Imports, class, and entry point are logically organized. Nesting: Only the necessary class and method nesting is present. Clarity of intent: Creating, rounding, and printing Euler's number is easy to follow, although MathContext(1000) misleadingly suggests high precision that BigDecimal.valueOf(Math.E) cannot provide. Code length: Concise, with no unnecessary scaffolding beyond standard Java requirements. Action granularity: Each statement performs one main action; chained rounding and conversion remain readable. Reading flow: The sequence naturally progresses from value creation to formatting and output.