Showing 4,841 of 7,782 total issues
Menuitem
has 29 methods (exceeds 20 allowed). Consider refactoring. Open
public class Menuitem extends LabelImageElement implements org.zkoss.zk.ui.ext.Disable,
org.zkoss.zk.ui.ext.Uploadable {
private AuxInfo _auxinf;
static {
Scrollbar
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
@zk.WrapClass('zul.Scrollbar')
export class Scrollbar extends zk.Object {
/** The container object for this scrolling that user can scroll the whole content
* @type DOMElement
*/
Function update
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
function update(source) {
var duration = d3.event && d3.event.altKey ? 5000 : 500;
// Compute the new tree layout.
var nodes = tree.nodes(root).reverse();
Function _sanitizeAttributes
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
/* Execute a hook if present */
_executeHook('beforeSanitizeAttributes', currentNode, null);
const {
attributes
Method newInstance
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static ExpressionFactory newInstance(Properties properties) {
ExpressionFactory result = null;
ClassLoader tccl = ClassUtil.getContextClassLoader(ExpressionFactory.class);
Method jjStopStringLiteralDfa_1
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
private final int jjStopStringLiteralDfa_1(int pos, long active0)
{
switch (pos)
{
case 0:
Method jjStopStringLiteralDfa_2
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
private final int jjStopStringLiteralDfa_2(int pos, long active0)
{
switch (pos)
{
case 0:
Method parse
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void parse(Element root, Configuration config, Locator locator) throws Exception {
l_out: for (Iterator it = root.getElements().iterator(); it.hasNext();) {
final Element el = (Element) it.next();
final String elnm = el.getName();
// B65-ZK-1671: ThemeProvider specified in metainfo/zk/zk.xml may get overridden by default
File DHtmlLayoutPortlet.java
has 310 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* DHtmlLayoutPortlet.java
Purpose:
Description:
Method addByRawValueInV6
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void addByRawValueInV6(String annotName, String rval,
Location loc) {
final Map<String, String[]> attrs = new LinkedHashMap<String, String[]>(
4);
final int len = rval.length();
File BindELContext.java
has 310 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* BindELContext.java
Purpose:
Description:
Method resolve
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
protected Object resolve(ELContext ctx, Object base, Object property) {
VariableResolver resolver = _ctx.getVariableResolver();
if (resolver != null) {
if (resolver instanceof VariableResolverX) {
final Object o = ((VariableResolverX)resolver)
- 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 getFormat0
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
private String getFormat0() throws IOException {
String format = null;
if (_data != null) {
try {
format =
- 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 unwrap
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public static final Throwable unwrap(Throwable ex) {
for (;;) {
if (ex instanceof InvocationTargetException)
ex = ex.getCause(); //might returns UndeclaredThrowableException
else if (ex instanceof UndeclaredThrowableException)
- 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 looselyCast
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
private static Object looselyCast(Class type, Object arg) {
if (type == Integer.class || type == int.class) {
if (arg instanceof Number)
return ((Number) arg).intValue();
} else if (type == Long.class || type == long.class) {
- 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 a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public static Object coerce(Class<?> cls, Object val, boolean nullable)
throws ClassCastException {
if (nullable || val != null)
return coerce(cls, val);
- 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 applyForward0
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
private static final void applyForward0(Component comp, String orgEvent, String cond) {
int len;
if (cond == null || (len = cond.length()) == 0)
len = (cond = orgEvent).length();
//if condition not specified, assume same as orgEvent (to space owenr)
- 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 next
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public boolean next() {
if (_done)
throw new IllegalStateException("Iterate twice not allowed");
if (_status == 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 doView
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
protected void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
//try parameter first and then attribute
boolean bRichlet = false;
String path = request.getParameter(ATTR_PAGE);
if (path == 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 parseZScript
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
private void parseZScript(NodeInfo parent, Element el, AnnotationHelper annHelper) {
if (el.getAttributeItem("forEach") != null)
throw new UiException(message("forEach not applicable to <zscript>", el));
if (annHelper.clear())
log.warn(message("Annotations are ignored since <zscript> doesn't support them", el));
- 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"