Showing 4,841 of 7,782 total issues
Function bc_divide
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
bc_divide: function(a, b, c) {
var d, e, g, f, h, k, l, m, n, q, s, p, r, t;
if (libbcmath.bc_is_zero(b)) return -1;
if (libbcmath.bc_is_zero(a)) return libbcmath.bc_new_num(1, c);
0 === b.n_scale && 1 === b.n_len && 1 === b.n_value[0] && (d = libbcmath.bc_new_num(
- 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
File Column.java
has 509 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Column.java
Purpose:
Description:
File ComponentIterator.java
has 507 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
*
*/
package org.zkoss.zk.ui.select.impl;
Tabbox
has 57 methods (exceeds 20 allowed). Consider refactoring. Open
public class Tabbox extends XulElement {
private transient Tabs _tabs;
private transient Toolbar _toolbar;
private transient Tabpanels _tabpanels;
private transient Tab _seltab;
File BindComposer.java
has 506 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* BindComposer.java
Purpose:
Description:
Treeitem
has 56 methods (exceeds 20 allowed). Consider refactoring. Open
public class Treeitem extends XulElement implements org.zkoss.zk.ui.ext.Disable {
private transient Treerow _treerow;
private transient Treechildren _treechildren;
private Object _value;
private boolean _open = true;
Method init
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
public void init(Component comp, Object viewModel, Map<String, Object> initArgs) {
if (_init)
throw new UiException("binder is already initialized");
_init = true;
- 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 51 (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_DATA_LOADING)) {
Events.postEvent(DataLoadingEvent.getDataLoadingEvent(request, preloadSize()));
} else if (inPagingMold() && cmd.equals(ZulEvents.ON_PAGE_SIZE)) {
- 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 onTreeDataChange
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
private void onTreeDataChange(TreeDataEvent event) {
final int type = event.getType();
final int[] path = event.getPath();
final Component target = path != null ? getChildByPath(path) : null;
switch (type) {
- 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
File DHtmlUpdateServlet.java
has 496 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* DHtmlUpdateServlet.java
Purpose:
Description:
File JavaScriptEscapeUtil.java
has 494 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* =============================================================================
*
* Copyright (c) 2014, The UNBESCAPE team (http://www.unbescape.org)
*
PhantomExecution
has 55 methods (exceeds 20 allowed). Consider refactoring. Open
/*package*/ class PhantomExecution extends AbstractExecution {
private final SimpleScope _scope = new SimpleScope(this);
private boolean _voided;
public PhantomExecution(Desktop desktop) {
File Https.java
has 493 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Https.java
Purpose:
Description:
History:
Method adjustInsertionForRemove
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
private boolean adjustInsertionForRemove(HtmlShadowElement se, Component removed) {
Component old = null;
Direction direction = inRange(se, removed);
switch (direction) {
case PREVIOUS:
- 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 addPropertySaveBindings0
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
private void addPropertySaveBindings0(Component comp, String attr, String saveExpr, String[] beforeCmds,
String[] afterCmds, Map<String, Object> bindingArgs, String converterExpr,
Map<String, Object> converterArgs, String validatorExpr, Map<String, Object> validatorArgs) {
final boolean prompt = isPrompt(beforeCmds, afterCmds);
final BindingExecutionInfoCollector collector = getBindingExecutionInfoCollector();
- 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 web0
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
private void web0(HttpServletRequest request, HttpServletResponse response, String pi, String ext)
throws ServletException, IOException {
if (ext != null) {
//Invoke the resource processor (Extendlet)
final Extendlet extlet = getExtendlet(ext);
- 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_do_compare
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
_bc_do_compare: function(a, b, c, d) {
var e, g, f;
if (c && a.n_sign != b.n_sign) return a.n_sign == libbcmath.PLUS ? 1 : -1;
if (a.n_len != b.n_len) return a.n_len > b.n_len ? c && a.n_sign !=
libbcmath.PLUS ? -1 : 1 : c && a.n_sign != libbcmath.PLUS ? 1 : -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
File AbstractExecution.java
has 487 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* AbstractExecution.java
Purpose:
Description:
ComponentsCtrl
has 54 methods (exceeds 20 allowed). Consider refactoring. Open
public class ComponentsCtrl {
private static final ThreadLocal<Object> _compdef = new ThreadLocal<>();
private static final ThreadLocal<Component> _rootParent = new ThreadLocal<>();
/** Returns the automatically generate component's UUID/ID.
Method setVisible
has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring. Open
public boolean setVisible(boolean visible) {
final boolean old = super.setVisible(visible);
if (old != visible) {
final String style = getStyle();
if (visible) {
- 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"