Showing 4,841 of 7,782 total issues
Method sessionTimeout
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
private void sessionTimeout(HttpServletRequest request, HttpServletResponse response, WebApp wapp, String dtid,
boolean compress) throws ServletException, IOException {
final String sid = request.getHeader("ZK-SID");
if (sid != null) {
//B65-ZK-2464 : Possible XSS Vulnerability in HTTP Header
- 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 getFromScope
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
protected Object getFromScope(String name) {
final BSHInterpreter ip = getInterpreter(_scope);
final Scope curr = ip != null ? ip.getCurrent() : null;
if (curr == null)
return getImplicit(name); //ignore scope
- 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 coerceToUi
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
public Object coerceToUi(Object val, Component comp, BindContext ctx) {
Tabbox tbx = (Tabbox) comp;
final ListModel<?> model = tbx.getModel();
//ZK-762 selection of ListModelList is not correct if binding to selectedItem
- 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 28 (exceeds 5 allowed). Consider refactoring. Open
public void render(final Listitem item, final Object data, final int index) throws Exception {
final Listbox listbox = (Listbox) item.getParent();
final int size = listbox.getModel().getSize();
//B70-ZK-2555: in order to handle dynamic template name
final String subtype = item instanceof Listgroup ? "group" : item instanceof Listgroupfoot ? "groupfoot" : 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 fixGroupsInfoBeforeInsert
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
private void fixGroupsInfoBeforeInsert(Row newItem, Row refChild, boolean isReorder) {
if (_isReplacingRow) //@see Grid.Renderer#render
return; //called by #insertBefore(), skip handling GroupInfo
if (newItem instanceof Groupfoot) {
- 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 removePartial
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
private boolean removePartial(Collection<?> master, Collection<?> c, boolean isRemove, boolean byKey,
boolean byValue) {
int sz = c.size();
int removed = 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
Function init
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
init: function(a, b, c) {
a = unescape(encodeURIComponent(a));
b = b || -1;
c = c || 2;
this.barcode_array = {};
- 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
Function afterLoad
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
export function afterLoad(a: string | CallableFunction, b?: CallableFunction, front?: boolean): boolean | void {
if (typeof a == 'string') {
if (!b) return true;
for (var pkgs = a.split(','), j = pkgs.length; j--;) {
- 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
Function panel$mold$
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
function panel$mold$(out, skipper) {
var uuid = this.uuid,
title = this.getTitle(),
caption = this.caption,
btnRenderer = zul.wgt.ButtonRenderer,
- 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
Function _swipeEnd
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
_swipeEnd(devt: JQuery.TriggeredEvent): void {
jq(this.node).off(moveEvt, this.proxy(this._swipeMove));
if (start && stop && this.opts) {
var dispX: number | undefined, dispY: number | undefined,
dispT = stop.time - start.time, dir: 'left' | 'right' | 'up' | 'down' | undefined;
- 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
Function encodeXML
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
static encodeXML(txt: string | null, opts?: EncodeXmlOptions): string {
txt = txt != null ? String(txt) : '';
if (!opts) // speed up the replacement.
return _encodeXML0(txt);
- 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 execUpdate
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void execUpdate(Execution exec, List<AuRequest> requests, AuWriter out) throws IOException {
if (requests == null)
throw new IllegalArgumentException();
// assert ExecutionsCtrl.getCurrentCtrl() == null:
// "Impossible to re-activate for update: old="+ExecutionsCtrl.getCurrentCtrl()+", new="+exec;
Function then
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
then: function( onFulfilled, onRejected, onProgress ) {
var maxDepth = 0;
function resolve( depth, deferred, handler, special ) {
return function() {
var that = this,
File AnnotationHelper.java
has 336 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* AnnotationHelper.java
Purpose:
Description:
File ResourceHttpServletRequest.java
has 336 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* ResourceHttpServletRequest.java
{{IS_NOTE
Purpose:
Method findWrapper
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
@SuppressWarnings("null")
private static Wrapper findWrapper(Class<?> clazz, List<Wrapper> wrappers,
String name, Class<?>[] paramTypes, Object[] paramValues) {
Map<Wrapper,MatchResult> candidates = new HashMap<Wrapper,MatchResult>();
Method load
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
public final static void load(Map<? super String, ? super String> map, InputStream sm, String charset,
boolean caseInsensitive) throws IOException {
final PushbackInputStream pis = new PushbackInputStream(sm, 3);
if (charset == null || charset.startsWith("UTF")) {
final byte[] ahead = new byte[3];
Strings
has 32 methods (exceeds 20 allowed). Consider refactoring. Open
public class Strings {
public static final String EMPTY = "";
/**
* Returns true if the string is null or empty.
*/
AbstractWebApp
has 32 methods (exceeds 20 allowed). Consider refactoring. Open
public abstract class AbstractWebApp implements WebApp, WebAppCtrl {
private static final Logger log = LoggerFactory.getLogger(AbstractWebApp.class);
private String _appnm;
private Configuration _config;
GroupsListModel
has 32 methods (exceeds 20 allowed). Consider refactoring. Open
public class GroupsListModel<D, G, F> extends AbstractListModel<Object> implements GroupsSelectableModel<Object> {
protected GroupsModel<D, G, F> _model;
private transient int _size;
/** An array of the group offset.
* The group offset is the offset from 0 that a group shall appear