Showing 4,841 of 7,782 total issues
Method show
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static int show(int messageCode, int titleCode, int buttons, String icon, int focus,
EventListener<Event> listener) {
Method validate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public void validate(Component comp, Object value) throws WrongValueException {
super.validate(comp, value);
if (value instanceof Double) {
final Double doubleValue = (Double) 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
Avoid deeply nested control flow statements. Open
if (isSelectable((E) child)) {
all.add((E) child);
}
Avoid deeply nested control flow statements. Open
if (isSelectable((E) group)) {
all.add((E) group);
}
Avoid deeply nested control flow statements. Open
if (g[2] != -1)
g[2] += (infront ? 1 : -1);
Method invalidateListitems
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void invalidateListitems() {
//Bug 3147518: avoid memory leak
//Also better performance (outer better than remove a lot)
final Execution execution = Executions.getCurrent();
final String uuid = _listbox.getUuid();
- 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 setText
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public void setText(String value) throws WrongValueException {
if (_auxinf != null && _auxinf.maxlength > 0 && value != null && value.length() > _auxinf.maxlength)
throw new WrongValueException(this, MZul.STRING_TOO_LONG, new Integer(_auxinf.maxlength));
final Object val = coerceFromString(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 addValue
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public void addValue(Date date, Number open, Number high, Number low, Number close, Number volumn);
Method onEvent
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public void onEvent(Event event) {
if (_model != null && inPagingMold()) {
final Paginal pgi = getPaginal();
int pgsz = pgi.getPageSize();
int ofs = pgi.getActivePage() * pgsz;
- 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 checkInvalidateForMoved
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void checkInvalidateForMoved(Listitem child, boolean bRemove) {
// No need to invalidate if
// 1) act == last and child in act
// 2) act != last and child after act
// Except removing last elem which in act and act has only one elem
- 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
Avoid deeply nested control flow statements. Open
for (int j = 0, len = g.getItemCount(); j < len; j++)
item = item.getNextSibling();
Method setValueByClient
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void setValueByClient(Object value, String valstr) {
if (_auxinf != null && _auxinf.maxlength > 0 && valstr != null && valstr.length() > _auxinf.maxlength)
throw new WrongValueException(this, MZul.STRING_TOO_LONG, new Integer(_auxinf.maxlength));
final boolean same = Objects.equals(_value, 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 getGroupsInfoAt
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
/* package */int[] getGroupsInfoAt(int index, boolean isListgroup) {
for (int[] g : _groupsInfo) {
if (isListgroup) {
if (index == g[0])
return g;
- 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 fixRefChildBeforeFoot
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private Component fixRefChildBeforeFoot(Component refChild) {
if (refChild == null) {
if (_listfoot != null)
refChild = _listfoot;
else if (_frozen != 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 validate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected void validate(Object value) throws WrongValueException {
final Constraint constr = getConstraint();
if (constr != null) { //then _auxinf must be non-null
//Bug 1698190: constructor might be zscript
Scopes.beforeInterpret(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 clone
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
public Object clone() {
GroupsModelArray clone = (GroupsModelArray) super.clone();
if (_nativedata != null)
clone._nativedata = ArraysX.duplicate(_nativedata);
- 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
Avoid deeply nested control flow statements. Open
if (m.getActivePage() >= 0) { //min page index is 0
pgi.setActivePage(m.getActivePage());
} else {
m.setActivePage(pgi.getActivePage());
}
Avoid deeply nested control flow statements. Open
if (realIndex >= 0 && realIndex < getItemCount())
removeChild(getChildren().get(realIndex));
Avoid deeply nested control flow statements. Open
if (hds != null) {
for (Component listheader : hds.getChildren()) {
((Listheader) listheader).setSortDirection("natural");
}
}
Method removeAll
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public boolean removeAll(Collection<?> c) {
if (_set == c || this == c) { //special case
clear();
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"