Showing 7,775 of 7,775 total issues
Method setText
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public void setText(String value) throws WrongValueException {
if (_auxinf != null && _auxinf.maxlength > 0 && value != null && value.length() > _auxinf.maxlength)
throw new WrongValueException(this, MZul.STRING_TOO_LONG, new Integer(_auxinf.maxlength));
final Object val = coerceFromString(value);
- 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 validate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected void validate(Object value) throws WrongValueException {
final Constraint constr = getConstraint();
if (constr != null) { //then _auxinf must be non-null
//Bug 1698190: constructor might be zscript
Scopes.beforeInterpret(this);
- 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 (hds != null) {
for (Component listheader : hds.getChildren()) {
((Listheader) listheader).setSortDirection("natural");
}
}
Avoid deeply nested control flow statements. Open
if (!item.isDisabled() && item.isSelectable())
curSeldItems.add(item);
Method include
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static final void include(PortletContext ctx, RenderRequest request, RenderResponse response, String uri,
Map params, int mode) throws IOException, PortletException {
Method fireEvent
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
protected void fireEvent(int type, Comparable<?> series, Comparable<?> category, int seriesIndex, int categoryIndex,
Object data) {
Avoid deeply nested control flow statements. Open
if (g[2] != -1)
g[2] += (infront ? 1 : -1);
Method removeAll
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public boolean removeAll(Collection<?> c) {
if (_set == c || this == c) { //special case
clear();
return true;
}
- 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 onAfterRender
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public void onAfterRender() {
if (inPagingMold() && _model instanceof Pageable) {
Pageable m = (Pageable) _model;
if (m.getPageSize() > 0) { //min page size is 1
_pgi.setPageSize(m.getPageSize());
- 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 (m.getActivePage() >= 0) { //min page index is 0
pgi.setActivePage(m.getActivePage());
} else {
m.setActivePage(pgi.getActivePage());
}
Method removeAll
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public boolean removeAll(Collection<?> c) {
if (_col == c || this == c) { //special case
clearSelection();
clear();
return true;
- 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 render
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static final void render(ServletContext ctx, HttpServletRequest request, HttpServletResponse response,
Richlet richlet, String path, Writer out) throws ServletException, IOException {
Method getThreadLocals
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void getThreadLocals() {
for (Entry<String, String[]> me : _fieldsMap.entrySet()) {
final String clsName = me.getKey();
try {
final Class cls = Classes.forNameByThread(clsName);
- 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 locate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public URL locate(Locale locale) throws IOException {
boolean fallback = false;
String path;
if (_path != null) {
path = _path;
- 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 box3
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static String box3(String styleName, String styleValue, String styleName2, String styleValue2,
String styleName3, String styleValue3) {
Method retainAll
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public boolean retainAll(Collection<?> c) {
if (_col == c || this == c) { //special case
return false;
}
//bug #1819318 Problem while using SortedSet with Databinding
- 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 addValue
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public void addValue(Date date, Number open, Number high, Number low, Number close, Number volume) {
Avoid deeply nested control flow statements. Open
if (!group.isOpen()) {
addVisibleItemCount(isRemove ? group.getVisibleItemCount() : -group.getVisibleItemCount());
}
Method render
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static final void render(ServletContext ctx, HttpServletRequest request, HttpServletResponse response,
Component comp, String path, Writer out) throws ServletException, IOException {
Method retainAll
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public boolean retainAll(Collection<?> c) {
if (_set == c || this == c) { //special case
return false;
}
//bug #1819318 Problem while using SortedSet with Databinding
- 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"