Showing 7,775 of 7,775 total issues
Method compose
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected void compose() {
final Execution exec = Executions.getCurrent();
if (exec == null)
throw new IllegalStateException("No execution available");
- 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 outInitCrashScript
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static final String outInitCrashScript(Execution exec, WebApp wapp) {
if (exec.isAsyncUpdate(null))
return ""; //nothing to generate
if (wapp == 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 evaluateComposite
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static Object evaluateComposite(Evaluator eval, Page page, Object expr) {
if (expr == null) {
return null;
} else if (expr instanceof ExValue) {
return ((ExValue) expr).getValue(eval, page);
- 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 evaluateComposite
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static Object evaluateComposite(Evaluator eval, Component comp, Object expr) {
if (expr == null) {
return null;
} else if (expr instanceof ExValue) {
return ((ExValue) expr).getValue(eval, 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
Avoid deeply nested control flow statements. Open
for (Object[] evtinf : kidevts)
evtmap.add(evtinf);
Method setParent
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public void setParent(Component parent) {
if (isInline()) {
if (_inlines == null)
compose(); //autocreate
- 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 setPage
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public void setPage(Page page) {
if (isInline()) {
if (_inlines == null)
compose(); //autocreate
- 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 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) {
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) {
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 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
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) {
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 (srccomp == null || !(srccomp instanceof Component)) {
if (log.isDebugEnabled())
log.debug(
"Cannot find the associated component to forward event: {}",
mdname);
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 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 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
Avoid deeply nested control flow statements. Open
if (srccomp == null) {
Page page = xcomp.getPage();
if (page != null)
srccomp = page.getXelVariable(null, null, srccompid, true);
}
Avoid deeply nested control flow statements. Open
if (arg2 != arg && arg2 != null)
injectField(arg2, arg2.getClass(), fd);