Showing 4,841 of 7,782 total issues
Method toButtonTypes
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static Button[] toButtonTypes(int buttons) {
final List<Button> btntypes = new ArrayList<Button>();
if ((buttons & OK) != 0)
btntypes.add(toButtonType(OK));
if ((buttons & CANCEL) != 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 afterUnmarshal
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private void afterUnmarshal() {
for (Iterator it = getChildren().iterator(); it.hasNext();) {
final Object child = it.next();
if (child instanceof North) {
_north = (North) 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 setMultiple
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public void setMultiple(boolean multiple) {
if (_multiple != multiple) {
_multiple = multiple;
fireEvent(TreeDataEvent.MULTIPLE_CHANGED, null, -1, -1);
- 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 setRadiogroup
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public void setRadiogroup(Radiogroup radiogroup) {
boolean inGroup = _groupId != null;
_groupId = null;
if (inGroup || radiogroup != _group) {
_explictGroup = radiogroup != 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 setValue
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public <T> void setValue(T value) {
if (!Objects.equals(_value, value)) {
_value = value;
final Listbox listbox = getListbox();
- 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 setSelectAll
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public void setSelectAll(boolean selectAll) {
if (selectAll) {
List<E> all = new LinkedList<>();
List<E> allNodes = model.getAllNodes();
for (E o : allNodes) {
- 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 setDisplayedTimeZones
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public void setDisplayedTimeZones(String dtzones) {
if (dtzones == null || dtzones.length() == 0) {
setDisplayedTimeZones((List<TimeZone>) null);
return;
}
- 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 arrayToString
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static final String arrayToString(Object[] ary) {
if (ary == null || ary.length == 0)
return "";
final StringBuffer sb = new StringBuffer(50);
- 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 equals
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public boolean equals(Object obj) {
if (obj instanceof String) {
return Objects.equals(popupString, obj);
} else if (obj instanceof Popup) {
- 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 render
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public void render(Page page, Writer out) throws IOException {
final Execution exec = Executions.getCurrent();
final String ctl = ExecutionsCtrl.getPageRedrawControl(exec);
boolean au = exec.isAsyncUpdate(null);
if (!au && (page.isComplete() || "complete".equals(ctl))) {
- 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 selectItem
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public void selectItem(Listitem item) {
if (item == null) {
setSelectedIndex(-1);
} else {
if (item.getParent() != 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 getMedia
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public Media getMedia(String pathInfo) {
if (pathInfo != null) {
int j = pathInfo.indexOf('/', 1);
if (j >= 0) {
int k = pathInfo.indexOf('/', ++j);
- 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 renderDesktop
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected void renderDesktop(Execution exec, Page page, Writer out) throws IOException {
HtmlPageRenders.setContentType(exec, page);
final PageCtrl pageCtrl = (PageCtrl) page;
write(out, HtmlPageRenders.outFirstLine(exec, page)); //might 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 getLabel
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public String getLabel() {
final Component cell = getFirstChild();
if (cell != null) {
if (cell instanceof Label)
return ((Label) cell).getValue();
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("rawtypes")
public Object clone() {
final Listbox clone = (Listbox) super.clone();
clone.init();
- 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 onPageDetached
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public void onPageDetached(Page page) {
super.onPageDetached(page);
if (_model != null && _dataListener != null)
_model.removeListDataListener(_dataListener);
if (_model instanceof PageableModel && _pgListener != 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 setTimeZone
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public void setTimeZone(TimeZone tzone) {
if (_tzone != tzone) {
if (_dtzones != null) {
tzone = _dtzones.contains(tzone) ? tzone : _dtzones.get(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 clone
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
public Object clone() {
SimpleGroupsModel clone = (SimpleGroupsModel) super.clone();
if (_data != null)
clone._data = new ArrayList(_data);
- 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 fixRefChildForHeader
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private Component fixRefChildForHeader(Component refChild) {
if (refChild != null && refChild.getParent() != this)
refChild = null;
// try the first listitem
- 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 remove
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public boolean remove(Object o) {
boolean ret = false;
if (_set.contains(o)) {
//bug #1819318 Problem while using SortedSet with Databinding
removeFromSelection(o);
- 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"