Showing 4,841 of 7,782 total issues
Method compare
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
public static final int compare(final Object obj0, final Object obj1)
throws ELException {
if (obj0 == obj1 || equals(obj0, obj1)) {
return 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 prepare
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
private void prepare(Object o, final int begin) {
if (begin > 0 && (o instanceof List)) {
final List l = (List) o;
final int size = l.size();
- 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 getLoadBindingsPerProperty
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
private void getLoadBindingsPerProperty(Collection<TrackerNode> nodes, String prop,
LinkedHashSet<LoadBinding> bindings, LinkedHashSet<Object> kidbases, Set<TrackerNode> visited) {
if (".".equals(prop)) { //all base object
for (TrackerNode node : nodes) {
getLoadBindings0(node, bindings, kidbases, visited);
- 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 parse0
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
private static void parse0(Context ctx, Node parent, int from, int to)
throws DspException, IOException, XelException {
boolean esc = false;
final StringBuffer sb = new StringBuffer(512);
for (int j = from; j < to; ++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
Function _scrlIntoView
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
function _scrlIntoView(outer: HTMLElement | null, inner: HTMLElement | null, info: ScrollIntoViewInfo | undefined, excludeHorizontal: boolean): ScrollIntoViewInfo {
if (outer && inner) {
var ooft = zk(outer).revisedOffset(),
ioft = info ? info.oft : zk(inner).revisedOffset(),
top = ioft[1] - ooft[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
Function create
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
create(context) {
function checkTypeSyntax(node: TSESTree.TSTypeAnnotation | TSESTree.TSTypeAssertion | TSESTree.TSAsExpression) {
if (node.typeAnnotation.type === AST_NODE_TYPES.TSNullKeyword) {
context.report({
node: 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 coerce
has 163 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static Object coerce(Class<?> cls, Object val)
throws ClassCastException {
if (cls.isInstance(val))
return val;
DesktopCtrl
has 47 methods (exceeds 20 allowed). Consider refactoring. Open
public interface DesktopCtrl {
/** Returns the request queue.
*/
public RequestQueue getRequestQueue();
File ForEachImpl.java
has 437 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* ForEachImpl.java
Purpose:
Description:
Method LambdaParameters
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
final public void LambdaParameters() throws ParseException {
/*@bgen(jjtree) LambdaParameters */
AstLambdaParameters jjtn000 = new AstLambdaParameters(JJTLAMBDAPARAMETERS);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
- 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 mergeSubTree
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
protected void mergeSubTree() {
List<HtmlShadowElement> children = getChildren();
if (children == null || children.isEmpty())
return; // nothing to do.
if (_parent != 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 parse
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public PageDefinition parse(Document doc, String extension) throws Exception {
//1. parse the page and import directive if any
final List<ProcessingInstruction> pis = new LinkedList<ProcessingInstruction>();
final List<String[]> imports = new LinkedList<String[]>();
final List<String> impclses = new LinkedList<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
ComponentCtrl
has 46 methods (exceeds 20 allowed). Consider refactoring. Open
public interface ComponentCtrl {
/**
* For page attached callback, use in {@link #addCallback(String, Callback)}
*/
public static String AFTER_PAGE_ATTACHED = "afterPageAttached";
Clients
has 46 methods (exceeds 20 allowed). Consider refactoring. Open
public class Clients {
/** Sends an AU response ({@link AuResponse}) to the client.
* It is the same as <code>response(response.getOverrideKey(), response)</code>.
*
* @since 3.0.0
UiVisualizer
has 46 methods (exceeds 20 allowed). Consider refactoring. Open
/*package*/ class UiVisualizer implements Visualizer {
// private static final Logger log = LoggerFactory.getLogger(UiVisualizer.class);
/** The parent exec info. */
private final UiVisualizer _parent;
Selectbox
has 46 methods (exceeds 20 allowed). Consider refactoring. Open
@SuppressWarnings("serial")
public class Selectbox extends HtmlBasedComponent implements Disable {
private String _name;
private boolean _disabled;
Function fixFlex
has 158 lines of code (exceeds 25 allowed). Consider refactoring. Open
fixFlex(wgt: zk.Widget): void {
let hflexWgt;
if (wgt._flexFixed || (!wgt._nvflex && !wgt._nhflex)) { //other vflex/hflex sibliing has done it!
delete wgt._flexFixed;
return;
Method parseEventExpression
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public static Object[] parseEventExpression(Component comp, String evtexpr, Component defaultComp, boolean deferred)
throws ComponentNotFoundException {
final int j = evtexpr.lastIndexOf('.');
final String evtnm;
Object 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 service
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public void service(HttpServletRequest request, HttpServletResponse response, String path)
throws ServletException, java.io.IOException {
String resourceCache = Library.getProperty("org.zkoss.zk.WCS.cache");
if (resourceCache != null && "false".equalsIgnoreCase(resourceCache))
- 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 toHTML
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public String toHTML(PageDefinition pgdef, Page page) {
final Evaluator eval = pgdef.getEvaluator();
if (_cond != null && !_cond.isEffective(eval, page))
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"