Showing 4,841 of 7,782 total issues
Method resolveVariable
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public Object resolveVariable(String name) throws XelException {
final RequestContext jc = RequestContexts.getCurrent();
if (jc != null) {
final VariableResolver parent = jc.getVariableResolver();
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 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 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 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) {
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 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 (m.getPageSize() > 0) { //min page size is 1
pgi.setPageSize(m.getPageSize());
} else {
m.setPageSize(pgi.getPageSize());
}
Avoid deeply nested control flow statements. Open
if (!group.isOpen()) {
addVisibleItemCount(isRemove ? group.getVisibleItemCount() : -group.getVisibleItemCount());
}
Method remove
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public boolean remove(Object o) {
//bug #1819318 Problem while using SortedSet with Databinding
if (_map instanceof LinkedHashMap || _map instanceof SortedMap) {
int index = indexOfAndRemove(o);
if (index < 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 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
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 {
Avoid deeply nested control flow statements. Open
if (g[2] != -1)
g[2] += (infront ? 1 : -1);
Avoid deeply nested control flow statements. Open
if (!item.isDisabled() && item.isSelectable())
curSeldItems.add(item);
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"
Further reading
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 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 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 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 modifyPath
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public String modifyPath(String path) throws UnsupportedEncodingException {
if (path.startsWith(ZVER)) {
final int j = path.indexOf('/', ZVER.length());
if (j >= 0)
path = path.substring(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
Avoid deeply nested control flow statements. Open
if (--depth < 0) {
nestedTo = j;
j = l;
break; //done
}