Sample

JetBrains/b44

Human rating uses the original dataset scale.

DatasetJetBrains
Human0.82
Lines9

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett0.0170–1; higher is more readable
91.5Δ 25.0
Scalabrino0.9580–1; higher is more readable
96.6Δ 30.1
Dorn0.4110–1; higher is more readable
31.4Δ 35.2
Mi0.3880–1; higher is more readable
35.6Δ 30.9
LLOC4Logical lines; fewer is more readable
92.8Δ 26.3
DeepSeek V4 Pro180–20; mean of three runs
94.5Δ 28.0
GPT-6.1 Sol18.330–20; mean of three runs
90.3Δ 23.7
BTTF0.6580–1; higher is more readable
96.6Δ 30.1
Human0.820–1; original rating
66.5

Views

Source code

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

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.277.435−9.155
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.925−7.387
Source linesThe number of non-empty source lines.9+3.6

Intercept 8.87 + feature contributions = -4.072 (log-odds).
Score = sigmoid(-4.072) = 0.017.

Score0.958

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.1−0.703
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.75+0.489
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.7.895−0.299
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.101−0.043

Intercept 0.07 + feature contributions = -0.359 (log-odds).
Score = sigmoid(-0.359) = 0.411.

Score0.388
Score4
Run 1

The code is highly readable. It has a clear, logical structure with a single class and main method. Nesting is minimal, with no conditional or loop constructs. The intent — printing the golden ratio to 1000 decimal places — is evident from the class name and variable. The code is concise but could be slightly shortened by combining the value assignment and scale setting. Each line performs a distinct action, improving action granularity. The reading flow is natural: import, class definition, method, value creation, scale setting, output. A minor issue is the use of the deprecated BigDecimal.ROUND_HALF_UP constant instead of the modern RoundingMode enum, which marginally affects clarity.

Run 2

The code is highly readable. It has a simple, logical structure—just a main method that computes and prints a constant. Nesting is minimal with no deep blocks. The intent is clear: the class and variable names clearly state that it's about the Golden Ratio. The code is concise and avoids unnecessary length. Each statement performs a single action, aiding granularity. The reading flow is natural, from variable initialization to precision adjustment to output. Minor deductions are for using a deprecated BigDecimal rounding constant, which might confuse newer developers, and for not using a named constant for the scale value.

Run 3

The code is simple, well-structured, and highly readable. It has a clear intent, minimal nesting, and concise implementation. Minor improvement could be using a constant and adding a comment for clarity.

Run 1

Code Structure: The import, class, and main method are logically organized. Nesting: Only the necessary class and method scopes are present. Clarity of intent: GoldenRatio and phi clearly identify the value being printed, although setting a double-derived value to 1000 decimal places misleadingly suggests greater precision. Code length: The implementation is concise without unnecessary statements. Action granularity: Initialization, scale adjustment, and output each occupy a separate line. Reading flow: Execution proceeds naturally from defining the value to formatting and printing it. The unexplained scale of 1000 and deprecated ROUND_HALF_UP constant slightly reduce clarity.

Run 2

Code Structure: The import, class, and main method are logically organized. Nesting: Only the necessary class and method nesting is present. Clarity of intent: GoldenRatio and phi clearly identify the value being printed, but setting a double-derived approximation to 1000 decimal places misleadingly suggests greater precision. Code length: The code is concise with no unnecessary statements. Action granularity: Each statement performs one clear action. Reading flow: Initialization, scale adjustment, and output follow a natural sequence. The deprecated BigDecimal.ROUND_HALF_UP constant slightly reduces modern readability compared with RoundingMode.HALF_UP.

Run 3

Code Structure: A single class and main method provide clear, logical organization. Nesting: Minimal, consisting only of the class and method scopes. Clarity of intent: GoldenRatio and phi clearly indicate the purpose, although setting the scale to 1000 may misleadingly suggest greater precision than the double literal provides. Code length: Concise, with no unnecessary logic. Action granularity: Each statement performs one distinct action. Reading flow: Initialization, scaling, and printing follow a natural sequence. The deprecated rounding constant slightly reduces clarity compared with RoundingMode.HALF_UP.