Showing 4,841 of 7,782 total issues
Method afterCompose
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public void afterCompose() {
_afterComposed = true;
fixModeOnly();
if (_instantMode) {
final Execution exec = getExecution();
- 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 insertBefore
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public boolean insertBefore(Component child, Component refChild) {
final Grid grid = getGrid();
final boolean isReorder = child.getParent() == this;
//bug #3051305: Active Page not update when drag & drop item to the end
if (isReorder) {
- 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 beforeChildAdded
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public void beforeChildAdded(Component child, Component refChild) {
if (child instanceof Toolbar) {
if (_toolbar != null && _toolbar != child)
throw new UiException("Only one Toolbar is allowed: " + this);
if (this.isVertical()) //ZK-4270: meaningful message to the developer indicating incorrect usage
- 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 addSelectionPaths
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public boolean addSelectionPaths(int[][] paths) {
boolean added = false;
final int len = paths != null ? paths.length : 0;
final boolean multiple = isMultiple();
for (int j = 0; j < len; ++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
Method renderProperties
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws java.io.IOException {
super.renderProperties(renderer);
render(renderer, "_value", marshall(_value));
//ZK-658: we have to render the value before constraint
- 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 renderProperties
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws java.io.IOException {
super.renderProperties(renderer);
if (!_btnVisible)
renderer.render("buttonVisible", false);
if (!_lenient)
- 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 16 (exceeds 5 allowed). Consider refactoring. Open
public Object getValue() {
if (popupString != null) {
return popupString;
} else if (popup != null) {
String uuidString = "uuid(" + popup.getUuid() + ")";
- 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 getItems
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public Collection<Treeitem> getItems() {
return new AbstractCollection<Treeitem>() {
public int size() {
return getItemCount();
}
- 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 putAll
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public void putAll(Map<? extends K, ? extends V> c) {
if (c == _map) //special case
return;
if (_map instanceof LinkedHashMap) {
- 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 removeFromQueryString
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public static final StringBuffer removeFromQueryString(StringBuffer sb, String name)
throws UnsupportedEncodingException {
name = encodeURIComponent(name);
if (name == null || name.isEmpty())
- 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 _preg_split
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
_preg_split: function(a, b, c, d) {
c = c || 0;
d = d || "";
var e, g = [],
f = 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 _respSuccess
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export function _respSuccess(response: Response, reqInf: AuRequestInfo, sid: string | number): boolean {
if (sid && sid != zAu.seqId) {
zAu._errCode = 'ZK-SID ' + (sid ? 'mismatch' : 'required');
zAu.afterResponse(); //continue the pending request if any
return 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
Function rating$mold$
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function rating$mold$(out) {
var sclass = this.getIconSclass(),
isVert = 'vertical' == this._orient;
- 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 _getPkgs0
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function _getPkgs0(e: HTMLElement, pkgmap: Record<string, unknown>): void {
var tn = e.tagName;
if ('zk' != tn && 'attribute' != tn) {
if (!zk.Widget.getClass(tn)) { //not register?
var clsnm = zk.wgt.WidgetInfo.getClassName(tn);
- 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 center
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
center(flags?: string): this {
var el = this.jq[0],
wdgap = this.offsetWidth(),
hghgap = this.offsetHeight();
- 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 constructor
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
constructor(control: zk.Object & {node?: HTMLElement} | undefined, node: HTMLElement | undefined, opts: DraggableOptions) {
super();
if (!_stackup) {
//IE: if we don't insert stackup at beginning, dragging is slow
_stackup = jq.newStackup(undefined, 'z_ddstkup');
- 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 Function
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
final public void Function() throws ParseException {
/*@bgen(jjtree) Function */
AstFunction jjtn000 = new AstFunction(JJTFUNCTION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);Token t0 = null;
Method render
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
@SuppressWarnings({ "rawtypes", "unchecked" })
public void render(Treeitem treeItem, DefaultTreeNode<TestObject> treeNode, int id) throws Exception {
treeItem.setValue(treeNode);
Treerow tr;
if (treeItem.getTreerow() == null) {
Method addEventListener
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
public boolean addEventListener(int priority, String evtnm, EventListener<? extends Event> listener) {
if (evtnm == null || listener == null)
throw new IllegalArgumentException("null");
if (!Events.isValid(evtnm))
throw new IllegalArgumentException("Invalid event name: " + evtnm);
Method accept
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void accept(final TypeCollector classVisitor) {
char[] c = new char[maxStringLength]; // buffer used to read strings
int i, j, k; // loop variables
int u, v, w; // indexes in b