Showing 4,841 of 7,782 total issues
File PropertyBindingHandler.java
has 290 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* PropertyBindingHelper.java
Purpose:
Description:
Method renderProperties
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws java.io.IOException {
super.renderProperties(renderer);
// ZK-4970: reset invalidateListitems here.
Executions.getCurrent().removeAttribute("zkoss.Listbox.invalidateListitems" + getUuid());
Function typescript_build
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
function typescript_build(src, dest, force, since, isSrcOnly/*fix gulp v5 issue*/) {
const webpackConfig = require('./webpack.config.js');
/** @type {import('vinyl-fs').SrcOptions} */
const defaultSrcOptions = {
root: src,
File AstValue.java
has 289 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
Method Math
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
final public void Math() throws ParseException {
Multiplication();
label_12:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
Method render
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void render(final Listitem item, final Object data, final int index) throws Exception {
final Listbox listbox = (Listbox) item.getParent();
final int size = listbox.getModel().getSize();
//B70-ZK-2555: in order to handle dynamic template name
final String subtype = item instanceof Listgroup ? "group" : item instanceof Listgroupfoot ? "groupfoot" : null;
Method group
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
public boolean group(boolean ascending) {
final String dir = getSortDirection();
if (ascending) {
if ("ascending".equals(dir))
return false;
Function init
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function(a, b, c) {
a = unescape(encodeURIComponent(a));
b = b || -1;
c = c || 2;
this.barcode_array = {};
Function configFromStringAndFormat
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
function configFromStringAndFormat(config) {
// TODO: Move this to another part of the creation flow to prevent circular deps
if (config._f === hooks.ISO_8601) {
configFromISO(config);
return;
Method next
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
private static final Token
next(String src, String delimiters, int j, boolean whitespaceAware,
boolean parenthesis) {
final StringBuffer tksb = new StringBuffer(64);
final int len = src.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 subtract
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public static final long
subtract(Date date2, TimeZone tz, int field, Date date1) {
if (tz == null)
tz = TimeZones.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 checkCharacterData
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public static final void checkCharacterData(String text, Locator loc) {
if (text == null)
throw new DOMException(DOMException.INVALID_CHARACTER_ERR,
"A null is not a legal XML value", loc);
- 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 match
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
protected static boolean match
(Namespaceable vtx, String namespace, String name, Pattern ptn, int mode) {
if (name != null) {
String val = (mode & FIND_BY_TAGNAME) != 0 ?
vtx.getTagName(): vtx.getLocalName();
- 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 formatStackTrace
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public static final StringBuffer
formatStackTrace(StringBuffer sb, Throwable t, String prefix, int maxcnt) {
final StringWriter sw = new StringWriter();
t.printStackTrace(new PrintWriter(sw));
final StringBuffer trace = sw.getBuffer();
- 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 findShadowChildTemplate
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
private static Template findShadowChildTemplate(HtmlShadowElement shadow, Component compBase, String name) {
List<ShadowElement> children = cast(shadow.getChildren());
if (!children.isEmpty()) {
Template t;
for (ShadowElement child : children) {
- 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 parseTemplate
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
private static TemplateInfo parseTemplate(NodeInfo parent, Element el, AnnotationHelper annHelper)
throws Exception {
if (annHelper.clear())
log.warn(message("Annotations are ignored since <template> doesn't support them", el));
if (el.getAttributeItem("forEach") != 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 parseCustomAttributes
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
private static void parseCustomAttributes(LanguageDefinition langdef, NodeInfo parent, Element el,
AnnotationHelper annHelper) throws Exception {
//if (!el.getElements().isEmpty())
// throw new UiException(message("Child elements are not allowed for <custom-attributes>", el));
- 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 inRange
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public static Direction inRange(HtmlShadowElement se, Component target) {
Component hostIfAny = se.getShadowHostIfAny();
Map<Component, Integer> oldCacheMap = se.getIndexCacheMap(hostIfAny);
final boolean destroyCacheMap = oldCacheMap == null;
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 fixAttrValues
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
private Map<String, String[]> fixAttrValues(Map<?, ?> attrs) {
if (attrs == null)
return null;
for (Map.Entry<?, ?> m0 : attrs.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 checkPageRemoved
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
private void checkPageRemoved(Set<Component> removed) {
//1. scan once
final Desktop desktop = _exec.getDesktop();
Set<Page> pages = null;
for (Page page : desktop.getPages()) {
- 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"