Showing 4,841 of 7,782 total issues
Method newComponent
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public Component newComponent(Page page, Component parent, ShadowInfo compInfo, Component insertBefore) {
final Component comp = compInfo.newInstance(page, parent);
Utils.setShadowInfo(comp, compInfo);
Object currentInfo = ShadowElementsCtrl.getCurrentInfo();
- 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 doDetached
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private void doDetached() {
l_out: for (Map.Entry<Component, Component> me : _detached.entrySet()) {
Component p = me.getValue();
for (; p != null; p = p.getParent())
if (_moved.contains(p) || _detached.containsKey(p) || _invalidated.contains(p) || _attached.contains(p))
- 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 destroy
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public void destroy() {
final ExecutionMonitor execmon = _wapp != null //just in case
? _wapp.getConfiguration().getExecutionMonitor() : null;
_rque = null; //denote it is destroyed
- 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 getMaxSchedTime
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private static long getMaxSchedTime() {
if (_maxSchedTime == null) {
//no need to be synchronized
final String PROP = "org.zkoss.zk.ui.maxScheduleTime";
final String val = Library.getProperty(PROP);
- 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 setStyle
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public void setStyle(String style) {
if (style == null)
style = "";
if (!_style.equals(style)) {
_style = style;
- 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 setViewport
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public void setViewport(String viewport) {
if (viewport == null)
viewport = "auto";
if (!_viewport.equals(viewport)) {
_viewport = viewport;
- 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 process
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private void process(Desktop desktop, Event event) {
// if (log.finable()) log.finer("Processing event: "+event);
final Component comp;
if (event instanceof ProxyEvent) {
- 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 recoverDesktop
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected Desktop recoverDesktop(Session sess, HttpServletRequest request, HttpServletResponse response,
WebAppCtrl wappc, String dtid) {
final FailoverManager failover = wappc.getFailoverManager();
if (failover != null) {
Desktop desktop = 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 addDependsOnTrackings
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static void addDependsOnTrackings(Method m, String basepath, List<String> srcpath, Binding binding,
BindContext ctx) {
final DependsOn annt = ViewModelAnnotationResolvers.getAnnotation(m, DependsOn.class);
if (annt != null) {
String[] props = annt.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 parseKeys
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static int parseKeys(Map<String, Object> data) {
int keys = 0;
if (data != null) {
if (getBoolean(data, "altKey"))
keys |= MouseEvent.ALT_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 coerceToBean
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public Object coerceToBean(Object val, Component comp, BindContext ctx) {
if (val != null) {
final ListModel<?> model = ((Radio) val).getRadiogroup().getModel();
if (model != null && !(model instanceof Selectable)) {
- 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 addPropertySaveBindings
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
public void addPropertySaveBindings(Component comp, String attr, String saveExpr, String[] beforeCmds,
String[] afterCmds, Map<String, Object> bindingArgs, String converterExpr,
Map<String, Object> converterArgs, String validatorExpr, Map<String, Object> validatorArgs);
Method coerceToBean
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public Object coerceToBean(Object val, Component comp, BindContext ctx) {
if (val != null) {
final Combobox lbx = (Combobox) comp;
final ListModel<?> model = lbx.getModel();
if (model != null && !(model instanceof Selectable)) {
- 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 call
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public void call(Object base, Method method) {
Method originalMethod = ViewModelAnnotationResolvers.getOriginalMethod(base, method);
Class<?>[] paramTypes = originalMethod.getParameterTypes();
java.lang.annotation.Annotation[][] parmAnnos = originalMethod.getParameterAnnotations();
Object[] params = new Object[paramTypes.length];
- 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 renderTabpanel
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public void renderTabpanel(Tabpanel item, final Object data, final int index) throws Exception {
final Tabbox tabbox = item.getTabbox();
final Tabpanels tabpanels = tabbox.getTabpanels();
final int size = tabbox.getModel().getSize();
final String tmn = "model";
- 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 11 (exceeds 5 allowed). Consider refactoring. Open
public Object coerceToBean(Object val, Component comp, BindContext ctx) {
if (val != null) {
final Tabbox tbx = (Tabbox) comp;
final ListModel<?> model = tbx.getModel();
if (model != null && !(model instanceof Selectable)) {
- 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 11 (exceeds 5 allowed). Consider refactoring. Open
public Object coerceToBean(Object val, Component comp, BindContext ctx) {
if (val != null) {
final Listbox lbx = (Listbox) comp;
final ListModel<?> model = lbx.getModel();
if (model != null && !(model instanceof Selectable)) {
- 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 checkShadowElementAndCreateSubChildren
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private boolean checkShadowElementAndCreateSubChildren(Component parent) {
boolean hasShadow = false;
if (parent instanceof ComponentCtrl) {
ComponentCtrl pCtrl = (ComponentCtrl) parent;
for (ShadowElement se : pCtrl.getShadowRoots()) {
- 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 visitMethod
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private MethodCollector visitMethod(int access, String name, String desc) {
// already found the method, skip any processing
if (collector != null) {
return 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 parseConverter
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private ExpressionAnnoInfo parseConverter(Component comp, String propName) {
final Collection<Annotation> annos = ((ComponentCtrl) comp).getAnnotations(propName, CONVERTER_ANNO);
if (annos.size() == 0)
return null;
if (annos.size() > 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"