Showing 4,841 of 7,782 total issues
Method execNonComponent
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
private static final void execNonComponent(CreateInfo ci, Component comp, Object meta) {
final Page page = ci.page;
if (meta instanceof AttributesInfo) {
final AttributesInfo attrs = (AttributesInfo) meta;
if (comp != 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 getVisibleIndexOfItem0
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
private int getVisibleIndexOfItem0(Treeitem item, boolean inclusive) {
// ZK-2539: use vector instead of recursive calls to avoid stack overflow
// when number of tree items is huge.
Vector<Treeitem> items = new Vector<Treeitem>();
int count = 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 getAvailableAtClient
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
protected Set<? extends Component> getAvailableAtClient(int offset, int limit) {
final Set<Component> avail = new LinkedHashSet<Component>(32);
final Rows rows = _grid.getRows();
Row row = (Row) rows.getFirstChild();
while (row != 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 stringToInts
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public static final int[] stringToInts(String numbers, int defaultValue) throws WrongValueException {
if (numbers == null)
return null;
List<Integer> list = new LinkedList<Integer>();
- 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 setup
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public static final Object setup(HttpSession sess, ServletRequest request, ServletResponse response,
String charset) {
if (hasSetup(request)) //processed before?
return Objects.UNKNOWN;
- 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 _array_search
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
_array_search: function(a, b, c) {
var d = !!c,
e = "";
if (b && "object" === typeof b && b.change_key_case) return b.search(a, c);
if ("object" === typeof a && a.exec) {
- 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 getFlexInfo
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
getFlexInfo(wgt: zk.Widget): { isFlexRow: boolean; flexContainerChildren: HTMLElement[]; childrenWidgets: zk.Widget[] } {
let pwgt = wgt.parent,
cwgt = pwgt!.firstChild,
fContainer = pwgt!.getFlexContainer_()!,
fcc = fContainer.firstElementChild as HTMLElement,
- 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 go
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
static go(url: string, opts?: Partial<GoOptions>): void {
opts = opts || {};
if (opts.target) {
open(url, opts.target);
} else if (opts.overwrite) {
- 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 zkInitCrashTimer
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
window.zkInitCrashTimer = setTimeout(function () {
var zkErrorCode,
z_runonce = document.querySelectorAll('.z-runonce')[0],
zk_proc = document.getElementById('zk_proc'),
ztemp = document.querySelectorAll('.z-temp')[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 _syncPosition
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
_syncPosition(orient: string, pos: number): void {
if (!this._pos)
return;
var isH = orient == 'hor',
- 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
File Dates.java
has 280 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Dates.java
Purpose:
Description:
Method invoke
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Object invoke(ELContext context, Object base, Object method,
Class<?>[] paramTypes, Object[] params) {
if (context == null) {
throw new NullPointerException();
}
Method coerceToType
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static final Object coerceToType(final Object obj,
Class<?> type) throws ELException {
if (type == null || Object.class.equals(type) ||
(obj != null && type.isAssignableFrom(obj.getClass()))) {
Method updateModelByTag
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void updateModelByTag() {
fileModel.clear();
final String r = getDesktop().getWebApp().getRealPath("/");
final File test2 = new File(r, PATH);
final String pattern = ((Textbox) getFellow("w1").getFellow("fnt"))
Method process
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected boolean process(Session sess, RenderRequest request, RenderResponse response, String path,
boolean bRichlet) throws PortletException, IOException {
// if (log.isDebugEnabled()) log.debug("Creates from "+path);
final WebManager webman = getWebManager();
final WebApp wapp = webman.getWebApp();
Method removeRedundant
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void removeRedundant() {
int initsz = (_invalidated.size() + _attached.size()) / 2 + 30;
final Set<Component> ins = new HashSet<Component>(initsz), //one of ancestor in _invalidated or _attached
outs = new HashSet<Component>(initsz); //none of ancestor in _invalidated nor _attached
final List<Component> ancs = new ArrayList<Component>(50);
Method render
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void render(final Treeitem item, final Object data, final int index) throws Exception {
final Tree tree = item.getTree();
final Component parent = item.getParent();
final Template tm = resolveTemplate(tree, parent, data, index, -1, "model");
// ZK-2859: to replace the id of the the original treeitem that is not from the template
Method service
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void service(org.zkoss.zk.au.AuRequest request, boolean everError) {
final String cmd = request.getCommand();
if (cmd.equals(Events.ON_OPEN)) {
OpenEvent evt = OpenEvent.getOpenEvent(request);
_open = evt.isOpen();
File Tab.java
has 280 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Tab.java
Purpose:
Description:
Method doListDataChange
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void doListDataChange(ListDataEvent event) {
if (INVALIDATE_THRESHOLD == -1) {
INVALIDATE_THRESHOLD = Utils.getIntAttribute(this.getOwner(), "org.zkoss.zul.invalidateThreshold", 10,
true);
}