Sample

Schnappinger/argoUML/org.argouml.core.propertypanels.ui.UMLModelElementSourceFlowListModel

Human rating uses the original dataset scale.

Human3.87
Lines74

Scores

MethodScoreScaleDataset rank
(0–100)
Posnett10–1; higher is more readable
94.6Δ 47.6
Scalabrino0.760–1; higher is more readable
52.7Δ 5.7
Dorn0.6840–1; higher is more readable
73.9Δ 26.9
Mi0.5810–1; higher is more readable
55.4Δ 8.4
LLOC6Logical lines; fewer is more readable
79.7Δ 32.7
DeepSeek V4 Pro16.670–20; mean of three runs
59.9Δ 12.9
GPT-6.1 Sol170–20; mean of three runs
55.3Δ 8.3
BTTF0.720–1; higher is more readable
86.1Δ 39.1
Human3.871–4; original rating
47.0

Views

Source code

/* $Id: UMLModelElementSourceFlowListModel.java 19904 2012-12-27 00:46:17Z closettop_nightlybuild $ ***************************************************************************** * Copyright (c) 2009-2012 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: * bobtarling ***************************************************************************** * * Some portions of this file was previously release using the BSD License: */ // Copyright (c) 2002-2006 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.core.propertypanels.ui; import org.argouml.model.Model; /** * @since Oct 12, 2002 * @author jaap.branderhorst@xs4all.nl */ class UMLModelElementSourceFlowListModel extends UMLModelElementListModel { /** * Constructor for UMLModelElementSourceFlowListModel. */ public UMLModelElementSourceFlowListModel() { super("sourceFlow"); } /* * @see org.argouml.uml.ui.UMLModelElementListModel2#buildModelList() */ protected void buildModelList() { if (getTarget() != null) { setAllElements(Model.getFacade().getSourceFlows(getTarget())); } } /* * @see org.argouml.uml.ui.UMLModelElementListModel2#isValidElement(Object) */ protected boolean isValidElement(Object o) { return Model.getFacade().isAFlow(o) && Model.getFacade().getSourceFlows(getTarget()).contains(o); } }

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(log-odds)
Source linesThe number of non-empty source lines.74+29.6
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.580.09−19.143
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.232−7.848

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

Score0.76

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.75−1.619
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.98.947+0.792
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.021+0.737
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.73.85+0.622
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.98.987−0.527
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.1+0.398
Indentation frequencyHow rapidly indentation changes from line to line.30+0.301

Intercept 0.07 + feature contributions = 0.773 (log-odds).
Score = sigmoid(0.773) = 0.684.

Score0.581
Score6
Run 1

The code is generally well-structured and readable. It has a clear class hierarchy, concise methods, and flat nesting. Intent is evident from method names and the 'sourceFlow' string. Action granularity is mostly one action per line, though the isValidElement method chains two conditions on one line, slightly reducing clarity. The main readability issue is the excessive license header, which is not code logic but adds significant length and interrupts flow before the package declaration. The class itself is compact. Indentation and spacing are consistent. Overall, the code is easy to understand with minimal nesting and clear purpose.

Run 2

The code is generally readable: the class has a clear single purpose, methods are short, and intent is mostly clear. Structure is logical with a simple class hierarchy. Nesting is minimal, and most code lines perform one action. However, readability is reduced by several issues. The copyright header is excessively long and distracts from the actual source code, dominating the file. Indentation is inconsistent: the line inside buildModelList uses a tab mixed with spaces, breaking visual alignment. Naming is slightly vague—'getTarget()', 'setAllElements()', and 'isValidElement()' are inherited methods that require external knowledge of the superclass to fully understand context. The use of 'Model.getFacade()' repeated in isValidElement is slightly cumbersome. The one-line if body without braces, though simple, reduces robustness and clarity. Overall, the logic itself is straightforward, but these stylistic issues lower the readability score.

Run 3

The code is well-structured and follows clear conventions. It has a logical organization with a class definition, constructor, and overridden methods. Nesting is minimal - only one level in the if statement. Intent is clear: the class models source flows for a UML element. Code length is appropriate and concise. Action granularity is good, with one main action per line. Reading flow is natural - the class name, constructor, and methods follow a logical order. The code is generally readable, with minor points deducted for the lengthy copyright header (which is standard but adds noise before the actual code) and the use of tabs for indentation in one spot, which could affect consistency. The method names and variables are descriptive, enhancing clarity. Overall, this is clean, maintainable code that would be easy for another developer to understand quickly.

Run 1

Code Structure: The class is logically organized into a constructor, list-building method, and validation method. Nesting: Only one shallow conditional appears, keeping control flow simple. Clarity of intent: Class and method names communicate the source-flow purpose, although the parameter name 'o' is vague and framework dependencies require context. Code length: Executable code is concise; extensive license text and redundant comments increase scanning effort. Action granularity: Each statement performs one clear action, and the validation expression cleanly combines two related checks. Reading flow: Methods follow a natural order, but inconsistent indentation and outdated-looking @see references slightly disrupt readability.

Run 2

Code Structure: A small, focused class cleanly separates construction, list population, and element validation. Nesting: Only one shallow conditional; validation uses a straightforward boolean expression. Clarity of intent: Class and method names clearly indicate source-flow handling, although the parameter name 'o' is vague and inherited behavior requires external context. Code length: The implementation is concise, but extensive license headers and mostly boilerplate comments dominate the file. Action granularity: Each statement performs one clear action, with the chained facade calls remaining understandable. Reading flow: Methods follow a natural order and use consistent spacing overall, though the tab-indented statement and outdated superclass references in comments slightly disrupt readability.

Run 3

Code Structure: The class is logically organized into a constructor and two focused methods. Nesting: Only one shallow conditional appears, making control flow easy to follow. Clarity of intent: Class and method names clearly indicate source-flow list management, although the parameter name 'o' is vague and facade behavior requires external context. Code length: The executable code is concise; extensive license headers and mostly redundant comments increase reading overhead. Action granularity: Each statement performs a single clear operation, and the compound validation expression remains readable. Reading flow: Methods follow a natural sequence, but inconsistent indentation and outdated superclass references in comments slightly disrupt readability.