Showing 4,841 of 7,782 total issues
Method enableServerPush0
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
private boolean enableServerPush0(ServerPush sp, boolean enable) {
if (_sess == null)
throw new IllegalStateException("Server push cannot be enabled in a working thread");
final boolean serverPushAlreadyExists = _spush != 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 addResponsesForCreatedPerSiblings
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
private static void addResponsesForCreatedPerSiblings(List<AuResponse> responses, Set<Component> newsibs,
Map<Component, Set<? extends Component>> croppingInfos) throws IOException {
final Component parent;
final Page page;
{
- 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 initRendererIfAny
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
private void initRendererIfAny(Component comp, String attr) {
final Object installed = comp.getAttribute(BinderCtrl.RENDERER_INSTALLED);
if (installed != null) { //renderer was set already init
return;
}
- 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 setPaginal
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public void setPaginal(Paginal pgi) {
if (!Objects.equals(pgi, _pgi)) {
final Paginal old = _pgi;
_pgi = pgi; //assign before detach paging, since removeChild assumes it
- 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 setPaginal
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public void setPaginal(Paginal pgi) {
if (!Objects.equals(pgi, _pgi)) {
final Paginal old = _pgi;
_pgi = pgi; //assign before detach paging, since removeChild assumes it
- 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 setPaginal
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public void setPaginal(Paginal pgi) {
if (!Objects.equals(pgi, _pgi)) {
final Paginal old = _pgi;
_pgi = pgi; // assign before detach paging, since removeChild
// assumes it
- 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 doProcess
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function doProcess(cmd: string, data: ({ $u?: string } & zk.Widget | undefined)[]): void { //decoded
if (!dataNotReady(cmd, data)) {
if (!zAu.processPhase) {
zAu.processPhase = cmd;
}
- 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 tabbox$mold$
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function tabbox$mold$(out) {
var icon = this.$s('icon'),
uuid = this.uuid,
tabscroll = this.isTabscroll(),
tabs = this.tabs,
- 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 isRoundingRequired
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
isRoundingRequired(val: string | number, fmt: string, localizedSymbols?: zk.LocalizedSymbols): boolean {
if (!fmt || val == null || val == '')
return false;
var useMinsuFmt;
- 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 _escapeQuote
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
_escapeQuote(fmt: string, localizedSymbols: zk.LocalizedSymbols): Efmt {
//note we do NOT support mixing of quoted and unquoted percent
var cc, q = -2, shift = 0, ret = '', jdot = -1, purejdot = -1, pure = '', prej = -1,
validPercent = fmt ? !new RegExp('(\'[' + localizedSymbols.PERCENT + '|' + localizedSymbols.PER_MILL + ']+\')', 'g').test(fmt) : true;
//note we do NOT support mixing of quoted and unquoted percent|permill
- 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 ListModelSetProxy.java
has 357 lines of code (exceeds 250 allowed). Consider refactoring. Open
/** ListModelSetProxy.java.
Purpose:
Description:
CacheMap
has 35 methods (exceeds 20 allowed). Consider refactoring. Open
public class CacheMap<K,V> implements Map<K,V>, Cache<K,V>, java.io.Serializable, Cloneable {
private static final long serialVersionUID = 20070907L;
//private static final Logger log = LoggerFactory.getLogger(CacheMap.class);
/** The map to store the mappings. */
HtmlPageRenders
has 35 methods (exceeds 20 allowed). Consider refactoring. Open
public class HtmlPageRenders {
// private static final Logger log = LoggerFactory.getLogger(HtmlPageRenders.class);
/** Denotes whether style sheets are generated for this request. */
private static final String ATTR_LANG_CSS_GENED = "javax.zkoss.zk.lang.css.generated";
ValidationMessagesImpl
has 35 methods (exceeds 20 allowed). Consider refactoring. Open
public class ValidationMessagesImpl implements ValidationMessages, Collection<Object>, Serializable {
//this class implement collection to support empty expression in EL
private static final long serialVersionUID = 1L;
// null objects
Column
has 35 methods (exceeds 20 allowed). Consider refactoring. Open
public class Column extends HeaderElement {
private String _sortDir = "natural";
private transient Comparator<?> _sortAsc, _sortDsc;
private String _sortAscNm = "none";
private String _sortDscNm = "none";
Method getMethod
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
@SuppressWarnings("null")
public static Method getMethod(Object base, Object property,
Class<?>[] paramTypes, Object[] paramValues)
throws MethodNotFoundException {
if (base == null || property == null) {
Function exit
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
exit(rootPath) {
let _dir = this.file.opts.filename.replace(/-/g, '_').split('/'),
_jsLoc = _dir.findIndex(x => x === 'js'),
_file = _dir[_dir.length - 1],
_privateVars = new Set(),
File Treecol.java
has 352 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Treecol.java
Purpose:
Description:
Method Unary
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
final public void Unary() throws ParseException {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case MINUS:
jj_consume_token(MINUS);
AstNegative jjtn001 = new AstNegative(JJTNEGATIVE);
Method parseItems
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void parseItems(final PageDefinition pgdef, final NodeInfo parent, Collection items,
AnnotationHelper annHelper, boolean bNativeContent) throws Exception {
LanguageDefinition parentlang = getLanguageDefinition(parent);
if (parentlang == null)
parentlang = pgdef.getLanguageDefinition();