Showing 4,841 of 7,782 total issues
Avoid deeply nested control flow statements. Open
for (Object[] evtinf : kidevts)
evtmap.add(evtinf);
Avoid deeply nested control flow statements. Open
if (containsVariable(x, fdname)) {
final Object arg = getVariable(x, fdname);
if (!injectByMethod(md, parmcls[0], arg == null ? null : arg.getClass(), arg, fdname)) {
final Object arg2 = getFellow(x, fdname);
if (arg2 != arg && arg2 != null)
Method getInstance
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static ForEach getInstance(EvaluatorRef evalr, Page page, ExValue[] expr, ExValue begin, ExValue end,
ExValue step) {
Method show
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static void show(String msg, String type, Component ref, String position, int duration, boolean closable) {
Avoid deeply nested control flow statements. Open
if ("div".equals(tn) || "span".equals(tn)) {
l_loop: for (int j = 0, len = sb.length(); j < len; ++j)
switch (sb.charAt(j)) {
case '>':
disableUnavailable = true; //make output cleaner
Method containsVariable
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private boolean containsVariable(Object x, String fdname) {
//#feature 2770471 GenericAutowireComposer shall support wiring ZScript varible
if (x instanceof Page) {
final Page page = (Page) x;
return (!_ignoreZScript && page.getZScriptVariable(fdname) != 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 getInstance
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static ForEach getInstance(EvaluatorRef evalr, Component comp, ExValue[] expr, ExValue begin, ExValue end,
ExValue step) {
Avoid deeply nested control flow statements. Open
if (arg2 != arg && arg2 != null)
injectField(arg2, arg2.getClass(), fd);
Method showNotification
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static final void showNotification(String msg, String type, Component ref, int x, int y, int duration) {
Method showNotification
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static final void showNotification(String msg, String type, Component ref, String position, int duration,
boolean closable) {
Avoid deeply nested control flow statements. Open
if (srccomp == null) {
Page page = xcomp.getPage();
if (page != null)
srccomp = page.getXelVariable(null, null, srccompid, true);
}
Method createItem
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public FileItem createItem(String fieldName, String contentType, boolean isFormField, String fileName,
int sizeThreshold, File repository);
Avoid deeply nested control flow statements. Open
if (v.length() != 0 && ((cc = v.charAt(v.length() - 1)) == ';' || cc == ','
|| (v.indexOf("function") < 0 && v.indexOf(';') >= 0)))
throw new UiException("Illegal client override: " + v
+ (name.startsWith("on")
? "\nTo listen an event, remember to captalize the third letter, such as onClick"
Avoid deeply nested control flow statements. Open
if (html >= 0)
junav = sb.lastIndexOf("</html");
Method enableEventThread
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public void enableEventThread(boolean enable) {
if (!enable && _wapp != null) {
final UiEngine engine = ((WebAppCtrl) _wapp).getUiEngine();
if (engine != null) {
if (engine.hasSuspendedThread())
- 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 show
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static void show(String msg, String type, Component ref, int x, int y, int duration) {
Method removeListener
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public void removeListener(final Class<?> klass) {
if (_monitor != null && _monitor.getClass().equals(klass))
_monitor = null;
if (_pfmeter != null && _pfmeter.getClass().equals(klass))
_pfmeter = 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 loadUtilityHandler
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static final void loadUtilityHandler() {
if (_handler != null)
return;
synchronized (SelectorComposer.class) {
if (_handler != 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
Avoid deeply nested control flow statements. Open
if (srccomp == null || !(srccomp instanceof Component)) {
if (log.isDebugEnabled())
log.debug(
"Cannot find the associated component to forward event: {}",
mdname);
Avoid deeply nested control flow statements. Open
if (t != null)
return t;