Showing 7,775 of 7,775 total issues
Method remove
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public Object remove(Object value) {
_beanSet.remove(value);
if (_beanSet.isEmpty()) {
_beanSet = null;
} else if (System.identityHashCode(_proxy.get()) == System.identityHashCode(value)) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method renderProperties
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)
throws java.io.IOException {
super.renderProperties(renderer);
if (_max <= 0)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method setSelectedItem
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public void setSelectedItem(Comboitem item) {
if (item != null && item.getParent() != this)
throw new UiException("Not a child: " + item);
if (item != _selItem) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method afterUnmarshal
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private void afterUnmarshal(int cnt) {
for (Iterator it = getChildren().iterator(); it.hasNext();) {
final Object child = it.next();
if (child instanceof Treerow) {
_treerow = (Treerow) child;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method setOpen
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public void setOpen(boolean open) {
if (_open != open) {
_open = open;
//Note: _treerow might not be ready yet because it might be
//initialized before creating child components (for ZK pages)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method onEvent
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public void onEvent(Event event) {
//Bug ZK-1622: reset anchor position after changing page
_anchorTop = 0;
_anchorLeft = 0;
if (event instanceof PagingEvent) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method beforeChildAdded
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public void beforeChildAdded(Component child, Component refChild) {
if (child instanceof Treerow) {
if (_treerow != null && _treerow != child)
throw new UiException("Only one treerow is allowed: " + this);
} else if (child instanceof Treechildren) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method insertBefore
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public boolean insertBefore(Component child, Component refChild) {
if (child instanceof Treerow) {
if (super.insertBefore(child, refChild)) {
_treerow = (Treerow) child;
return true;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method setMode
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public void setMode(String mode) throws WrongValueException {
if (!_mode.equals(mode)) {
if (!"auto".equals(mode) && !"instant".equals(mode) && !"defer".equals(mode))
throw new WrongValueException("Unknown mode: " + mode);
if ((_localized || _progressing) && "instant".equals(mode))
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method addAll
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public boolean addAll(Collection<? extends E> c) {
if (_set instanceof LinkedHashSet) {
int begin = _set.size();
int added = 0;
for (final Iterator<? extends E> it = c.iterator(); it.hasNext();) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method init
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private void init() {
_items = new AbstractList<Row>() {
public int size() {
return getItemCount();
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method listIterator
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public ListIterator<E> listIterator(final int index) {
return new ListIterator<E>() {
private ListIterator<E> _it = _list.listIterator(index);
private E _current = null;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method setLabel
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public void setLabel(String label) {
final String old = getLabel();
if (!Objects.equals(old, label)) {
final Combobox cb = (Combobox) getParent();
final boolean syncValueToSelection = cb != null && cb.getSelectedItemDirectly() == this;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method autoFirstCell
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private Label autoFirstCell() {
Component cell = getFirstChild();
if (cell == null || cell instanceof Label || cell instanceof Cell) {
if (cell == null)
cell = new Label();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method beforeChildAdded
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public void beforeChildAdded(Component child, Component refChild) {
if (!(child instanceof Row))
throw new UiException("Unsupported child for rows: " + child);
if (child instanceof Groupfoot) {
if (!hasGroup())
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method setModel
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public void setModel(ListModel<?> model) {
if (disableFeature())
throw new IllegalAccessError("ZK EE version only!");
if (model != null) {
if (!(model instanceof Selectable))
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method doSort
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
/*package*/ boolean doSort(boolean ascending) {
final Comparator cmpr = ascending ? _sortAsc : _sortDsc;
if (cmpr == null)
return false;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method beforeChildAdded
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public void beforeChildAdded(Component child, Component refChild) {
if (child instanceof Caption) {
if (_caption != null && _caption != child)
throw new UiException("Only one caption is allowed: " + this);
} else {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getVisibleItemCount
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public int getVisibleItemCount() {
int count = getItemCount();
int visibleCount = 0;
if (getNextSibling() instanceof Listitem) {
Listitem item = (Listitem) getNextSibling();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method setActivePage
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public void setActivePage(int pg) throws WrongValueException {
if (pg < 0) {
throw new WrongValueException("expecting positive non zero value, got: " + pg);
}
if (pg > 0) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"