Showing 4,841 of 7,782 total issues
File ValidationMessagesImpl.java
has 296 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* ValidationMessagesImpl.java
Purpose:
Description:
Method nextSeparator
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public static int nextSeparator(String src, int from, char[] separators,
boolean escBackslash, boolean escQuot, boolean quotAsSeparator,
boolean parenthesis) {
boolean esc = false;
char quot = (char)0, endparen;
- 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 nextToken
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public static final Result nextToken(String src, int from,
char[] separators, boolean escBackslash, boolean quotAsToken,
boolean parenthesis)
throws IllegalSyntaxException {
final int len = src.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 setValue
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public void setValue(ELContext context, Object base, Object property,
Object value) {
if (context == null) {
throw new NullPointerException();
}
- 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 importStatic
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public void importStatic(String name) throws org.zkoss.zel.ELException {
int lastPeriod = name.lastIndexOf('.');
if (lastPeriod < 0) {
throw new ELException(Util.message(
- 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 getValue
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public Object getValue(EvaluationContext ctx) throws ELException {
ctx.putContext(AstValue.class, new Integer(this.jjtGetNumChildren()));
ctx.putContext(Node.class, this.children[0]); //20110905, henrichen: bind property node
Object base = this.children[0].getValue(ctx);
ctx.putContext(Node.class, this.children[0]); //20110905, henrichen: bind property node
- 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 equals
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public static final boolean equals(final Object obj0, final Object obj1)
throws ELException {
if (obj0 == obj1) {
return true;
} else if (obj0 == null || obj1 == 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 updateCol
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public void updateCol(String id, int col){
DefaultTreeNode<TestObject> rootNode;
if (id.startsWith("Row A") || id.startsWith("SubRow A")) {
rootNode=(DefaultTreeNode<TestObject>)mymodelA.getRoot();
} 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 updateCol
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public void updateCol(Event event, int col) {
DefaultTreeNode<TestObject> rootNode;
String id = (String) event.getData();
if (id.startsWith("Row A") || id.startsWith("SubRow A")) {
rootNode = (DefaultTreeNode<TestObject>) mymodelA.getRoot();
- 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 22 (exceeds 5 allowed). Consider refactoring. Open
private void handleError(Session sess, RenderRequest request, RenderResponse response, String path, Throwable err,
String msg) throws PortletException, IOException {
// ZK-3679
Throwable cause;
if (err instanceof OperationException && (cause = err.getCause()) instanceof Expectable)
- 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 getCommonSeqLength
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
private static int getCommonSeqLength(List<Selector> list) {
List<String> strs = null;
int max = 0;
for (Selector selector : list) {
if (strs == 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 onEvent
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public void onEvent(Event event) {
final ForwardInfo info = _auxinf.forwards.get(_orgEvent);
if (info != null)
for (TargetInfo ti : new ArrayList<TargetInfo>(info.targets)) {
Component target = resolveForwardTarget(ti.target);
- 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 doInit
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
public static final Initiators doInit(PageDefinition pagedef, Page page, Initiator[] sysinits) {
if (sysinits != null)
try {
for (int j = 0; j < sysinits.length; ++j)
- 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 doAfterCompose
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public void doAfterCompose(Page page, Component[] comps) throws Exception {
if (_sysinitEx)
for (int j = 0; j < _sysinits.length; ++j) {
final Initiator init = _sysinits[j];
if (init instanceof InitiatorExt) {
- 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 crop
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
private void crop(Set coll, Map<Component, Set<? extends Component>> croppingInfos, boolean bResponse) {
for (Iterator it = coll.iterator(); it.hasNext();) {
final Object o = it.next();
if (!(o instanceof Component))
continue;
- 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 resumeAll
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
private void resumeAll(Desktop desktop, UiVisualizer uv, List<Throwable> errs) {
//We have to loop because a resumed thread might resume others
while (!_resumed.isEmpty()) { //no need to sync (better performance)
final List<EventProcessingThreadImpl> list;
synchronized (_resumed) {
- 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 execSwitch
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
private static Component[] execSwitch(CreateInfo ci, ZkInfo switchInfo, Component parent, Component insertBefore) {
final Page page = ci.page;
if (!switchInfo.getChildren().isEmpty()) {
final Object switchCond = switchInfo.resolveSwitch(page, parent);
- 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 render
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public void render(final Comboitem item, final Object data, final int index) throws Exception {
final Combobox cb = (Combobox) item.getParent();
final ListModel<?> model = cb.getModel();
final int size = model.getSize();
final Template tm = resolveTemplate(cb, item, data, index, size, "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 afterUnmarshal
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
private void afterUnmarshal(int cnt) {
for (Iterator it = getChildren().iterator(); it.hasNext();) {
final Object child = it.next();
if (child instanceof Rows) {
_rows = (Rows) child;
- 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 writeObject
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
private synchronized void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
s.defaultWriteObject();
boolean written = false;
if (_sortAsc instanceof RowComparator) {
- 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"