Showing 7,775 of 7,775 total issues
Method valueOf
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static final String valueOf(Node node) {
if (node instanceof Item) {
String v = ((Item)node).getText();
return v != null ? v: "";
}
- 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 setContent
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public final Object setContent(String path, Object obj) {
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 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 checkAdd
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private void checkAdd(Attribute newItem, Attribute other, boolean replace) {
//first, remove any existent with the same uri and name
if (newItem.getOwner() != null)
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR,
"Attribute, "+newItem.toString()+", owned by other; detach or clone it", getLocator());
- 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 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 set
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings({ "unchecked", "rawtypes" })
public static final void set(Object obj, String name, Object val,
boolean autoCoerce) throws NoSuchMethodException {
try {
AccessibleObject acs;
- 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 toAttributeName
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static final String toAttributeName(String methodName) {
int len = methodName.length();
if (len < 2)
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"
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 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 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 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 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 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 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 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"