Showing 7,775 of 7,775 total issues
Avoid deeply nested control flow statements. Open
if (g[2] != -1)
g[2] += (infront ? 1 : -1);
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) group)) {
all.add((E) group);
}
Method fixClone
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void fixClone() {
if (_sortAsc instanceof TreeitemComparator) {
final TreeitemComparator c = (TreeitemComparator) _sortAsc;
if (c.getTreecol() == this && c.isAscending())
_sortAsc = new TreeitemComparator(this, true, c.shallIgnoreCase());
- 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 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) {
Avoid deeply nested control flow statements. Open
if (isSelectable((E) child)) {
all.add((E) child);
}
Method show
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static int show(int messageCode, Object[] args, int titleCode, int buttons, String icon, int focus) {
Method show
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static int show(int messageCode, Object arg, int titleCode, int buttons, String icon, int focus) {
Method show
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static int show(String message, String title, int buttons, String icon, int focus,
EventListener<Event> listener) {
Avoid deeply nested control flow statements. Open
if (actpg > maxPageIndex) {
p.setActivePage(maxPageIndex);
}
Avoid deeply nested control flow statements. Open
if (realIndex >= 0 && realIndex < getChildren().size())
removeChild(getChildren().get(realIndex));
Avoid deeply nested control flow statements. Open
for (int j = 0, len = g.getItemCount(); j < len; j++)
item = item.getNextSibling();
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 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 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
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 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 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 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
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"