Showing 7,775 of 7,775 total issues
Method convertSubversion
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static final int convertSubversion(String subver) {
try {
return Integer.parseInt(subver);
} catch (Throwable ex) { //eat
}
- 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 && line.charAt(j) == '}') {
if (j > 0)
j = 1 + Strings.skipWhitespacesBackward(line, j - 1);
if (j == 0) //no non-space before }
break;
Method parse
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
parse(Map<? super String, ? super String> map,
String src, char separator, char quote, boolean asValue,
boolean parenthesis) throws IllegalSyntaxException {
Avoid deeply nested control flow statements. Open
if (first)
first = false;
else
_jsout.append(',');
Method load0
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void load0(String prefix, TaglibDefinition loaded) {
if (!loaded.functions.isEmpty()) {
if (_mtds == null)
_mtds = new HashMap<String, Function>(8);
for (Map.Entry<String, Function> me: loaded.functions.entrySet())
- 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 getName
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static String getName(URL url) {
String name = url.getPath();
if (name != null) {
{
final int j = name.lastIndexOf(File.pathSeparatorChar);
- 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 a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public void render(Page page, Writer out) throws IOException {
final Execution exec = Executions.getCurrent();
final String ctl = ExecutionsCtrl.getPageRedrawControl(exec);
boolean au = exec.isAsyncUpdate(null);
if (!au && (page.isComplete() || "complete".equals(ctl))) {
- 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 getResources
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public Enumeration<URL> getResources(String name) throws IOException {
name = resolveName(name);
// no need to use Classes.getContextClassLoader() here because of the loading order issue
ClassLoader cl = Thread.currentThread().getContextClassLoader();
- 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 parseMultiple
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
parseMultiple(Map<? super String, Collection<String>> map,
String src, char separator, char quote, boolean asValue,
boolean parenthesis) throws IllegalSyntaxException {
Avoid deeply nested control flow statements. Open
if ("none".equals(val)) {
String newstyle = style.substring(0, j);
final int k = style.indexOf(';', j + 7);
if (k >= 0)
newstyle += style.substring(k + 1);
Avoid deeply nested control flow statements. Open
if (k > 0) sb.append('_');
Avoid deeply nested control flow statements. Open
if (expStr.endsWith(".$"))
expStr = expStr.substring(0, expStr.length() - 2);
Method formatDate
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static final String formatDate(Date date, String pattern, Locale locale, TimeZone timezone, String dateStyle, String timeStyle) {
Method getName
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private String getName(URL url) {
String name = url.getPath();
if (name != null) {
final int i = name.lastIndexOf(File.pathSeparatorChar);
- 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 parseDate
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static final Date parseDate(String source, String pattern, Locale locale, TimeZone timezone, String dateStyle, String timeStyle) throws Exception {
Method valueOf
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static final int valueOf(String name) {
name = name.toUpperCase();
if ("CEILING".equals(name)) return BigDecimal.ROUND_CEILING;
if ("DOWN".equals(name)) return BigDecimal.ROUND_DOWN;
if ("FLOOR".equals(name)) return BigDecimal.ROUND_FLOOR;
- 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 getMessage
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static final String getMessage(Throwable ex) {
String s;
for (Throwable t = ex;;) {
s = t.getMessage();
if (s != null && s.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 readObject
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException {
s.defaultReadObject();
final Class<?> cls = (Class<?>)s.readObject();
- 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 isAttribute
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static final boolean isAttribute(String methodName) {
int len = methodName.length();
if (len < 2)
return false;
- 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 (node instanceof Element) {
eOther = (Element) node;
break;
}