Showing 4,841 of 7,782 total issues
Avoid deeply nested control flow statements. Open
if (slashes.isEmpty()) {
slashes.push(-1);
}
Method include
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static final void include(ServletContext ctx, ServletRequest request, ServletResponse response, String uri,
Map params, int mode) throws IOException, ServletException {
Avoid deeply nested control flow statements. Open
if (j >= 0) {
int k = ua.indexOf('.', j += 8);
if (k >= 0) {
for (int len = ua.length(); ++k < len;) {
final char cc = ua.charAt(k);
Method urlEncoder
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static URLEncoder urlEncoder() {
if (_urlenc == null) {
final String cls = Library.getProperty("org.zkoss.web.servlet.http.URLEncoder");
if (cls != null && cls.length() > 0) {
try {
- 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 forward
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static final void forward(ServletContext ctx, ServletRequest request, ServletResponse response, String uri,
Map params, int mode) throws IOException, ServletException {
Method getExtension
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static final String getExtension(String path, boolean lastOnly) {
if (lastOnly)
return getExtension(path);
if (path == null)
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 interpret
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public final void interpret(ServletContext ctx, HttpServletRequest request, HttpServletResponse response,
String content, String ctype, Locator locator) throws DspException, IOException, XelException {
Avoid deeply nested control flow statements. Open
if (j + 2 < to && ctx.content.charAt(j + 2) == '%')
++j; //skip '\\'
Avoid deeply nested control flow statements. Open
if (j + 2 < to && ctx.content.charAt(j + 2) == '{')
++j; //skip '\\'
Method sendRedirect
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static final void sendRedirect(ServletContext ctx, HttpServletRequest request, HttpServletResponse response,
String uri, Map params, int mode) throws IOException, ServletException {
Method encodeRedirectURL
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static final String encodeRedirectURL(ServletContext ctx, HttpServletRequest request,
HttpServletResponse response, String uri, Map params, int mode) {
Method getValue
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected Object getValue(String key) {
Object o = _values.get(key);
if (o == null) {
final Enumeration e = hreq.getHeaders(key);
if (e == null || !e.hasMoreElements())
- 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 (j >= 0) {
String s = range.substring(j + 1).trim();
if (s.length() > 0) {
int to = Integer.parseInt(s);
if (to >= from)
Avoid deeply nested control flow statements. Open
if (preslash == 0) { //special case "/../"
throw new IllegalArgumentException("Illegal path: " + path);
}
Avoid deeply nested control flow statements. Open
for (j = i + 1; j < n; ++j) q[j].i--;
Function setMatcher
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
Function on
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function on( elem, types, selector, data, fn, one ) {
Function _one_mult
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
_one_mult: function(a, b, c, d, e, g) {
Avoid deeply nested control flow statements. Open
for (k = a._pack_prev; k !== j._pack_prev; k = k._pack_prev, s2++) {
if (d3_layout_packIntersects(k, c)) {
if (s2 < s1) {
isect = -1;
j = k;
Function d
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
d = function(a, b, d, e, l, m) {