Showing 4,841 of 7,782 total issues
Method getContent
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public final Object getContent(String path) {
Element e = this;
int j = 0;
while (true) {
int 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 getNamespace
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public final Namespace getNamespace(String prefix) {
if (prefix == null)
prefix = "";
Namespace ns = Namespace.getSpecial(prefix);
- 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 addAll
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public void addAll(ImportedClassResolver resolver) {
if (resolver._pkgs != null) {
if (_pkgs == null)
_pkgs = new LinkedList<String>();
for (String pkg: resolver._pkgs) {
- 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 setNestedState
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private void setNestedState(NestedState nestedState) {
if (this.nestedState != null) {
// Should never happen
throw new IllegalStateException("nestedState may only be set once");
}
- 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 flatMap
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public Stream flatMap(final LambdaExpression le) {
Iterator<Object> downStream = new OpIterator() {
private Iterator<?> inner;
- 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 10 arguments (exceeds 4 allowed). Consider refactoring. Open
@ContextParam(ContextType.EXECUTION) Execution execution,
@ContextParam(ContextType.COMPONENT) Component component,
@ContextParam(ContextType.VIEW) Component view,
@ContextParam(ContextType.SPACE_OWNER) IdSpace spaceOwner,
@ContextParam(ContextType.PAGE) Page page,
Method cmd1
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
public void cmd1(@ScopeParam("applicationScopeVar") String applicationScope,
@ScopeParam("sessionScopeVar") String sessionScope,
@ScopeParam("desktopScopeVar") String desktopScope,
@ScopeParam(value="pageScopeVar") String pageScope,
@ScopeParam(value="spaceScopeVar") String spaceScope,
Method init
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
public void init(@ScopeParam("applicationScopeVar") String applicationScope,
@ScopeParam("sessionScopeVar") String sessionScope,
@ScopeParam("desktopScopeVar") String desktopScope,
@ScopeParam("pageScopeVar") String pageScope,
@ScopeParam("spaceScopeVar") String spaceScope,
Method cmd1
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
@ContextParam(ContextType.EXECUTION) Execution execution,
@ContextParam(ContextType.COMPONENT) Component component,
@ContextParam(ContextType.SPACE_OWNER) IdSpace spaceOwner,
@ContextParam(ContextType.PAGE) Page page,
@ContextParam(ContextType.DESKTOP) Desktop desktop,
Method addTreeNode
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private BugOasiTreeNode<BugFormModel> addTreeNode(
BugOasiTreeNode<BugFormModel> parent,
BugOasiTreeNode<BugFormModel> newnod, BugFormModel myrow, boolean open,
Integer pos) {
if (parent == 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 accept
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public boolean accept(File dir, String name) {
for (int i = 0; i < SKIP_LIST.length; i++)
if (name.equals(SKIP_LIST[i]))
return false;
final String n = name;
- 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 initKey
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private void initKey() {
// We have to decide the key of Google Maps since we have a demo using
// it.
// This key is used by zksandbox/index.zul to generate a proper
// script
- 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 outDivTemplateEnd
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private static void outDivTemplateEnd(Page page, Writer out) throws IOException {
final Desktop dt;
if (page != null && (dt = page.getDesktop()) != null) {
if (dt.getAttribute(ATTR_DESKTOP_CLIENTINFO) != null) {
dt.removeAttribute(ATTR_DESKTOP_CLIENTINFO);
- 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 onMainCreate
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public void onMainCreate(Event event) {
final Execution exec = Executions.getCurrent();
final String id = exec.getParameter("id");
Listitem item = null;
if (id != 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 checkVersion
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static boolean checkVersion(URL url, Document doc, boolean zk5required) throws Exception {
final Element el = doc.getRootElement().getElement("version");
if (el == null)
return true; //version is optional (3.0.5)
- 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 parseList
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static ExValue[] parseList(String expr, Class expcls, boolean ignoreEmpty) {
if (expr == null)
return null;
if (expr.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 renderWidgetOverrides
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public void renderWidgetOverrides(Map<String, String> overrides) {
if (overrides == null || overrides.isEmpty())
return;
renderName("overrides");
- 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 run
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public void run() {
try {
_inf.listener.onEvent(_event);
if (_inf.callback != null || _pendingEvents != 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 invokeEventThreadCompletes
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public void invokeEventThreadCompletes(List<EventThreadCleanup> cleanups, Component comp, Event evt,
List<Throwable> errs, boolean silent) {
if (cleanups == null || cleanups.isEmpty())
return;
- 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 newEventThreadCleanups
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public List<EventThreadCleanup> newEventThreadCleanups(Component comp, Event evt, List<Throwable> errs,
boolean silent) {
final Class<?>[] ary = _evtCleans.toArray();
if (ary.length == 0)
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"