Sample

Schnappinger/aoi/artofillusion.SceneChangedEvent

Human rating uses the original dataset scale.

Human4
Lines38

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett10–1; higher is more readable
94.0Δ 1.6
Scalabrino0.8670–1; higher is more readable
80.1Δ 12.3
Dorn0.8050–1; higher is more readable
85.8Δ 6.6
Mi0.80–1; higher is more readable
95.7Δ 3.3
LLOC5Logical lines; fewer is more readable
83.0Δ 9.4
DeepSeek V4 Pro190–20; mean of three runs
99.7Δ 7.3
GPT-6.1 Sol190–20; mean of three runs
92.6Δ 0.2
BTTF0.8440–1; higher is more readable
98.3Δ 5.9
Human41–4; original rating
92.4

Views

Source code

/* Copyright (C) 2006-2009 by Peter Eastman This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ package artofillusion; import artofillusion.ui.*; /** * A SceneChangedEvent is dispatched by an EditingWindow to indicate that some element of the * scene has changed. This includes all aspects of the scene, including the list of objects, * properties of individual objects, textures, the list of currently selected objects, etc. */ public class SceneChangedEvent { private EditingWindow window; public SceneChangedEvent(EditingWindow window) { this.window = window; } /** * Get the LayoutWindow containing the scene which was changed. */ public EditingWindow getWindow() { return window; } }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(log-odds)
Source linesThe number of non-empty source lines.38+15.2
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.815−7.223
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.188.87−6.233

Intercept 8.87 + feature contributions = 10.614 (log-odds).
Score = sigmoid(10.614) = 1.

Score0.867

Feature contributions

FeatureValueContribution
(log-odds)
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.017+0.773
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.85.974+0.583
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.39−0.345
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.93−0.274
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.37.851+0.119
Indentation frequencyHow rapidly indentation changes from line to line.24+0.093

Intercept 0.07 + feature contributions = 1.418 (log-odds).
Score = sigmoid(1.418) = 0.805.

Score0.8
Score5
Run 1

The code is highly readable due to its simple, logical structure and clear intent. It defines a single event class with one field, a straightforward constructor, and a single getter—exhibiting flat nesting with no conditional complexity. The package and import statements are minimal, and the Javadoc comments explain the class purpose and method behavior. Action granularity is clean: each statement performs a single task, and the reading flow progresses naturally from field declaration to constructor to accessor. The only minor deduction is that the code is arguably longer than strictly necessary because it includes license header and verbose documentation for a very simple class, but this is consistent with professional practice and not a readability burden.

Run 2

The code is exceptionally readable. Structure is logical: license header, package declaration, import, Javadoc comment, class declaration, field, constructor, and accessor method. Nesting is minimal—only one level. Intent is clear from both the class-level Javadoc and the method-level comment. The code is concise and avoids unnecessary length. Each action (constructor assignment, field return) occupies a single line, aiding comprehension. Reading flow is natural: you understand the class purpose, the window field, how it is set, and how it is retrieved. Minor deductive points: a redundant empty line after the field and no explicit constructor Javadoc, but these are negligible. Overall, the code exemplifies clean, maintainable style.

Run 3

The code is highly readable. It has a clear, logical structure with a single class, a field, a constructor, and a getter method. Nesting is minimal; methods are flat and straightforward. The intent is unambiguous—representing a scene-changed event and exposing the originating window. The code is concise but not overly terse, with appropriate Javadoc comments that clarify purpose. Each line performs essentially one action, and the reading flow is natural: imports, class declaration, field, constructor, getter. The only minor weakness is the slightly redundant comment for getWindow(), which is already self-explanatory, but this hardly affects readability.

Run 1

Code Structure: The class is logically organized into a field, constructor, and accessor. Nesting: Only essential class and method scopes are present. Clarity of intent: Descriptive names and class documentation clearly explain the event's purpose; however, the accessor documentation mentions LayoutWindow while the return type is EditingWindow. Code length: The implementation is concise, with no unnecessary logic. Action granularity: Each executable statement performs a single action on its own line. Reading flow: Consistent formatting and conventional member ordering make the code easy to follow. The wildcard import slightly obscures the specific dependency.

Run 2

Code Structure: A small, logically organized event class with one field, a constructor, and an accessor. Nesting: Minimal, with no nested control flow. Clarity of intent: Descriptive class and method names and useful class documentation clearly convey the purpose; however, the accessor documentation mentions LayoutWindow while the return type is EditingWindow. Code length: Concise implementation with no unnecessary logic; the license header is standard boilerplate. Action granularity: Each statement performs a single action on its own line. Reading flow: Natural progression from class documentation to state, initialization, and access. The wildcard import slightly obscures the dependency.

Run 3

Code Structure: A logically organized event class with a single field, constructor, and accessor. Nesting: Minimal, with no nested control flow. Clarity of intent: Descriptive class and method names plus class documentation clearly explain its purpose; however, the accessor documentation mentions LayoutWindow while the return type is EditingWindow. Code length: Concise implementation without unnecessary logic; the license header adds length but is conventional. Action granularity: Each statement performs one clear action. Reading flow: Natural progression from documentation to state, initialization, and access. The wildcard import slightly obscures the source of EditingWindow.