Showing 4,841 of 7,782 total issues
Method setShadowHost
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public void setShadowHost(Component host, Component insertBefore) {
if (getParent() != null) {
throw new UiException("As a shadow child cannot be a shadow root. [" + this + "]");
}
if (host == 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 removeRedundant
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
private void removeRedundant() {
int initsz = (_invalidated.size() + _attached.size()) / 2 + 30;
final Set<Component> ins = new HashSet<Component>(initsz), //one of ancestor in _invalidated or _attached
outs = new HashSet<Component>(initsz); //none of ancestor in _invalidated nor _attached
final List<Component> ancs = new ArrayList<Component>(50);
- 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 addInfo
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public void addInfo(JSONObject info) {
Object type = info.get("type");
if (!_startLine) {
out("=======================================");
- 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 progressbox
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
static progressbox(id: string, msg: string, mask?: boolean, icon?: string, opts?: Partial<ProgressboxOptions>): void {
if (mask && zk.Page.contained.length) {
for (var c = zk.Page.contained.length, e = zk.Page.contained[--c]; e; e = zk.Page.contained[--c]) {
if (!e._applyMask)
e._applyMask = new zk.eff.Mask({
- 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 numfmt.ts
has 427 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* numfmt.ts
Purpose:
Description:
File jquery.transit.js
has 425 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* jQuery Transit - CSS3 transitions and transformations
* (c) 2011-2014 Rico Sta. Cruz
* MIT Licensed.
*
Classes
has 45 methods (exceeds 20 allowed). Consider refactoring. Open
public class Classes {
private static final Logger log = LoggerFactory.getLogger(Classes.class);
private static final Object NOT_FOUND = new Object();
Servlets
has 45 methods (exceeds 20 allowed). Consider refactoring. Open
public class Servlets {
private static final Logger log = LoggerFactory.getLogger(Servlets.class);
private static ClientIdentifier _clientId;
private static final Pattern _rwebkit = Pattern.compile(".*(webkit)[ /]([\\w.]+).*"),
File ListModelListProxy.java
has 421 lines of code (exceeds 250 allowed). Consider refactoring. Open
/** ListModelListProxy.java.
Purpose:
Description:
Method meterAuClient
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
private static void meterAuClient(PerformanceMeter pfmeter, Execution exec, String hdr, boolean complete) {
for (int j = 0;;) {
int k = hdr.indexOf(',', j);
String ids = k >= 0 ? hdr.substring(j, k) : j == 0 ? hdr : hdr.substring(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 setSort
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
public void setSort(String type) {
if (type == null)
return;
if (type.startsWith("client")) {
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 setSort
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
public void setSort(String type) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
if (type == null)
return;
if (type.startsWith("client")) {
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 setSelectedIndex
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("rawtypes")
public void setSelectedIndex(int jsel) {
final int isz = _items.size();
final int tsz = _model != null ? _model.getSize() : isz;
if (jsel >= tsz)
- 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 grad
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
private static String grad(String dir, Browser template, String[] colors) {
if ("|ver|hor|diag-|diag+|rad|".indexOf("|" + dir + "|") == -1)
throw new IllegalArgumentException("Type must be ver, hor, diag-, diag+, or rad.");
if (colors.length < 2)
throw new IllegalArgumentException("Please specify more than two colors.");
- 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 resolveVariable
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
public Object resolveVariable(String name) throws XelException {
if ("pageContext".equals(name)) {
return getPageContext();
} else if ("pageScope".equals(name)) {
- 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 parseRange
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
private static int[] parseRange(String range) {
range = range.toLowerCase(java.util.Locale.ENGLISH);
for (int j = 0, k, len = range.length(); (k = range.indexOf("bytes", j)) >= 0;) {
for (k += 5; k < len;) {
char cc = range.charAt(k++);
- 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 addListener
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void addListener(Class<?> klass) throws Exception {
boolean added = false;
Object listener = null;
if (Monitor.class.isAssignableFrom(klass)) {
Method write
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static void write(HttpServletRequest request, HttpServletResponse response, Media media, boolean download,
boolean repeatable) throws IOException {
//2012/03/09 TonyQ: ZK-885 Iframe with PDF stop works in IE 8 when we have Accept-Ranges = bytes.
if (!Servlets.isBrowser(request, "ie")) {
File effect.ts
has 419 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* effect.ts
Purpose:
Description:
Slider
has 44 methods (exceeds 20 allowed). Consider refactoring. Open
public class Slider extends XulElement {
private String _orient = "horizontal", _mode = INTEGER;
private Double _curpos = 0.0, _minpos = 0.0, _maxpos = 100.0, _pginc = -1.0, _step = -1.0;
/** The name. */
private String _name;