Showing 4,841 of 7,782 total issues
Method isSelectAll
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public boolean isSelectAll() {
Selectable smodel = (Selectable) model;
boolean isGroupSelectable = model.isGroupSelectable();
for (int i = 0, j = model.getGroupCount(); i < j; i++) {
if (isGroupSelectable) {
- 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 listbox$mold$
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
function listbox$mold$(out) {
var uuid = this.uuid,
zclsHTML = this.getZclass(),
innerWidth = zUtl.encodeXML(this.getInnerWidth()),
wdAttr = innerWidth === '100%' ? ' width="100%"' : '',
- 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 tree$mold$
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
function tree$mold$(out) {
var uuid = this.uuid,
innerWidth = zUtl.encodeXML(this.getInnerWidth()),
width = innerWidth === '100%' ? ' width="100%"' : '',
wdStyle = innerWidth !== '100%' ? 'width:' + innerWidth : '',
- 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 initDataListener
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void initDataListener() {
if (INVALIDATE_THRESHOLD == -1) {
INVALIDATE_THRESHOLD = Utils.getIntAttribute(this, "org.zkoss.zul.invalidateThreshold", 10, true);
}
if (_dataListener == null)
File Verifier.java
has 362 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Verifier.java
Purpose:
Description:
File JsContentRenderer.java
has 362 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* JsContentRenderer.java
Purpose:
Description:
File ComponentsCtrl.java
has 362 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* ComponentsCtrl.java
Purpose:
Description:
GenericInterpreter
has 36 methods (exceeds 20 allowed). Consider refactoring. Open
public abstract class GenericInterpreter implements Interpreter {
/** Used by {@link #getFromNamespace} to denote a variable is not defined.
* @since 2.4.0
*/
public static final Object UNDEFINED = new Object() {
GridDataLoader
has 36 methods (exceeds 20 allowed). Consider refactoring. Open
public class GridDataLoader implements DataLoader, Cropper {
private Grid _grid;
//--DataLoader--//
public void init(Component owner, int offset, int limit) {
ClassWebResource
has 36 methods (exceeds 20 allowed). Consider refactoring. Open
public class ClassWebResource {
private static final Logger log = LoggerFactory.getLogger(ClassWebResource.class);
private final ServletContext _ctx;
/** mapping URI including PATH_PREFIX. */
Function syncSize
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
syncSize(showScrollbar?: boolean): void {
this._checkBarRequired();
var wgt = this.widget,
frozen = wgt.frozen, froenScrollWidth = 0,
Function formatDate
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
formatDate(val: DateImpl, fmt?: string, localizedSymbols?: zk.LocalizedSymbols): string {
if (!fmt) fmt = 'yyyy/MM/dd';
localizedSymbols ??= {
DOW_1ST: zk.DOW_1ST,
Method compareVersion
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public static final int compareVersion(int[] v1, int[] v2) {
for (int j = 0;; ++j) {
if (j == v1.length) {
for (; j < v2.length; ++j) {
if (v2[j] > 0) return -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 matched
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
private static boolean matched(Class[] types, Object[] args, boolean loosely) {
if (types.length == args.length) {
final Object[] argcvt = loosely ? new Object[args.length]: args;
boolean cvted = false;
for (int k = args.length;;) {
- 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 jj_add_error_token
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
private void jj_add_error_token(int kind, int pos) {
if (pos >= 100) return;
if (pos == jj_endpos + 1) {
jj_lasttokens[jj_endpos++] = kind;
} else if (jj_endpos != 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 Function
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
final public void Function() throws ParseException {
/*@bgen(jjtree) Function */
AstFunction jjtn000 = new AstFunction(JJTFUNCTION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);Token t0 = 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 invoke
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public Object invoke(ELContext context, Object base, Object method,
Class<?>[] paramTypes, Object[] params) {
if (context == null) {
throw new NullPointerException();
- 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 parseZk
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
private static ZkInfo parseZk(NodeInfo parent, Element el, AnnotationHelper annHelper) throws Exception {
if (annHelper.clear())
log.warn(message("Annotations are ignored since <zk> doesn't support them", el));
final ZkInfo zi = new ZkInfo(parent, 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 init
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public void init(PageConfig config) {
final Execution exec = Executions.getCurrent();
if (((ExecutionCtrl) exec).isRecovering()) {
final String uuid = config.getUuid(), id = config.getId();
if (uuid == null || id == 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 getComposer
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
public static Composer getComposer(Page page, Object[] ary) throws Exception {
if (ary == null || ary.length == 0)
return 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"