Showing 4,841 of 7,782 total issues
Audio
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
public class Audio extends XulElement implements MediaElement {
/**
* Represent the stop state
* @since 9.6.0
*/
Img
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
public class Img extends AbstractAction {
private String _id, _onclick;
private String _src, _height, _width, _border, _hspace, _vspace;
private String _align, _title, _alt, _sclass, _style;
Method parseComponentDirective
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void parseComponentDirective(PageDefinition pgdef, ProcessingInstruction pi, Map<String, String> params)
throws Exception {
final String name = params.remove("name");
noELnorEmpty("name", name, pi);
Method addInfo
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void addInfo(JSONObject info) {
Object type = info.get("type");
if (!_startLine) {
out("=======================================");
Method syncModel0
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void syncModel0(int offset, int limit) {
int min = offset;
int max = offset + limit - 1;
final ListModel _model = _listbox.getModel();
Method setModel
has 83 lines of code (exceeds 25 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());
Method parseShadowElement
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static NodeInfo parseShadowElement(PageDefinition pgdef, NodeInfo parent, Element el,
AnnotationHelper annHelper) throws Exception {
String ifc = null, unless = null, name = el.getLocalName();
AnnotationHelper attrAnnHelper = null;
final LanguageDefinition lookup = LanguageDefinition.lookup("xul/html");
Method init
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void init(Object context, Configuration config) {
if (_config != null)
throw new IllegalStateException("Cannot be initialized twice");
if (config == null)
throw new IllegalArgumentException("null");
Method syncModel
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void syncModel(int offset, int limit) {
int min = offset;
int max = offset + limit - 1;
final ListModel model = _grid.getModel();
Method coerceToNumber
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
protected static final Number coerceToNumber(final Number number,
final Class<?> type) throws ELException {
if (Long.TYPE == type || Long.class.equals(type)) {
return Long.valueOf(number.longValue());
}
- 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 buildCompCtx0
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
private ComponentMatchCtx buildCompCtx0(ComponentMatchCtx ctx) {
for (Selector selector : _selectorList) {
int i = selector.getSelectorIndex();
int posEnd = _posOffset > 0 ? _posOffset - 1 : 0;
int len = selector.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 processWpdForSourcemapIfAny
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
private String processWpdForSourcemapIfAny(List<String> paths, String originalPathPrefix, String path) throws Exception {
final Content content = (Content) _cache.get(path);
if (content == null) {
log.error("Failed to load the resource: " + path);
throw new java.io.FileNotFoundException("Failed to load the resource: " + path);
- 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 buildNextShadowRootSiblingCtx
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
private ComponentMatchCtx buildNextShadowRootSiblingCtx(ComponentMatchCtx ctx, HtmlShadowElement htmlShadowElement) {
ctx.moveToNextShadowSibling(htmlShadowElement);
//TODO need to match selectors
for (Selector selector : _selectorList) {
int i = selector.getSelectorIndex();
- 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 getClass
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
protected CharClass getClass(Character c) {
if (_inDoubleQuote && (_escaped || c != '"'))
return CharClass.LITERAL;
- 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 adjustInsertionForInsertBefore
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
private boolean adjustInsertionForInsertBefore(HtmlShadowElement se, Component target, Component insertBefore) {
Component old = null;
Direction direction = inRange(se, insertBefore);
switch (direction) {
case PREVIOUS:
- 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 clearChildren
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public void clearChildren() {
AbstractComponent hostIfAny = (AbstractComponent) getShadowHostIfAny();
try {
if (hostIfAny != null) {
hostIfAny.disableHostChanged();
- 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 setPageBefore
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public void setPageBefore(Page page, Component refRoot) {
beforeComponentPageChanged(page);
if (refRoot != null && (page == null || refRoot.getParent() != null || refRoot.getPage() != page))
refRoot = null;
if (refRoot != null /*&& refRoot.getPage() == page (checked)*/
- 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 getAttributes
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public Map<String, Object> getAttributes(int scope) {
switch (scope) {
case SPACE_SCOPE:
if (this instanceof IdSpace)
return getAttributes();
- 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 redraw
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public void redraw(final Writer out) throws IOException {
final int order = ComponentRedraws.beforeRedraw(false);
final boolean aupg = isAsyncUpdate();
final String extra;
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 resolveParameter
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
protected Object resolveParameter(Annotation[] parmAnnos, Class<?> paramType, Method method, int index) {
Object val = null;
boolean hitResolver = false;
Default defAnno = null;
for (Annotation anno : parmAnnos) {
- 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"