Showing 4,841 of 7,782 total issues
Method checkInvalidateForMoved
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private void checkInvalidateForMoved(Component child, boolean bRemove) {
//No need to invalidate if
//1) act == last and child in act
//2) act != last and child after act
//Except removing last element which in act and act has only one element
- 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 service
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public void service(org.zkoss.zk.au.AuRequest request, boolean everError) {
final String cmd = request.getCommand();
if (cmd.equals(Events.ON_OPEN)) {
OpenEvent evt = OpenEvent.getOpenEvent(request);
_open = evt.isOpen();
- 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 service
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public void service(org.zkoss.zk.au.AuRequest request, boolean everError) {
final String cmd = request.getCommand();
if (cmd.equals(ZulEvents.ON_COL_SIZE)) {
disableClientUpdate(true); //ZK-4077
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 render
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
/* package */@SuppressWarnings({ "unchecked", "rawtypes" })
void render(Listitem item, int index) throws Throwable {
if (item.isLoaded()) {
return; // nothing to do
}
- 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 setMold
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public void setMold(String mold) {
final String old = getMold();
if (!Objects.equals(old, mold)) {
super.setMold(mold);
// we have to change model before detaching paging,
- 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 15 (exceeds 5 allowed). Consider refactoring. Open
private void init() {
_items = new AbstractSequentialList<Listitem>() {
public ListIterator<Listitem> listIterator(int index) {
return new ItemIter(index);
}
- 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 setDisplayedTimeZones
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public void setDisplayedTimeZones(List<TimeZone> dtzones) {
if (dtzones != null && dtzones.isEmpty())
dtzones = null;
if (_dtzones != dtzones) {
_dtzones = dtzones;
- 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 getAvailableAtClient
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public Set<? extends Component> getAvailableAtClient() {
if (!isCropper())
return null;
final Tree tree = getTree();
- 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 _pfsend
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export function _pfsend(dt: zk.Desktop, fetchOpts: RequestInit, completeOnly: boolean, forceAjax: boolean): void {
var ws = !forceAjax && typeof zWs != 'undefined' && zWs.ready,
fetchHeaders = fetchOpts.headers;
if (!completeOnly) {
var dtt = dt.id + '-' + pfIndex++ + '=' + Math.round(jq.now());
- 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 vbox$mold$
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function vbox$mold$(out) {
let w;
delete this._splitterKid;
for (w = this.firstChild; w; w = w.nextSibling)
if ((w instanceof zul.box.Splitter)) {
- 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 _posOffset
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function _posOffset(el: HTMLElement): zk.Offset {
if (zk.webkit && el instanceof HTMLTableRowElement && el.cells.length)
el = el.cells[0];
var t = 0, l = 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 format
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
format(msg: string, ...rest: (string|number)[]): string {
var i = 0, sb = '';
for (var j = 0, len = msg.length, cc, k: number; j < len; ++j) {
cc = msg.charAt(j);
if (cc == '\\') {
- 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 setLoaded
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export function setLoaded(pkg: string, wait?: boolean): void { //internal
_xloadings.$remove(pkg);
_loading[pkg] = true;
if (wait) {
- 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 getRichlet
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
public Richlet getRichlet(String name) {
WaitLock lock = null;
final Object[] info;
for (;;) {
Method doAfterCompose
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void doAfterCompose(final T comp) throws Exception {
//ZK-3831
if (comp.getPage() == null) {
final Map<?, ?> currentArg = Executions.getCurrent().getArg();
((ComponentCtrl) comp).addCallback(ComponentCtrl.AFTER_PAGE_ATTACHED, new Callback() {
Method addFormLoadBindings0
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void addFormLoadBindings0(Component comp, String formId, String loadExpr, String[] beforeCmds,
String[] afterCmds, Map<String, Object> bindingArgs) {
final boolean prompt = isPrompt(beforeCmds, afterCmds);
final String attr = formId;
final BindingExecutionInfoCollector collector = getBindingExecutionInfoCollector();
Method doPropertyChange0
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void doPropertyChange0(Object base, String prop, Set<LoadBinding> bindings) {
Execution exec = Executions.getCurrent();
Set<Component> skipCheckChildren = (Set<Component>) exec.getAttribute(HtmlShadowElement.SKIP_DISTRIBUTED_CHILDREN_PROPERTY_CHANGE);
for (LoadBinding binding : bindings) {
//BUG 828, the sub-sequence binding might be removed after the previous loading.
Function _preg_split
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
_preg_split: function(a, b, c, d) {
c = c || 0;
d = d || "";
var e, g = [],
f = 0,
Function getFlexInfo
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
getFlexInfo(wgt: zk.Widget): { isFlexRow: boolean; flexContainerChildren: HTMLElement[]; childrenWidgets: zk.Widget[] } {
let pwgt = wgt.parent,
cwgt = pwgt!.firstChild,
fContainer = pwgt!.getFlexContainer_()!,
fcc = fContainer.firstElementChild as HTMLElement,
Function running
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
running = function (orient: 'top' | 'left'): void {
var norient = zk.parseFloat(dg.node!.style[orient]),
diff = norient - zk.parseFloat(dg._epos!.style[orient]);
if (lastP == norient) {
lastS.push(dg._lastSteps);