Showing 4,841 of 7,782 total issues
File ReflectionUtil.java
has 402 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
Function _mouseDown
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
_mouseDown(evt: zk.Event): void {
var cls = evt.target.className,
index = cls.lastIndexOf('-'),
key = cls.substring(index + 1),
$drag = jq(this.edrag);
Method setContent
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public final Object setContent(Object obj) {
if (obj instanceof Item) {
getChildren().add((Item)obj);
return null; //done
}
- 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 coerceToTypeForSetValue
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
protected static final Object coerceToTypeForSetValue(final Object obj,
Class<?> type) throws ELException {
if (type == null || Object.class.equals(type) ||
(obj != null && type.isAssignableFrom(obj.getClass()))) {
return obj;
- 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 unwrap
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public NameSpace unwrap(Scope scope) {
if (_bshns == null) {
_bshns = BSHInterpreter.getInterpreter(scope).newNS(scope);
if (_vars != null) {
for (Map.Entry<String, Object> me : _vars.entrySet()) {
- 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 setSort
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public void setSort(String type) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
if (type == null)
return;
if (type.startsWith("client")) {
setSortAscending(type);
- 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 37 (exceeds 5 allowed). Consider refactoring. Open
public void beforeChildAdded(Component newChild, Component refChild) {
if (newChild instanceof Caption) {
if (_caption != null && _caption != newChild)
throw new UiException("Only one caption is allowed: " + this);
} else if (refChild instanceof Caption) {
- 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 onListDataChange
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("rawtypes")
private void onListDataChange(ListDataEvent event) {
int type = event.getType();
// ZK-4549: should ignore before handling sorting
if (getAttribute(Attributes.BEFORE_MODEL_ITEMS_RENDERED) != 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
Function _eval
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
function _eval(wgt: zk.Widget, s: string | null, args: unknown): string | null {
if (s)
for (var j = 0, k: number, l: number, t: string, last = s.length - 1, s2: string | undefined; ;) {
k = s.indexOf('#{', j);
if (k < 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
File B65_ZK_2021_Dictionary.java
has 397 lines of code (exceeds 250 allowed). Consider refactoring. Open
package org.zkoss.zktest.test2;
public class B65_ZK_2021_Dictionary {
static String[] dictionary = { "abacus", "abase", "abate", "abbess", "abbey", "abbot", "abdicate", "abdomen", "abdominal", "abduction", "abed", "aberrant", "aberration", "abet", "abeyance",
"abhor", "abhorrence", "abhorrent", "abidance", "ability", "abject", "abjure", "able-bodied", "ablution", "abnegate", "abnormal", "abominable", "abominate", "abomination", "aboriginal",
File ComponentInfo.java
has 397 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* ComponentInfo.java
Purpose:
Description:
Function _parseConfig
has 138 lines of code (exceeds 25 allowed). Consider refactoring. Open
const _parseConfig = function _parseConfig() {
let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
if (CONFIG && CONFIG === cfg) {
return;
}
File Panel.java
has 396 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Panel.java
Purpose:
Description:
Rows
has 41 methods (exceeds 20 allowed). Consider refactoring. Open
public class Rows extends XulElement {
private int _visibleItemCount;
private transient List<int[]> _groupsInfo;
private transient List<Group> _groups;
File B85_ZK_3733_FoodData.java
has 394 lines of code (exceeds 250 allowed). Consider refactoring. Open
package org.zkoss.zktest.test2;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
Method parse
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public Object parse(Reader in, ContainerFactory containerFactory) throws IOException, ParseException{
reset(in);
LinkedList statusStack = new LinkedList();
LinkedList valueStack = new LinkedList();
- 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 myGetCloseMethod
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
private static final
Method myGetCloseMethod(final Class<?> cls, final String name,
final Class<?>[] argTypes, final boolean bySubclass)
throws NoSuchMethodException {
// assert argTypes != null: "Caller shall handle 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 toString
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public static final String toString(Object o) {
if (o == null) return null;
if (o instanceof Date) return DateFormats.format((Date)o, false);
if (o instanceof Class) {
final Class cls = (Class)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"
Further reading
Method load0
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
private static void load0() throws java.io.IOException {
final XMLResourcesLocator locator = Utils.getXMLResourcesLocator();
//1. parse config.xml
final ConfigParser parser = new ConfigParser();
- 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 setId
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public void setId(String id) {
if (id == null)
id = "";
if (!id.equals(_id)) {
final boolean rawId = this instanceof RawId;
- 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"