Showing 4,841 of 7,782 total issues
Method getRequestDispatcher
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static final RequestDispatcher getRequestDispatcher(ServletContext ctx, ServletRequest request, String uri,
Map params, int mode) throws ServletException {
final char cc = uri.length() > 0 ? uri.charAt(0) : (char) 0;
if (ctx == null || (cc != '/' && cc != '~')) { //... or relevant
if (request == 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
Function beforeSize
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
beforeSize(this: zk.Widget, ctl: unknown, opts: unknown, cleanup: boolean): void {
let wgt = this, p;
if (cleanup)
wgt.clearCachedSize_();
- 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 beforeSend
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function beforeSend(uri: string, aureq: zk.Event, dt?: zk.Desktop): string {
var target: zk.Widget | undefined, tag: string | undefined;
if ((target = aureq.target) && (tag = target.autag)) {
tag = '/' + encodeURIComponent(tag);
if (!uri.includes('/_/')) {
- 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 toJSON
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function toJSON(
target: zk.Widget | undefined,
data: // `pageX` and `pageY` should co-exist
| { pageX: number; pageY: number; x?: number; y?: number; z$dateKeys?: string[] }
| { pageX?: undefined; pageY?: undefined; x?: number; y?: number; z$dateKeys?: 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
Function _rmDesktop
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function _rmDesktop(dt: zk.Desktop, dummy?: boolean): void {
var url = zk.ajaxURI(undefined, { desktop: dt, au: true }),
data = jq.param({
dtid: dt.id,
cmd_0: dummy ? 'dummy' : 'rmDesktop',
- 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 pushReqCmds
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function pushReqCmds(reqInf: AuRequestInfo, response: AuResponse): boolean {
var dt = reqInf.dt,
rt = response.responseText;
if (!rt) {
if (zk.pfmeter) zAu._pfdone(dt, zAu.pfGetIds(response));
- 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 unAfter
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
unAfter(cmd: string, fn: CallableFunction): this {
var ac = this._aftercmd![cmd];
for (var j = ac ? ac.length : 0; j--;) {
if (ac[j] == fn) {
if (!this._processingAfterCommand)
- 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 _aftCreate
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function _aftCreate(wgt: zk.Widget | undefined, cwgts: zk.Widget[], node: HTMLElement, opts?: {replaceHTML?}): undefined | zk.Widget | zk.Widget[] {
let c: zk.Widget | undefined;
if (!wgt || !(c = wgt.firstChild))
return 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
Method FillBuff
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected void FillBuff() throws java.io.IOException
{
if (maxNextCharInd == available)
{
if (available == bufsize)
Method createNodeInternal
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static final Node createNodeInternal(String expr)
throws ELException {
if (expr == null) {
throw new ELException(MessageFactory.get("error.null"));
}
Method getItemRenderer
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public ListitemRenderer<Object> getItemRenderer() {
return new ListitemRenderer<Object>() {
@Override
public void render(Listitem listitem, Object obj, int index) {
Method level1Nodes
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
private List<TreeNode<String>> level1Nodes() {
return Arrays.asList(
newNode("node 1",
newNode("node 1.1",
Method buildNextShadowCtx
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
private ComponentMatchCtx buildNextShadowCtx() {
Component comp = _currCtx.getComponent();
boolean isShadow = comp instanceof ShadowElement;
Component child = getNextUntrackedChild(comp);
if (!isShadow) {
Method beforeChildAdded
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void beforeChildAdded(Component child, Component refChild) {
if (!(child instanceof ShadowElement))
throw new UiException("Unsupported child for shadow element: " + child);
if (refChild != null && !(refChild instanceof ShadowElement))
throw new UiException("Unsupported refChild for shadow element: " + refChild);
Method parseZk
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static ZkInfo parseZk(NodeInfo parent, Element el, AnnotationHelper annHelper) throws Exception {
if (annHelper.clear())
log.warn(message("Annotations are ignored since <zk> doesn't support them", el));
final ZkInfo zi = new ZkInfo(parent, null);
Method adjustInsertionForInsertBefore
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
private boolean adjustInsertionForInsertBefore(HtmlShadowElement se, Component target, Component insertBefore) {
Component old = null;
Direction direction = inRange(se, insertBefore);
switch (direction) {
case PREVIOUS:
Method setId
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void setId(String id) {
if (id == null)
id = "";
if (!id.equals(_id)) {
final boolean rawId = this instanceof RawId;
Method getNativeContent
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static final void getNativeContent(CreateInfo ci, StringBuffer sb, Component comp, List<NodeInfo> children,
Native.Helper helper) {
for (NodeInfo meta : children) {
if (meta instanceof NativeInfo) {
final NativeInfo childInfo = (NativeInfo) meta;
Method wait
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void wait(Object mutex) throws InterruptedException, SuspendNotAllowedException {
if (mutex == null)
throw new IllegalArgumentException("null mutex");
final Thread thd = Thread.currentThread();
Method getType
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static Type getType(final char[] buf, final int off) {
int len;
switch (buf[off]) {
case 'V':
return VOID_TYPE;