Showing 4,841 of 7,782 total issues
Method render
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public void render(ActionContext ac, boolean nested) throws DspException, IOException {
if (!isEffective())
return;
final Map<String, Object> attrs = new HashMap<String, Object>();
- 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 renderWith
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private void renderWith(ActionContext ac, Status st, Object[] ary) throws DspException, IOException {
final StringWriter out = getFragmentOut(ac, _trim);
for (int j = _beg; j < ary.length && j <= _end; ++j) {
final Object val = ary[j];
if (_var != 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 renderWith
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private void renderWith(ActionContext ac, Status st, byte[] ary) throws DspException, IOException {
final StringWriter out = getFragmentOut(ac, _trim);
for (int j = _beg; j < ary.length && j <= _end; ++j) {
final Object val = new Byte(ary[j]);
if (_var != 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 trim
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static void trim(Node node) {
for (Iterator it = node.getChildren().iterator(); it.hasNext();) {
final Object o = it.next();
if (o instanceof TextNode) {
final String s = ((TextNode) o).getText();
- 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 nextSeparator
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static int nextSeparator(Context ctx, int from, int to) {
for (; from < to; ++from) {
final char cc = ctx.content.charAt(from);
if ((cc < '0' || cc > '9') && (cc < 'a' || cc > 'z') && (cc < 'A' || cc > 'Z') && cc != '_')
break;
- 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 renderWith
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private void renderWith(ActionContext ac, Status st, long[] ary) throws DspException, IOException {
final StringWriter out = getFragmentOut(ac, _trim);
for (int j = _beg; j < ary.length && j <= _end; ++j) {
final Object val = new Long(ary[j]);
if (_var != 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 _bc_rec_mul
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
libbcmath._bc_rec_mul = function(a, b, c, d, e) {
var g, f, h, k, l, m, n;
if (b + d < libbcmath.MUL_BASE_DIGITS || b < libbcmath.MUL_SMALL_DIGITS || d <
libbcmath.MUL_SMALL_DIGITS) return libbcmath._bc_simp_mul(a, b, c, d, e);
e = Math.floor((libbcmath.MAX(b, d) + 1) / 2);
- 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 bc_num
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
bc_num: function() {
this.n_value = this.n_scale = this.n_len = this.n_sign = null;
this.toString = function() {
var a, b;
b = this.n_value.join("");
- 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 selectbox$mold$
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function selectbox$mold$(out) {
out.push('<select', this.domAttrs_(), '>');
var s = $eval(this.items) || [];
for (var i = 0, j = s.length; i < j; i++) {
out.push('<option');
- 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 _isSameBaseline
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function _isSameBaseline(ref: zk.Dimension & {_hgh?: number; _wdh?: number}, cur: zk.Dimension, vertical): boolean {
let hgh: number, wdh: number;
if (vertical) {
hgh = ref._hgh ?? (ref._hgh = ref.top + ref.height);
wdh = ref._wdh ?? (ref._wdh = ref.left + ref.width);
- 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 getHost
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function getHost(pkg: string, js: boolean): string {
for (var p in _pkghosts)
if (pkg.startsWith(p))
return _pkghosts[p][js ? 1 : 0];
return _defhost[js ? 1 : 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
Function afterMount
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function afterMount(fn?: () => void, delay?: number): boolean { //part of zk
if (fn) {
if (!jq.isReady)
jq(function () {
zk.afterMount(fn);
- 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 _respException
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function _respException(reqInf: AuRequestInfo, e: Error): boolean {
if (!window.zAu)
return true; //the doc has been unloaded
zAu.ajaxReq = zAu.ajaxReqInf = undefined;
- 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 $toString
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
$toString(): string { //toString is reserved keyword for IE
if (this._value.length == 0) return '';
var j = this._value.length - this._precision,
valFixed = '';
if (j < 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
Function newInstance
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
newInstance(param?: number | DateImpl | Parameters<DateConstructor['UTC']>, tz?: string): DateImpl {
let m: Moment;
if (tz)
tz = parseTzId(tz);
else
- 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 off
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
off: function (this: JQuery, type: string, selector: unknown, fn: unknown, ...rest: unknown[]) {
var evtType: string | undefined;
if ((evtType = zjq.eventTypes[type])) {
// refer to jquery on function for reassign args
if (selector === false || typeof selector === 'function') {
- 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 revisedOffset
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
revisedOffset(ofs?: zk.Offset): zk.Offset {
var el = this.jq[0];
if (!ofs) {
if (el.getBoundingClientRect) { // IE and FF3
var elst: undefined | CSSStyleDeclaration, oldvisi: undefined | string,
- 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 fireSized
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static fireSized(wgt: zk.Widget, bfsz?: number): void {
// ignore delayed rerendering case, like Bug ZK-2281
if (wgt.desktop) {
if (zk.clientinfo) { // Fix ZK-5017, not to use setTimeout here
zk.afterAuResponse(() => this.fireSized(wgt, bfsz));
- 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 destroy
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
destroy(): void {
var cave = this.cave;
jq(cave)
//unbind scroll event for input tab scroll
.off('scroll', this.proxy(this._fixScroll))
- 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 defaultAnimaOpts
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
defaultAnimaOpts(wgt: zk.Widget, opts: zk.SlideOptions, prop: string[], visible?: boolean): this {
var self = this;
jq.timers.push(function () {
if (!visible)
zWatch.fireDown('onHide', wgt);
- 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"