Showing 4,841 of 7,782 total issues
Method fixGroupsInfoAfterRemove
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
private void fixGroupsInfoAfterRemove(Row child, int index) {
if (!_isReplacingRow) { //@see Grid.Renderer#render
//called by #removeChild, handling GroupInfo if !isReplcingRow
if (child instanceof Group) {
int[] prev = null, remove = 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 doListDataChange
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
public void doListDataChange(ListDataEvent event) {
if (INVALIDATE_THRESHOLD == -1) {
INVALIDATE_THRESHOLD = Utils.getIntAttribute(this.getOwner(), "org.zkoss.zul.invalidateThreshold", 10,
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 encodeURL0
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
private static final String encodeURL0(ServletContext ctx, ServletRequest request, ServletResponse response,
String uri) throws Exception {
if (uri == null || uri.length() == 0)
return uri; //keep as it is
- 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
AbstractItem
has 49 methods (exceeds 20 allowed). Consider refactoring. Open
public abstract class AbstractItem
implements Item, Node, Serializable, Cloneable {
private static final long serialVersionUID = 20060622L;
/** The parent. */
Panel
has 49 methods (exceeds 20 allowed). Consider refactoring. Open
public class Panel extends XulElement implements Framable {
private Toolbar _tbar, _bbar, _fbar;
private Panelchildren _panelchildren;
private Caption _caption;
ListModelList
has 49 methods (exceeds 20 allowed). Consider refactoring. Open
public class ListModelList<E> extends AbstractListModel<E> implements Sortable<E>, List<E>, java.io.Serializable {
private static final long serialVersionUID = 20120206122641L;
protected List<E> _list;
DateImpl
has 49 functions (exceeds 20 allowed). Consider refactoring. Open
export class DateImpl {
/** @internal */
_moment: Moment;
/** @internal */
_timezone: string;
Method modifyAttrValueIfSimplified
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
private static String modifyAttrValueIfSimplified(String attrName, String attrValue) {
boolean isCommand = attrValue.matches("@(global-)?command\\(.*\\)");
if (attrValue.matches("@\\(.*\\)") || isCommand) {
if (Events.isValid(attrName) || isCommand) {
int attrValueIndex = attrValue.indexOf("(") + 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
Method addEventListener
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
public boolean addEventListener(int priority, String evtnm, EventListener<? extends Event> listener) {
if (evtnm == null || listener == null)
throw new IllegalArgumentException("null");
if (!Events.isValid(evtnm))
throw new IllegalArgumentException("Invalid event name: " + evtnm);
- 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 afterUnmarshal
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
private void afterUnmarshal(int cnt, int cntSel) {
if (cnt != 0) {
for (Component child : getChildren()) {
if (child instanceof Treecols) {
_treecols = (Treecols) child;
- 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 fixGroupsInfoAfterRemove
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
private void fixGroupsInfoAfterRemove(Component child, int index) {
if (!_isReplacingItem) { //@see Renderer#render
//called by #removeChild(), handling GroupInfo if !isReplcingItem
if (child instanceof Listgroup) {
int[] prev = null, remove = 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
File ModelProvider.java
has 446 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* ModelProvider.java
Purpose:
Description:
File ModelProvider.java
has 446 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* ModelProvider.java
Purpose:
Description:
File Parser.java
has 445 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Parser.java
Purpose:
Description:
ELParserTokenManager
has 48 methods (exceeds 20 allowed). Consider refactoring. Open
@SuppressWarnings("all") // Ignore warnings in generated code
public class ELParserTokenManager implements ELParserConstants
{
java.util.Deque<Integer> deque = new java.util.ArrayDeque<Integer>();
ComponentInfo
has 48 methods (exceeds 20 allowed). Consider refactoring. Open
public class ComponentInfo extends ForEachBranchInfo {
private transient ComponentDefinition _compdef;
/** The implementation class/component (use). */
private ExValue _impl;
/** A list of {@link Property}, or null if no property at all. */
TrackerImpl
has 48 methods (exceeds 20 allowed). Consider refactoring. Open
public class TrackerImpl implements Tracker, Serializable {
private static final long serialVersionUID = 1463169907348730644L;
protected Map<Component, Map<Object, TrackerNode>> _compMap; //comp -> path -> head TrackerNode
protected Map<Object, Set<TrackerNode>> _nullMap = new LinkedHashMap<Object, Set<TrackerNode>>(); //property -> Set of head TrackerNode that eval to null
protected transient Map<Object, Set<TrackerNode>> _beanMap = new WeakIdentityMap<Object, Set<TrackerNode>>(); //bean -> Set of TrackerNode
File Yylex.java
has 444 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* The following code was generated by JFlex 1.4.2 */
package org.zkoss.json.parser;
class Yylex {
Method renderValue
has 166 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void renderValue(Object value) {
if (value == null || value instanceof String) {
renderValue((String) value);
return;
}
Method getPropertyDescriptors
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
public PropertyDescriptor[] getPropertyDescriptors(BeanInfo beanInfo, Class<?> clazz) throws IntrospectionException {
PropertyDescriptor[] introspectorPDsArray = beanInfo.getPropertyDescriptors();
List<PropertyDescriptor> introspectorPDs = introspectorPDsArray != null ? Arrays.asList(introspectorPDsArray)
: Collections.<PropertyDescriptor>emptyList();
- 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"