Showing 7,777 of 7,777 total issues
HtmlBasedComponent
has 96 methods (exceeds 20 allowed). Consider refactoring. Open
public abstract class HtmlBasedComponent extends AbstractComponent {
/** The ZK CSS class. */
protected String _zclass;
/** The prolog content that shall be generated before real content. */
private String _prolog;
Method load
has a Cognitive Complexity of 91 (exceeds 5 allowed). Consider refactoring. Open
public final static void load(Map<? super String, ? super String> map, InputStream sm, String charset,
boolean caseInsensitive) throws IOException {
final PushbackInputStream pis = new PushbackInputStream(sm, 3);
if (charset == null || charset.startsWith("UTF")) {
final byte[] ahead = new byte[3];
- 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 addByRawValueInV6
has a Cognitive Complexity of 91 (exceeds 5 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();
- 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 tieValue
has a Cognitive Complexity of 91 (exceeds 5 allowed). Consider refactoring. Open
protected void tieValue(ELContext elCtx, Object base, Object property, Object value, boolean allownotify) {
//in order to support more complex case, ex: .stream().filter(x -> x.contains(vm.value))
final BindELContext ctx;
ELContext ec = ((EvaluationContext) elCtx).getELContext();
if (ec instanceof BindELContext)
- 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 Servlets.java
has 771 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Servlets.java
Purpose:
Description:
History:
Method equals
has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring. Open
public static final boolean equals(Object a, Object b) {
if (a == b || (a != null && b != null && a.equals(b)))
return true;
if ((a instanceof BigDecimal) && (b instanceof BigDecimal))
return ((BigDecimal)a).compareTo((BigDecimal) b) == 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 indexOf
has a Cognitive Complexity of 89 (exceeds 5 allowed). Consider refactoring. Open
public static final int indexOf(Object o, Object element) {
if (o instanceof String) {
return element instanceof String ?
((String)o).indexOf((String)element): -1;
} else if (o instanceof Collection) {
- 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 350 lines of code (exceeds 25 allowed). Consider refactoring. Open
create(context) {
const tsdocConfig = getTsdocConfig();
if (!tsdocConfig) {
return {};
}
File TrackerImpl.java
has 749 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* TrackerImpl.java
Purpose:
Description:
Method lastIndexOf
has a Cognitive Complexity of 87 (exceeds 5 allowed). Consider refactoring. Open
public static final int lastIndexOf(Object o, Object element) {
if (o instanceof String) {
return element instanceof String ?
((String)o).lastIndexOf((String)element): -1;
} else if (o instanceof List) {
- 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
Combobox
has 91 methods (exceeds 20 allowed). Consider refactoring. Open
@SuppressWarnings("serial")
public class Combobox extends Textbox {
public static final String ICON_SCLASS = "z-icon-caret-down";
private static final Logger log = LoggerFactory.getLogger(Combobox.class);
File Components.java
has 743 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Components.java
Purpose:
Description:
File mount.ts
has 742 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* mount.js
Purpose:
Description:
Method Unary
has a Cognitive Complexity of 86 (exceeds 5 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);
- 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
Execution
has 90 methods (exceeds 20 allowed). Consider refactoring. Open
public interface Execution extends Scope {
/** Returns the desktop associated with this execution.
* Each execution is against exactly one desktop.
*/
public Desktop getDesktop();
Grid
has 90 methods (exceeds 20 allowed). Consider refactoring. Open
public class Grid extends MeshElement {
private static final Logger log = LoggerFactory.getLogger(Grid.class);
private static final long serialVersionUID = 20091111L;
private static final String ATTR_ON_INIT_RENDER_POSTED = "org.zkoss.zul.Grid.onInitLaterPosted";
Method setModel
has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring. Open
public void setModel(ListModel<?> model) {
//ZK-3514: speed up
if (_model != null && _model != model) {
int threshold = Utils.getIntAttribute(this, "org.zkoss.zul.invalidateThreshold", 10, true);
int diff = Math.abs((model != null ? model.getSize() : 0) - _model.getSize());
- 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 transformer
has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring. Open
export default function transformer(file, api) {
const j = api.jscodeshift;
const root = j(file.source);
const aliases = new Map();
- 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 formatDate
has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring. Open
formatDate(val: DateImpl, fmt?: string, localizedSymbols?: zk.LocalizedSymbols): string {
if (!fmt) fmt = 'yyyy/MM/dd';
localizedSymbols ??= {
DOW_1ST: zk.DOW_1ST,
- 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 jjMoveNfa_1
has 335 lines of code (exceeds 25 allowed). Consider refactoring. Open
private int jjMoveNfa_1(int startState, int curPos)
{
int startsAt = 0;
jjnewStateCnt = 30;
int i = 1;