Showing 7,775 of 7,775 total issues
Method getErrorPage
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public String getErrorPage(String deviceType, Throwable error) {
if (!_errpgs.isEmpty()) {
final List<ErrorPage> l;
synchronized (_errpgs) {
l = _errpgs.get(deviceType);
- 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 removeRichlet0
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private Object removeRichlet0(String name) {
if (name == null) {
throw new IllegalArgumentException("Name is required");
}
Object o;
- 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 getTokenType
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private Type getTokenType(char input, CharClass inputClass) {
switch (inputClass) {
case LITERAL:
return Type.IDENTIFIER;
- 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 seekNext
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private Component seekNext() {
if (_index < 0) {
_currCtx = buildRootCtx();
} else {
if (_lookingForShadow) {
- 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 outWidgetListJavaScript
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static String outWidgetListJavaScript(String lang) {
final StringBuffer sb = new StringBuffer(4096).append("zk.wgt.WidgetInfo.register([");
boolean first = true;
for (Iterator it = LanguageDefinition.lookup(lang).getComponentDefinitions().iterator(); it.hasNext();) {
- 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 mergeJavaScript
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected byte[] mergeJavaScript(HttpServletRequest request, HttpServletResponse response, String pkgTo,
byte[] data) throws ServletException, IOException {
ByteArrayOutputStream out = null;
Device device = null;
final String deviceType = getDeviceType();
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
private void process(Session sess, HttpServletRequest request, HttpServletResponse response, PageDefinition pagedef,
String path) throws ServletException, IOException {
final WebApp wapp = sess.getWebApp();
final WebAppCtrl wappc = (WebAppCtrl) wapp;
- 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 matchPseudoClasses
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
/*package*/ static boolean matchPseudoClasses(ComponentMatchCtx context, List<PseudoClass> pseudoClasses,
Map<String, PseudoClassDef> defs) {
if (pseudoClasses == null || pseudoClasses.isEmpty())
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
Method init
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("deprecation")
public void init() throws ServletException {
final ServletConfig config = getServletConfig();
String param = config.getInitParameter("log-level");
if (param != null && param.length() > 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 setForEach
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public void setForEach(String expr, String begin, String end, String step) {
_forEach = Utils.parseList(expr, Object.class, false);
//forEach="" means to iterate a single-element array and the value
//is empty
_forEachInfo = _forEach == null ? 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 handleError
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
/*package*/ static void handleError(ServletContext ctx, HttpServletRequest request, HttpServletResponse response,
String path, Throwable err) throws ServletException, IOException {
if (Servlets.isIncluded(request)) {
final String msg = err != null
? Messages.get(MZk.PAGE_FAILED,
- 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 evalImpl
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private Object evalImpl(Page page, Component parent) {
return _impl == null ? null
: parent != null ? _impl.getValue(getEvaluator(), parent)
: page != null ? _impl.getValue(getEvaluator(), page)
: _impl.isExpression() ? null : _impl.getRawValue();
- 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 getAnnotatedPropertiesBy
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public List<String> getAnnotatedPropertiesBy(String annotName) {
if (_annots != null) {
final List<String> list = new LinkedList<String>();
for (Map.Entry<String, Map<String, List<Annotation>>> me : _annots.entrySet()) {
final String propName = me.getKey();
- 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 readObject
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
s.defaultReadObject();
final Object v = s.readObject();
if (v instanceof 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
Method initClone
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected void initClone(AbstractComponent cloneHost) {
if (_previousInsertion != null) {
if (_previousInsertion instanceof ShadowElement) {
_previousInsertion = (Component) cloneHost.getShadowRoots().get(((ComponentCtrl) _host).getShadowRoots().indexOf(_previousInsertion));
} else {
- 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 initClone
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private void initClone(AbstractComponent owner, AuxInfo clone) {
//spaceinfo (after children is cloned)
if (spaceInfo != null) {
clone.spaceInfo = owner.new SpaceInfo();
owner.cloneSpaceInfoFrom(spaceInfo);
- 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 triggerAfterHostChildRemoved
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private void triggerAfterHostChildRemoved(Component child) {
List<ShadowElement> shadowRoots = getShadowRoots();
if (!shadowRoots.isEmpty()) {
Map<Component, Integer> indexCacheMap = getIndexCacheMap(this);
try {
- 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 loadClassAnnots
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private static void loadClassAnnots(AnnotationMap annots, Class<?> klass) {
if (klass == null)
return; //nothing to do
//1. load class's
- 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 addToShadowIdMap
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private static void addToShadowIdMap(Component comp) {
if (comp instanceof ShadowElementCtrl) {
Component host = ((ShadowElementCtrl) comp).getShadowHostIfAny();
if (host != null) {
String id = comp.getId();
- 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 onListenerChange
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private void onListenerChange(Desktop desktop, boolean listen) {
if (listen) {
if (Events.isListened(this, Events.ON_CLIENT_INFO, false)) { //asap+deferrable
response(new AuClientInfo(desktop));
getDesktop().setAttribute("org.zkoss.desktop.clientinfo.enabled", 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"