Showing 4,829 of 7,767 total issues
Method doSort
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static boolean doSort(Listbox listbox) {
Listhead hds = listbox.getListhead();
if (!listbox.isAutosort() || hds == null)
return false;
for (Iterator<Component> it = hds.getChildren().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 setShape
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void setShape(String shape) throws WrongValueException {
if (shape != null)
if (shape.isEmpty())
shape = null;
else if (!"rect".equals(shape) && !"rectangle".equals(shape) && !"circle".equals(shape)
- 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 setOpenGroup0
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public boolean setOpenGroup0(int groupIndex, boolean open) {
if (_opens == null) {
if (open)
return true; // _opens == null means all open
int length = getGroupCount();
- 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 setOpenGroup0
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private boolean setOpenGroup0(int groupIndex, boolean open) {
if (_opens == null) {
if (open)
return true; // _opens == null means all open
int length = getGroupCount();
- 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 setSpan
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void setSpan(boolean span) {
if ((span && !"true".equals(_span)) || (!span && _span != null && !"false".equals(_span))) {
_span = span ? "true" : "false";
smartUpdate("span", span);
}
- 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 onClose
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void onClose() {
if (_listener != null) {
final ClickEvent evt = new ClickEvent(Events.ON_CLOSE, this, null);
try {
_listener.onEvent(evt);
- 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 isValid
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public boolean isValid() {
if (_auxinf != null && _auxinf.errmsg != null)
return false;
if (!_valided && _auxinf != null && _auxinf.constr != 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 getDataLoader
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
/* package */DataLoader getDataLoader() {
if (_dataLoader == null) {
_rod = evalRod();
final String loadercls = Library.getProperty("org.zkoss.zul.listbox.DataLoader.class");
try {
- 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 selectAll
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void selectAll() {
if (!_multiple)
throw new UiException("Appliable only to the multiple seltype: " + this);
if (_items.size() != _selItems.size()) {
- 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 renderAll
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void renderAll() {
if (_model == null)
return;
_renderAll = 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 fixItemIndices
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void fixItemIndices(int j, int to) {
int realj = getRealIndex(j);
if (realj < 0)
realj = 0;
if (realj < _items.size()) {
- 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 hashCode
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public int hashCode() {
if (popupString != null) {
return popupString.hashCode();
} else if (popup != null) {
return popup.hashCode();
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
public boolean equals(Object o) {
if (this == o)
return true;
RenderResponse val = o instanceof RenderResponse ? (RenderResponse) o
: o instanceof RenderHttpServletResponse ? ((RenderHttpServletResponse) o)._res : 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 writeObject
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void writeObject(java.io.ObjectOutputStream s) throws IOException {
s.defaultWriteObject();
if (_entry != null) {
s.writeObject(_entry.getKey());
s.writeObject(_entry.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 equals
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public boolean equals(Object o) {
if (this == o)
return true;
ResourceResponse val = o instanceof ResourceResponse ? (ResourceResponse) o
: o instanceof ResourceHttpServletResponse ? ((ResourceHttpServletResponse) o)._res : 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 equals
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public boolean equals(Object o) {
if (this == o)
return true;
RenderRequest val = o instanceof RenderRequest ? (RenderRequest) o
: o instanceof RenderHttpServletRequest ? ((RenderHttpServletRequest) o)._req : 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 removeFilter
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public boolean removeFilter(String ext, Filter filter, int flags) {
if (ext == null || filter == null)
return false;
ext = ext.toLowerCase(java.util.Locale.ENGLISH);
- 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 include
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void include(HttpServletRequest request, HttpServletResponse response, String uri, Map params)
throws ServletException, IOException {
//Note: it is caller's job to convert related path to ~./
if (uri.startsWith("~./") && uri.indexOf('?') < 0 && isDirectInclude(uri)) {
Object old = request.getAttribute(Attributes.ARG);
- 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 getThreadLocals
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void getThreadLocals() {
try {
Class cls = Classes
.forNameByThread("org.springframework.transaction.support.TransactionSynchronizationManager");
- 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 getResourceAsStream
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public InputStream getResourceAsStream(String uri) {
uri = fixURI(uri);
if (_extraloc != null) {
final InputStream is = _extraloc.getResourceAsStream(uri);
if (is != 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"