Showing 4,841 of 7,782 total issues
Method buildParameters
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
static Object[] buildParameters(Class<?>[] parameterTypes,
boolean isVarArgs,Object[] params) {
ExpressionFactory factory = getExpressionFactory();
Object[] parameters = null;
if (parameterTypes.length > 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
Method coerceToNumber
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static final Number coerceToNumber(final Object obj,
final Class<?> type) throws ELException {
if (!COERCE_TO_ZERO) {
if (obj == null && !type.isPrimitive()) {
- 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 coerceToUi
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public Object coerceToUi(Object val, Listbox comp, BindContext ctx) {
Object bean = super.coerceToUi(val, comp, ctx);
if (bean instanceof ListModelList && comp instanceof Listbox) {
Listbox listbox = (Listbox) comp;
- 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 onEvent
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public void onEvent(Event evt) throws Exception {
final Object controller = getController();
final Method mtd = ComponentsCtrl.getEventMethod(controller.getClass(), evt.getName());
if (mtd != null) {
if (mtd.getParameterTypes().length == 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
Method getRichlet
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
public Richlet getRichlet(String name) {
WaitLock lock = null;
final Object[] info;
for (;;) {
- 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 setAttribute
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
public Object setAttribute(String name, Object value) {
final Object old = getAttribute(name);
if (!(this instanceof Serializable || this instanceof Externalizable)) {
final boolean bStore = value instanceof Serializable || value instanceof Externalizable;
- 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 handleError
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private void handleError(Session sess, HttpServletRequest request, HttpServletResponse response, String path,
Throwable err) throws ServletException, IOException {
Utils.resetOwner();
// ZK-3679
- 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 renderProperties
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws java.io.IOException {
super.renderProperties(renderer);
if (_auxinf != null) {
render(renderer, "width", _auxinf.width);
- 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 parseInitDirective
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private void parseInitDirective(PageDefinition pgdef, ProcessingInstruction pi, Map<String, String> params)
throws Exception {
final String clsnm = params.remove("class");
final String zsrc = params.remove("zscript");
- 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 adjustCursor
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public void adjustCursor(Integer result) {
final int queryResult = result.intValue();
if (queryResult < 0) { // not found, find next
if (_mid <= _low) {
_low = _midChild + 1; // not found and do it from right again.
- 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 toAbsoluteURI
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private String toAbsoluteURI(String uri) {
if (uri != null && uri.length() > 0) {
final char cc = uri.charAt(0);
if (cc != '/' && cc != '~' && !Servlets.isUniversalURL(uri)) {
final String dir = getLocator().getDirectory();
- 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 updateByClient
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
protected void updateByClient(String name, Object value) {
Object o = getAttribute("org.zkoss.zk.ui.updateByClient");
if (!(o instanceof Boolean && ((Boolean) o).booleanValue()) && !(o instanceof String && "true".equals(o))) {
log.warn("Ignore update of " + name + "=" + value + " from client for " + this.getClass());
return; //ignored
- 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 removeEventInterceptor
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public boolean removeEventInterceptor(Class klass) {
if (klass != null && _eis != null) {
final List<EventInterceptor> eilst = new LinkedList<EventInterceptor>();
final EventInterceptor[] eis = _eis;
boolean found = false;
- 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 removeEventInterceptor
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public boolean removeEventInterceptor(EventInterceptor ei) {
if (ei != null && _eis != null) {
final List<EventInterceptor> eilst = new LinkedList<EventInterceptor>();
final EventInterceptor[] eis = _eis;
boolean found = false;
- 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 deactivate
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public boolean deactivate(boolean stop) {
boolean stopped = false;
if (_active != null && Thread.currentThread().equals(_active.thread)) {
if (--_active.nActive <= 0) {
if (stop)
- 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 getStubInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private static final boolean[] getStubInfo(Component comp, Map<Component, boolean[]> stubinfs) {
boolean[] stubinf = stubinfs.get(comp);
if (stubinf == null) {
Boolean stubnative = null, stubonly = null;
for (Component c = comp; c != 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 add
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
public boolean add(Object o) {
if (_set.add(o)) {
if (_listeners != null) {
if (_entry) {
- 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 getDeviceByClient
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static final Device getDeviceByClient(String userAgent) throws DeviceNotFoundException {
String[] devTypes;
synchronized (_devmap) {
Collection<String> c = _devmap.keySet();
devTypes = c.toArray(new String[c.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 invoke
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public Object invoke(Object self, Method method, Method proceed, Object[] args) throws Exception {
try {
final String mname = method.getName();
Class<?> declaringClass = method.getDeclaringClass();
- 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 getEncodedData
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
@Override
public List<Object> getEncodedData() {
if (_data == null)
return 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"