Showing 4,841 of 7,782 total issues
Avoid deeply nested control flow statements. Open
if (!cit.hasNext()) // draw the rest
sit.previous();
Avoid deeply nested control flow statements. Open
while (sit.hasNext()) {
childrenArray.add(fillShadowElement(sit.next()));
}
Method equals
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == 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 nextComponentUuid
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public String nextComponentUuid(Desktop desktop, Component comp,
ComponentInfo compInfo) {
String id = null;
if(compInfo != 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 equals
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == 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 init
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public void init(@QueryParam String name1, @QueryParam("name1") String name2,
@ExecutionParam String param1, @ExecutionParam("param1") String param2,
@ExecutionArgParam String arg1, @ExecutionArgParam("arg1") String arg2) {
Method equals
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == 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 getValidator2
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public Validator getValidator2(){
return new Validator(){
public void validate(ValidationContext ctx) {
if(!ctx.isValid()) return;
Property p = ctx.getProperty();
- 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 equals
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == 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 (ptns[j].trim().length() > 1 && (vals[k].trim().length()-1 > 1)) {
if (vals[k].trim().toLowerCase(java.util.Locale.ENGLISH).indexOf(ptns[j].trim().toLowerCase(java.util.Locale.ENGLISH).substring(1)) > -1) {
m = false;
break;
}
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
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 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 getVariableResolver
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public VariableResolver getVariableResolver(Object ref) {
final Execution exec = Executions.getCurrent();
VariableResolver resolver = exec.getVariableResolver();
if (resolver == null) {
final RequestContext rc = RequestContexts.getCurrent();
- 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 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 isValid
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static final boolean isValid(String name) {
if (isReserved(name))
return false;
for (int j = name.length(); --j >= 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 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
Avoid deeply nested control flow statements. Open
if (desktopCtrl != null)
desktopCtrl.mapComponent(uuid, this);
Method setContentType
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static final void setContentType(Execution exec, Page page) {
String contentType = ((PageCtrl) page).getContentType();
if (contentType == null) {
contentType = page.getDesktop().getDevice().getContentType();
if (contentType == 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"