Showing 4,841 of 7,782 total issues
Method processGlobalCommandBinding
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private void processGlobalCommandBinding(Component comp, String propName) {
final ComponentCtrl compCtrl = (ComponentCtrl) comp;
final Collection<Annotation> anncol = compCtrl.getAnnotations(propName, GLOBAL_COMMAND_ANNO);
if (anncol.size() == 0)
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 parseValidator
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private ExpressionAnnoInfo parseValidator(Component comp, String propName) {
final Collection<Annotation> annos = ((ComponentCtrl) comp).getAnnotations(propName, VALIDATOR_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"
Further reading
Method processCommandBinding
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private void processCommandBinding(Component comp, String propName) {
final ComponentCtrl compCtrl = (ComponentCtrl) comp;
final Collection<Annotation> anncol = compCtrl.getAnnotations(propName, COMMAND_ANNO);
if (anncol.size() == 0)
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 parseTemplate
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private ExpressionAnnoInfo parseTemplate(Component comp, String propName) {
final Collection<Annotation> annos = ((ComponentCtrl) comp).getAnnotations(propName, TEMPLATE_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"
Further reading
Method processAllComponentsBindings
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private void processAllComponentsBindings(Component comp) {
final Binder selfBinder = BinderUtil.getBinder(comp);
//check if a component was binded already(by any binder)
if (selfBinder != null) //this component already binded ! skip all of its children
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 contains
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public boolean contains(Object o) {
if (!(o instanceof Map.Entry)) {
return false;
}
Map.Entry entry = (Map.Entry) 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 containsKey
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public boolean containsKey(Object key) {
if (key == null) {
key = KeyFactory.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 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 initMatchMediaValues
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private Map<String, Method> initMatchMediaValues(Object viewModel) {
Map<String, Method> values = new HashMap<>(6);
for (Method m : BindUtils.getViewModelClass(viewModel).getMethods()) {
MatchMedia annomm = ViewModelAnnotationResolvers.getAnnotation(m, MatchMedia.class);
if (annomm != 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 loadComponent0
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected void loadComponent0(Component comp, boolean loadinit) {
loadComponentProperties0(comp, loadinit);
final Map<String, List<Binding>> compBindings = _bindings.get(comp);
if (_activating || compBindings == null || !compBindings.keySet().contains(CHILDREN_ATTR)) {
- 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 load
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public void load(BindContext ctx) {
final Component comp = getComponent(); //ctx.getComponent();
final BindEvaluatorX eval = getBinder().getEvaluatorX();
final BindingExecutionInfoCollector collector = ((BinderCtrl) getBinder()).getBindingExecutionInfoCollector();
- 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 newLoadPropertyBinding
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
protected LoadPropertyBinding newLoadPropertyBinding(Component comp, String attr, String loadAttr,
Class<?> attrType, String loadExpr, ConditionType conditionType, String command,
Map<String, Object> bindingArgs, String converterExpr, Map<String, Object> converterArgs) {
Method addPropertySaveBindings0
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
private void addPropertySaveBindings0(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 doPropertyChange
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private void doPropertyChange(Object base, String prop) {
if (_log.isDebugEnabled()) {
_log.debug("doPropertyChange: base=[{}],prop=[{}]", base, 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 doGlobalCommandExecute
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private void doGlobalCommandExecute(Component comp, String command, Map<String, Object> commandArgs,
BindContext ctx, Set<Property> notifys) {
String debugInfo = MessageFormat.format("doGlobalCommandExecute comp=[{0}],command=[{1}]", comp, command);
try {
if (_log.isDebugEnabled()) {
- 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 removeChild
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public boolean removeChild(Component child) {
if (_paging == child && _pgi == child && inPagingMold())
throw new IllegalStateException(
"The paging component cannot be removed manually. It is removed automatically when changing the mold");
//Feature 1906110: prevent developers from removing it accidently
- 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 dumpBeanMap
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private void dumpBeanMap(boolean dumpNodes) {
System.out.println("******* _beanMap: *********");
System.out.println("******* size: " + _beanMap.size());
for (Object bean : _beanMap.keySet()) {
System.out.println("bean:" + bean + "------------");
- 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 parseConstraint
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected int parseConstraint(String constraint) throws UiException {
int minIndex = constraint.indexOf("min");
int maxIndex = constraint.indexOf("max");
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 setSortDirection
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public void setSortDirection(String sortDir) throws WrongValueException {
if (sortDir == null
|| (!"ascending".equals(sortDir) && !"descending".equals(sortDir) && !"natural".equals(sortDir)))
throw new WrongValueException("Unknown sort direction: " + sortDir);
if (!Objects.equals(_sortDir, sortDir)) {
- 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 addVisibleItemCount
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
void addVisibleItemCount(int count) {
if (inPagingMold()) {
Paginal pgi = getPaginal();
int totalSize = pgi.getTotalSize() + count;
//ZK-3173: if visible item count reduces, active page might exceed max page count
- 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"