Showing 4,841 of 7,782 total issues
Method onChange
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public void onChange(GroupsDataEvent event) {
int type = event.getType(), j0 = event.getIndex0(), j1 = event.getIndex1();
switch (type) {
case GroupsDataEvent.CONTENTS_CHANGED:
- 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 parseAttrs
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
private static int parseAttrs(Context ctx, Map<String, String> attrs, String actnm, int from, int to)
throws DspException {
for (int j, k = from;;) {
j = skipWhitespaces(ctx, k, to);
k = nextSeparator(ctx, j, to);
- 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 dataNotReady
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
function dataNotReady(cmd: string, data: ({ $u?: string } & zk.Widget | undefined)[]): boolean {
for (var j = data.length, id: string | undefined, w: zk.Widget | undefined; j--;)
if (id = data[j] && data[j]!.$u) {
if (!(w = zk.Widget.$(id))) { //not ready
var processFn = function (): void {
- 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 position
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
position(dim?: Dimension | Element, where?: string, opts?: PositionOptions): this {
where = where || 'overlap';
if (!dim) {
var bd = jq('body')[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 bindTapHold_
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
bindTapHold_() {
if (this.isListen('onRightClick') || (window.zul && this instanceof zul.Widget && this.getContext())) { //also register context menu to tapHold event
this._holdTime = 800;
this._startHold = (evt: JQuery.TouchEventBase): void => {
if (!this._rightClickPending) {
- 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 write
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
/*package*/ static void write(NameSpace ns, ObjectOutputStream s, Filter filter) throws IOException {
//1. variables
final String[] vars = ns.getVariableNames();
for (int j = vars != null ? vars.length : 0; --j >= 0;) {
final String nm = vars[j];
Function data
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
d3_selectionPrototype.data = function(data, join) {
var enter = [],
update = [],
exit = [];
Method resolveVariable
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
public Object resolveVariable(String name) throws XelException {
if ("pageContext".equals(name)) {
return getPageContext();
} else if ("pageScope".equals(name)) {
Dates
has 30 methods (exceeds 20 allowed). Consider refactoring. Open
public class Dates {
/**
* Truncates date to the nearest precision milliseconds. MS SQLServer2000
* with only the maximum accuracy of 1/300 seconds would not be able to
* store up to one millisecond accuracy. That is, User must round the
Attribute
has 30 methods (exceeds 20 allowed). Consider refactoring. Open
public class Attribute extends AbstractItem implements Namespaceable, Attr {
/** The namespace. */
protected Namespace _ns;
/** The owner item. */
protected Item _owner;
F02545ChildrenBindingSupportListModelVM
has 30 methods (exceeds 20 allowed). Consider refactoring. Open
public class F02545ChildrenBindingSupportListModelVM implements Serializable{
private static final long serialVersionUID = 1L;
private List<Node> nodes_l;
private String[] nodes_a1D = new String[] {
JsContentRenderer
has 30 methods (exceeds 20 allowed). Consider refactoring. Open
public class JsContentRenderer implements ContentRenderer {
private final StringBuilder _buf = new StringBuilder(128);
public JsContentRenderer() {
}
AbstractCollectionProxy
has 30 methods (exceeds 20 allowed). Consider refactoring. Open
public abstract class AbstractCollectionProxy<E>
implements Collection<E>, Proxy, FormProxyObject, Serializable {
private Collection<E> _cache;
private static final long serialVersionUID = 20141225142801L;
private Object _origin;
ListModelSet
has 30 methods (exceeds 20 allowed). Consider refactoring. Open
public class ListModelSet<E> extends AbstractListModel<E> implements Sortable<E>, Set<E>, java.io.Serializable {
private static final long serialVersionUID = 20120206122849L;
protected Set<E> _set;
ThemeFns
has 30 methods (exceeds 20 allowed). Consider refactoring. Open
public class ThemeFns {
private ThemeFns() {
}
Https
has 30 methods (exceeds 20 allowed). Consider refactoring. Open
public class Https extends Servlets {
private static final Logger log = LoggerFactory.getLogger(Https.class);
/** Compresses the content into an byte array, or null
* if the browser doesn't support the compression (accept-encoding).
Consider simplifying this complex logical expression. Open
if (
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
_isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||
Method addPropertySaveBindings0
has 91 lines of code (exceeds 25 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();
File ListModelList.java
has 318 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* ListModelList.java
{{IS_NOTE
Purpose:
Method service
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void service(HttpServletRequest request, HttpServletResponse response, String path)
throws ServletException, java.io.IOException {
String resourceCache = Library.getProperty("org.zkoss.zk.WCS.cache");
if (resourceCache != null && "false".equalsIgnoreCase(resourceCache))