Showing 4,841 of 7,782 total issues
Method getComponent0
has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring. Open
private static final Component getComponent0(IdSpace is, String path) {
Component found = null;
for (int j = 0, k;; j = k + 1) {
k = path.indexOf('/', j);
- 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 getNormalPath
has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring. Open
public static String getNormalPath(String path) {
final StringBuffer sb = new StringBuffer(path);
final IntStack slashes = new IntStack(32); //most 32 slash in a path
slashes.push(-1);
int j = 0, colon = -100, dot1 = -100, dot2 = -100;
- 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 BeanELResolver.java
has 482 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 service
has 188 lines of code (exceeds 25 allowed). Consider refactoring. Open
@SuppressWarnings({ "rawtypes", "unchecked" })
public void service(org.zkoss.zk.au.AuRequest request, boolean everError) {
final String cmd = request.getCommand();
boolean isSelModel = _model instanceof Selectable;
if (cmd.equals(Events.ON_SELECT)) {
PortletServletContext
has 53 methods (exceeds 20 allowed). Consider refactoring. Open
public class PortletServletContext implements ServletContext {
private final PortletContext _ctx;
/** Returns an instance of ServletContext that representing
* the specified portlet context.
File ListboxDataLoader.java
has 477 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* ListboxDataLoader.java
{{IS_NOTE
Purpose:
Description:
File Tabbox.java
has 476 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Tabbox.java
Purpose:
Description:
Method getNativeContent
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
private static final void getNativeContent(CreateInfo ci, StringBuffer sb, Component comp, List<NodeInfo> children,
Native.Helper helper) {
for (NodeInfo meta : children) {
if (meta instanceof NativeInfo) {
final NativeInfo childInfo = (NativeInfo) meta;
- 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
AbstractTag
has 52 methods (exceeds 20 allowed). Consider refactoring. Open
public class AbstractTag extends AbstractComponent implements DynamicPropertied, RawId {
static {
addClientEvent(AbstractTag.class, Events.ON_CLICK, 0);
}
ListModelArrayProxy
has 52 methods (exceeds 20 allowed). Consider refactoring. Open
public class ListModelArrayProxy<E> extends ListModelArray<E> implements Proxy, FormProxyObject, Serializable {
private static final Logger log = LoggerFactory.getLogger(ListModelArrayProxy.class);
private static final long serialVersionUID = 20210608113022L;
private ListModelArray<E> _cache;
private ListModelArray<E> _origin;
Method toJSONString
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
public static String toJSONString(Object value){
if(value == null)
return "null";
if(value instanceof String)
- 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 getMethod0
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
private static Method getMethod0(Class<?> clazz, String methodName, Class<?>[] paramTypes, Object[] params) {
Method matchingMethod = null;
if (paramTypes != null) {
try {
matchingMethod = Util.getMethod(clazz, clazz.getMethod(methodName, paramTypes));
- 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 outPageContent
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
public static final void outPageContent(Execution exec, Page page, Writer out, boolean au) throws IOException {
final Desktop desktop = page.getDesktop();
final PageCtrl pageCtrl = (PageCtrl) page;
final Component owner = pageCtrl.getOwner();
boolean contained = owner == null && exec.isIncluded();
- 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 47 (exceeds 5 allowed). Consider refactoring. Open
/*package*/ void service(Event event, Scope scope, final List<EventListenerInfo> listeners,
final EventHandler evthd, final Method mtd, boolean skipPageListener) throws Exception {
final Execution exec = Executions.getCurrent();
final Desktop desktop = exec.getDesktop();
final Page page = _page != null ? _page : desktop.getFirstPage();
- 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 entrySet
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
public Set<Map.Entry<K, V>> entrySet() {
if (this.entrySet == null) {
this.entrySet = new AbstractSet<Map.Entry<K, V>>() {
public Iterator<Map.Entry<K, V>> iterator() {
return createHashIterator(ENTRIES);
- 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 parseAction
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
private static int parseAction(Context ctx, Node parent, String prefix, int from, int to)
throws DspException, IOException, XelException {
//1: which action
int j = skipWhitespaces(ctx, from + 1, to);
int 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
Method Compare
has 181 lines of code (exceeds 25 allowed). Consider refactoring. Open
final public void Compare() throws ParseException {
Concatenation();
label_10:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
Method execNewPage0
has 181 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void execNewPage0(final Execution exec, final PageDefinition pagedef, final Richlet richlet,
final Page page, final Writer out) throws IOException {
//Update the device type first. If this is the second page and not
//belonging to the same device type, an exception is thrown
final Desktop desktop = exec.getDesktop();
File Maps.java
has 468 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Maps.java
Purpose: Utilities for Map
Description:
SAXHandler
has 51 methods (exceeds 20 allowed). Consider refactoring. Open
public class SAXHandler extends DefaultHandler
implements LexicalHandler, DeclHandler {
private static final Logger log = LoggerFactory.getLogger(SAXHandler.class);
/** The iDOM factory. */