Showing 4,841 of 7,782 total issues
Method addEmbedded
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static void addEmbedded(String deviceType, String content) {
if (deviceType == null || deviceType.length() == 0)
throw new IllegalArgumentException();
if (content == null || content.length() == 0)
return; //nothing to do
- 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 stop
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public void stop(WebApp wapp) {
synchronized (_idles) {
for (EventProcessingThreadImpl thread : _idles)
thread.cease("Stop application");
_idles.clear();
- 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 parseRequest
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static AuDecoder parseRequest(HttpServletRequest request, AuDecoder decoder) {
Map<String, Object> params = getFileuploadMetaPerWebApp(
WebApps.getCurrent());
AbstractFileUpload upload = newServletDiskFileUpload(new DiskFileItemFactory.Builder()
.setBufferSize((Integer) params.get("sizeThreadHold"))
- 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 recycleDesktop
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public void recycleDesktop(Execution exec, Page page, Writer out) throws IOException {
PerformanceMeter pfmeter = page.getDesktop().getWebApp().getConfiguration().getPerformanceMeter();
final long startTime = pfmeter != null ? System.currentTimeMillis() : 0;
final String pfReqId = pfmeter != null ? meterLoadStart(pfmeter, exec, startTime) : 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 setUnavailableMessage
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static final String setUnavailableMessage(String deviceType, String msg) {
if (deviceType == null || deviceType.length() == 0)
throw new IllegalArgumentException();
if (msg != null && msg.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 get
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected Object get(Scope scope, String name) {
if (scope != null) {
final NameSpace bshns = prepareNS(scope);
//note: we have to create NameSpace (with prepareNS)
//to have the correct chain
- 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 invoke
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Object invoke(ELContext ctx, Object base, Object method, Class[] paramTypes, Object[] params)
throws MethodNotFoundException {
Object value = super.invoke(ctx, base, method, paramTypes, params);
// in order to support more complex case, ex: .stream().filter(x -> x.contains(vm.value))
- 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 getValue
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public Object getValue(ELContext ctx, Object base, Object property)
throws NullPointerException, PropertyNotFoundException, ELException {
if (ctx == null) {
throw new NullPointerException();
}
- 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 parseType
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private static Map<String, Object> parseType(Map<String, Object> data) {
JSONArray dateKeys = (JSONArray) data.get("z$dateKeys");
if (dateKeys != null) {
for (Object key : dateKeys) {
String strKey = (String) key;
- 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 isHandled
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public boolean isHandled(Method m) {
if (m.isAnnotationPresent(Transient.class))
return false;
final String name = m.getName();
if ("hashCode".equals(name) || "equals".equals(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 addItemReference
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected void addItemReference(Component modelOwner, final Component comp, int index, String varnm) {
// ZK-2456: if comp is native, add reference to all of its children
if (comp.getDefinition().isNative()) {
for (Component child : comp.getChildren()) {
addItemReference(modelOwner, child, index, varnm);
- 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 coerceToBean
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public Object coerceToBean(Object val, Component comp, BindContext ctx) {
if (val != null) {
final Tree tree = (Tree) comp;
final TreeModel<?> model = tree.getModel();
if (model != null && !(model instanceof TreeSelectableModel)) {
- 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 coerceToBean
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public Object coerceToBean(Object val, Component comp, BindContext ctx) {
final String format = (String) ctx.getConverterArg("format");
if (format == null)
throw new NullPointerException("format attribute not found");
final String dateStr = (String) val;
- 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 getType
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private static Type getType(final char[] buf, final int off) {
int len;
switch (buf[off]) {
case 'V':
return VOID_TYPE;
- 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 processPropertySaveBindings
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private void processPropertySaveBindings(Component comp, String propName, Annotation ann,
ExpressionAnnoInfo converterInfo, ExpressionAnnoInfo validatorInfo) {
String saveExpr = null;
final List<String> beforeCmds = new ArrayList<String>();
final List<String> afterCmds = new ArrayList<String>();
- 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 compare
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
static int compare(boolean[] a, boolean[] b) {
if (a == b) {
return 0;
}
if (a == 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 processPropertyPromptBindings
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private void processPropertyPromptBindings(Component comp, String propName, Annotation ann,
ExpressionAnnoInfo converterInfo, ExpressionAnnoInfo validatorInfo) {
String expr = null;
Map<String, String[]> args = null;
for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.hasNext();) {
- 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 setValue
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public void setValue(XelContext ctx, Object value) throws XelException {
try {
if (cmp instanceof ComponentCtrl) {
PropertyAccess propertyAccess = ((ComponentCtrl) cmp).getPropertyAccess(field);
if (propertyAccess != 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 processChildrenLoadBindings
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private void processChildrenLoadBindings(Component comp, Annotation ann, ExpressionAnnoInfo converterInfo) {
String loadExpr = null;
final List<String> beforeCmds = new ArrayList<String>();
final List<String> afterCmds = new ArrayList<String>();
- 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 rehash
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private void rehash() {
int oldCapacity = this.table.length;
Entry[] oldMap = this.table;
int newCapacity = oldCapacity * 2 + 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"