Showing 7,775 of 7,775 total issues
Method redrawChildren
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected void redrawChildren(Writer out) throws IOException {
final Object xc = getExtraCtrl();
if (xc instanceof Cropper) {
final Set<? extends Component> crop = ((Cropper) xc).getAvailableAtClient();
if (crop != 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 triggerBeforeHostChildRemoved
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private void triggerBeforeHostChildRemoved(Component child) {
if (isDisabledHostChanged()) return;
List<ShadowElement> shadowRoots = getShadowRoots();
if (!shadowRoots.isEmpty()) {
Map<Component, Integer> indexCacheMap = getIndexCacheMap(this);
- 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 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 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 getAttributes
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static final void getAttributes(StringBuffer sb, Map<String, Object> props,
Collection<Namespace> namespaces) {
if (namespaces != null && !namespaces.isEmpty()) {
for (Namespace ns : namespaces) {
sb.append(" xmlns");
- 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 resolveClass
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public Class resolveClass(String name) throws XelException {
if (_mappers != null) {
for (Iterator it = CollectionsX.comodifiableIterator(_mappers); it.hasNext();) {
final FunctionMapper mapper = (FunctionMapper) it.next();
if (mapper instanceof FunctionMapperExt) {
- 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 onEvent
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public void onEvent(Event event) throws Exception {
final long max = System.currentTimeMillis() + getMaxSchedTime();
if (log.isDebugEnabled()) {
log.debug("Handling schedule server push, _schedInfos is empty: [{}]", !scheduledServerPush());
}
- 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 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 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 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 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 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 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"