Sample

Schnappinger/argoUML/org.argouml.uml.diagram.ui.FigUsage

Human rating uses the original dataset scale.

Human3.96
Lines61

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett10–1; higher is more readable
97.7Δ 20.6
Scalabrino0.9230–1; higher is more readable
94.5Δ 17.5
Dorn0.9680–1; higher is more readable
98.7Δ 21.6
Mi0.560–1; higher is more readable
45.9Δ 31.2
LLOC1Logical lines; fewer is more readable
98.3Δ 21.3
DeepSeek V4 Pro17.670–20; mean of three runs
83.0Δ 5.9
GPT-6.1 Sol190–20; mean of three runs
92.6Δ 15.5
BTTF0.8010–1; higher is more readable
96.4Δ 19.3
Human3.961–4; original rating
77.1

Views

Source code

/* $Id: FigUsage.java 17865 2010-01-12 20:45:26Z linus $ ***************************************************************************** * Copyright (c) 2009 Contributors - see below * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * mvw ***************************************************************************** * * Some portions of this file was previously release using the BSD License: */ // Copyright (c) 1996-2009 The Regents of the University of California. All // Rights Reserved. Permission to use, copy, modify, and distribute this // software and its documentation without fee, and without a written // agreement is hereby granted, provided that the above copyright notice // and this paragraph appear in all copies. This software program and // documentation are copyrighted by The Regents of the University of // California. The software program and documentation are supplied "AS // IS", without any accompanying services from The Regents. The Regents // does not warrant that the operation of the program will be // uninterrupted or error-free. The end-user understands that the program // was developed for research purposes and is advised not to rely // exclusively on the program for any reason. IN NO EVENT SHALL THE // UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, // SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE // PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF // CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. package org.argouml.uml.diagram.ui; import org.argouml.uml.diagram.DiagramSettings; /** * This class represents a Fig for a Usage. * * @author Markus Klink */ public class FigUsage extends FigDependency { /** * Construct a Fig. * * @param owner owning UML element * @param settings render settings */ public FigUsage(Object owner, DiagramSettings settings) { super(owner, settings); } }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(log-odds)
Source linesThe number of non-empty source lines.61+24.4
Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value.5.18−7.769
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.215.493−7.111

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

Score0.923

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.1+1.001
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.008+0.863
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.77.952+0.453
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.60.646+0.438
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
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.77.935+0.364
Indentation frequencyHow rapidly indentation changes from line to line.16−0.184

Intercept 0.07 + feature contributions = 3.403 (log-odds).
Score = sigmoid(3.403) = 0.968.

Score0.56
Score1
Run 1

The code is highly readable due to its clear, logical structure. It is organized as a simple class extending a parent, with minimal nesting and a single, clearly defined constructor. The intent is unambiguous: it represents a FigUsage element, delegating initialization to its superclass. The code is concise and avoids unnecessary length, with each action on its own line. Reading flow is natural, following standard Java conventions. The extensive license headers, while lengthy, are typical and do not affect the functional readability of the code itself. Deductions are minor, primarily for the verbose comments relative to the tiny amount of actual code.

Run 2

The code is highly readable due to its clear, logical structure and minimal complexity. The class has a single, well-defined purpose (representing a Fig for a Usage) and inherits functionality cleanly from FigDependency. Nesting is flat, with no conditional or loop constructs. The constructor clearly delegates to the superclass, and intent is unambiguous through meaningful names and a concise Javadoc comment. Code length is appropriate—there is no unnecessary boilerplate beyond standard licensing and package statements, which are properly separated. Each action is on its own line, aiding readability. The reading flow is natural: package, import, class declaration, constructor. The only minor drawbacks are the long license header, which could be externalized, and the sparse inline documentation, but neither significantly hinders understanding of the actual logic.

Run 3

The code is highly readable. It has clear, logical structure with proper package and import declarations. The class is flat with no nested blocks beyond the constructor. Intent is explicit through naming and documentation. The code is concise, containing only what is necessary. Each action is on its own line, and the reading flow is natural. The only minor deductions are for the lengthy license header, which adds noise before the actual code, and slight redundancy in the Javadoc comment for the constructor.

Run 1

Code Structure: Clean organization with a package declaration, one import, a documented class, and a single constructor. Nesting: Minimal nesting, limited to the class and constructor. Clarity of intent: Class naming, inheritance, and documentation clearly identify a Usage figure; the constructor straightforwardly delegates initialization to its parent. Code length: Implementation is extremely concise, although the lengthy licensing header dominates the file and delays reaching the functional code. Action granularity: The constructor performs exactly one action on one line. Reading flow: Conventional Java ordering and consistent formatting make the implementation easy to follow. Understanding rendering behavior requires consulting FigDependency, but the local code is highly readable.

Run 2

Code Structure: Clearly organized into package, import, class documentation, and a single constructor. Nesting: Minimal, with only class and constructor scopes. Clarity of intent: Descriptive class and superclass names, plus documentation, make its role as a UML Usage figure clear, although implementation details depend on the superclass. Code length: The implementation is appropriately concise; the lengthy legal header adds scrolling overhead without complicating the logic. Action granularity: The constructor contains one straightforward action on its own line. Reading flow: Conventional Java layout and consistent formatting make the executable code easy to follow.

Run 3

Code Structure: Clearly organized into package, import, class documentation, and a single constructor. Nesting: Minimal, with only class and constructor scopes. Clarity of intent: The class name, inheritance, and documentation clearly identify a usage figure that delegates initialization to its superclass. Code length: The implementation is concise, although the lengthy licensing header dominates the file and delays reaching the functional code. Action granularity: The constructor contains one straightforward action on its own line. Reading flow: Conventional Java ordering and consistent formatting make the code easy to follow; only the extensive header slightly interrupts accessibility.