Showing 7,775 of 7,775 total issues
Method disableBuffering
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void disableBuffering() {
_nobuf = true;
if (_out != null) {
try {
_out.close();
- 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 parseExpression
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public Expression parseExpression(XelContext xelc, String expression,
Class expectedType)
throws XelException {
if (_v103)
return new ELXelExpression(
- 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 setRootElement
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public final void setRootElement(Element root) {
if (root == null) {
if (_root != null)
_children.remove(_root);
} else {
- 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 comment
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void comment(char[] ch, int start, int length) throws SAXException {
if (length == 0 || isIgnoringComments())
return; //ignore zero length
String data = new String(ch, start, length);
- 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 characters
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void characters(char[] ch, int start, int length)
throws SAXException {
if (length == 0) return; //ignore zero length
//Note: Element's add will coalesce consecutive CDATA or Text
- 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 reuseNamespace
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static Namespace reuseNamespace(Item owner, Namespace ns) {
if (ns.getPrefix().length() > 0 && (owner instanceof Element)) {
final Namespace found =
((Element)owner).getNamespace(ns.getPrefix());
if (found == 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 processDocType
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private final Document processDocType(final Document doc) {
if (!_outDocType)
return doc;
final DocType dt = doc.getDocType();
- 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 toJSONString
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static String toJSONString(Collection collection){
if(collection == null)
return "null";
boolean first = 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 setDocType
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public final void setDocType(DocType docType) {
if (docType == null) {
if (_docType != null)
_children.remove(_docType);
} else {
- 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 checkNamespaceURI
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static final void checkNamespaceURI(String uri, Locator loc) {
if (uri == null || uri.length() == 0)
return; //OK: null or empty
String reason = 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 disableBuffering
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void disableBuffering() {
_nobuf = true;
if (_out != null) {
try {
_out.close();
- 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 checkXMLName
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static void checkXMLName(String name, Locator loc) {
if (name == null || name.length() == 0)
throw new DOMException(DOMException.INVALID_CHARACTER_ERR,
"XML names cannot be null or empty", loc);
- 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 getImportedClasses
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public List<String> getImportedClasses() {
final List<String> lst = new LinkedList<String>();
if (_clses != null)
for (Class<?> cls: _clses.values())
lst.add(cls.getName());
- 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 setNamespace
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public final void setNamespace(String prefix, String nsURI) {
if (nsURI == null) nsURI = "";
final Namespace ns = getNamespace(prefix);
if (ns != null) {
if (ns.getURI().equals(nsURI)) {
- 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 unescapeJavaScript
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static void unescapeJavaScript(final char[] text, final int offset, final int len, final Writer writer)
throws IOException{
if (writer == null) {
throw new IllegalArgumentException("Argument 'writer' cannot be 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 correctFieldName
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public final static String correctFieldName(String name) {
int j = name.indexOf('-');
if (j < 0)
return name; //nothing to change
- 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 getAnyField
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static final Field getAnyField(Class<?> cls, String name)
throws NoSuchFieldException {
for (;;) {
try {
return cls.getDeclaredField(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 isNumeric
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static final boolean isNumeric(Class<?> cls, boolean extend) {
if (cls.isPrimitive())
return extend ||
(!cls.equals(char.class) && !cls.equals(boolean.class));
- 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 newInstance
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static final
Object newInstance(Class<?> cls, Object[] args)
throws NoSuchMethodException, InstantiationException,
InvocationTargetException, IllegalAccessException {
if (args == null || args.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 getAttributeIndex
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public final int getAttributeIndex
(int indexFrom, String namespace, String name, int mode) {
if (_attrs == null || indexFrom < 0 || indexFrom >= _attrs.size())
return -1;
- 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"