Showing 4,841 of 7,782 total issues
Method toStyle
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private static final int toStyle (String style) {
if (style != null) {
style = style.trim().toLowerCase(java.util.Locale.ENGLISH);
return "short".equals(style) ? DateFormat.SHORT
: "medium".equals(style) ? DateFormat.MEDIUM
- 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 escape
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
static void escape(String s, StringBuffer sb) {
for(int i=0;i<s.length();i++){
char ch=s.charAt(i);
switch(ch){
case '"':
- 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 read
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public int read(char cbuf[], int off, int len) throws IOException {
if (_org != null) {
final int cnt = _org.read(cbuf, off, len);
if (!_nobuf)
if (cnt >= 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 getLabel
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static final String getLabel(String key) {
if (key == null)
return "";
if (key.startsWith("mesg:")) {
- 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 read
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
@Override
public int read(byte[] b, int off, int len) throws IOException {
if (_org != null) {
final int realLen = _org.read(b, off, len);
if (!_nobuf)
- 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 isXMLExtender
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static boolean isXMLExtender(final char c) {
/*
* This function is not accellerated by the bitmask system because
* there are no longer any actual calls to it from the JDOM code.
* It used to be called by the isXMLNameCharacter() method before
- 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 getElement
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public final Element getElement(String namespace, String name, int mode) {
if (_elemMap != null && namespace == null && mode == FIND_BY_TAGNAME)
return getElement(name); //use the speed version
int j = getElementIndex(0, namespace, name, mode);
- 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 resolveClass
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public Class<?> resolveClass(String clsnm) throws ClassNotFoundException {
if (clsnm.indexOf('.') < 0) {
if (_clses != null) {
final Class<?> cls = _clses.get(clsnm);
if (cls != 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 toInternalForm
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static final String toInternalForm(String clsName) {
final int k = clsName.indexOf('[');
if (k <= 0) { //not an array, or already in internal form
return clsName; //just return
}
- 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 recoverIndexedPropertyDescriptor
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private PropertyDescriptor recoverIndexedPropertyDescriptor(Class baseClz, PropertyDescriptor pd) {
if (pd instanceof IndexedPropertyDescriptor) {
final IndexedPropertyDescriptor ipd = (IndexedPropertyDescriptor) pd;
if (ipd.getIndexedReadMethod() != null) {
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 jj_3R_76
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private boolean jj_3R_76() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_80()) {
jj_scanpos = xsp;
- 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 wireFellows
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public void wireFellows(final IdSpace idspace) {
//inject fellows
final Collection<Component> fellows = idspace.getFellows();
for (Component xcomp : fellows)
injectFellow(xcomp);
- 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 injectByName
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private void injectByName(Object arg, String fdname, boolean fieldOnly) {
//argument to be injected is null; then no need to inject
if (arg != null) {
final String mdname = Classes.toMethodName(fdname, "set");
final Class parmcls = arg.getClass();
- 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 getURIEvent
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static final URIEvent getURIEvent(AuRequest request) {
final Map<String, Object> data = request.getData();
String uri = (String) data.get("");
int urilen = uri.length();
if (urilen > 0 && uri.charAt(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 getPath
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static final String getPath(Component comp) {
final StringBuffer sb = new StringBuffer(64);
for (;;) {
if (sb.length() > 0)
sb.insert(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 afterStep
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected void afterStep(Character input, CharClass inputClass, State origin, State destination) {
doDebug("* OP Escaped: " + _opEscaped);
if (inputClass == CharClass.ESCAPE)
- 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 fillUpIndexMap
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private Map<Component, Integer> fillUpIndexMap(Component first, Component last) {
if (first == null) // last will be null too
return getIndexMap(getShadowHostIfAny());
Component parent = first.getParent();
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 isDynamicValue
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public boolean isDynamicValue() {
if (_dynamicValue == null) {
final ComponentCtrl ctrl = this;
List<String> props = ctrl.getAnnotatedProperties();
if (props != 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 getIndex
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static int getIndex(ShadowElement owner, Component insertion, Map<Component, Integer> cacheMap) {
if (insertion == null)
return -1;
if (insertion.getParent() == null) {
if (owner == 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 parseVariables
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private static void parseVariables(LanguageDefinition langdef, NodeInfo parent, Element el,
AnnotationHelper annHelper) throws Exception {
//if (!el.getElements().isEmpty())
// throw new UiException(message("Child elements are not allowed for <variables> element", el));
- 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"