Showing 4,841 of 7,782 total issues
Method show
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
public static Button show(String message, String title, Button[] buttons, String[] btnLabels, String icon,
Button focus, EventListener<ClickEvent> listener, Map<String, String> params) {
Consider simplifying this complex logical expression. Open
if ((cc < '0' || cc > '9') && (cc < 'a' || cc > 'z') && (cc < 'A' || cc > 'Z') && cc != '_')
break;
Consider simplifying this complex logical expression. Open
if (m != e && !1 !== (l = this._array_search(k, this.textsubmodes[m]))) {
(h + 1 == f || h + 1 < f && !1 !== this._array_search(this._ord(b.charAt(
h + 1)), this.textsubmodes[e])) && (3 == m || 0 == m && 1 == e) ? 3
== m ? g.push(29) : g.push(27): (g = g.concat(this.textlatch["" + e +
m]), e = m);
Consider simplifying this complex logical expression. Open
if ( support.matchesSelector && documentIsHTML &&
!nonnativeSelectorCache[ expr + " " ] &&
( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
Consider simplifying this complex logical expression. Open
if (vertical) {
hgh = ref._hgh ?? (ref._hgh = ref.top + ref.height);
wdh = ref._wdh ?? (ref._wdh = ref.left + ref.width);
return cur.top >= hgh || cur.left < wdh;
} else {
Function showNotification
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
export function showNotification(msg: string, type: zul.wgt.NotificationType, pid: string, ref: zk.Widget,
pos: string, off: zk.Offset, dur: number, closable: boolean): void {
Consider simplifying this complex logical expression. Open
if (prej < 0
&& (cc == '#' || cc == '0' || cc == '.' || cc == '-' || cc == ',' || cc == 'E'))
prej = ret.length;
Consider simplifying this complex logical expression. Open
if (((cc < '0' || cc > '9') && cc != '-' && cc != '+')
|| (j && (cc == '-' || cc == '+')))
if (jdot < 0 && cc == '.') {
jdot = j;
} else {
Consider simplifying this complex logical expression. Open
if (_actTmout || _dragging.has(node) || evt.which != 1
|| (zk.webkit && jq.nodeName(target, 'select'))
|| (zk(target).isInput() && this.control != zk.Widget.$(target)))
return;
Consider simplifying this complex logical expression. Open
if (!wnd) {
const wnd = new zul.wnd.Window({
id: 'aualert',
closable: true,
sclass: 'z-messagebox-window',
Method isIntersected
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static final boolean isIntersected(Set<?> a, Set<?> b) {
final int sza = a != null ? a.size(): 0;
final int szb = b != null ? b.size(): 0;
if (sza == 0 || szb == 0)
return false;
- 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 getFormat
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static final String getFormat(String ctype) {
if (ctype == null)
throw new IllegalArgumentException();
ctype = ctype.trim().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 load
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public void load(String prefix, String uri, Locator locator)
throws XelException {
if (prefix == null || uri == null)
throw new IllegalArgumentException("null");
if (_mtds != null && _mtds.containsKey(prefix))
- 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 load
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
synchronized static final void load() {
if (_loaded)
return;
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 getTimeZone
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static final TimeZone getTimeZone(int ofsmins) {
final StringBuffer sb = new StringBuffer(8).append("GMT");
if (ofsmins >= 0) {
sb.append('+');
} 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
Method findAmbiguousComps
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private static List<Element> findAmbiguousComps(Map<String, XMLResource> rcmap, Element el) {
List<Element> ambigComps = new ArrayList<Element>();
for (Map.Entry<String, XMLResource> entry: rcmap.entrySet()) { // find Ambiguous Components
Element root = entry.getValue().document.getRootElement();
if (root == 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 getDateTimeFormat
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static final
String getDateTimeFormat(int dateStyle, int timeStyle, Locale locale,
String defaultFormat) {
if (locale == null)
locale = Locales.getCurrent();
- 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 format
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static void format(Element e) {
//add proper spacing between consecutive elements
boolean elemFound = true;
for (final ListIterator<Item> it = e.getChildren().listIterator(); it.hasNext();) {
final Object o = it.next();
- 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 format
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static String format(String message, String pubId, String sysId,
int lineno, int colno) {
final StringBuffer sb = new StringBuffer();
final String inf = combine(pubId, sysId);
if (inf != 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 getTimeFormat
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static final
String getTimeFormat(int style, Locale locale, String defaultFormat) {
if (locale == null)
locale = Locales.getCurrent();
- 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"