Showing 4,841 of 7,782 total issues
Method insertBefore
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public boolean insertBefore(Component newChild, Component refChild) {
if (newChild instanceof Treecols) {
if (super.insertBefore(newChild, refChild)) {
_treecols = (Treecols) newChild;
return true;
Method compare
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public int compare(Object o1, Object o2) {
if (_index < 0 && _column != null) //decide the index
_index = _column.getParent().getChildren().indexOf(_column);
Object v1, v2;
Function squarify
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function squarify(node) {
var children = node.children;
if (children && children.length) {
var rect = pad(node),
row = [],
Function _initDocument
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
const _initDocument = function _initDocument(dirty) {
/* Create a HTML document */
let doc = null;
let leadingWhitespace = null;
if (FORCE_BODY) {
Function handler
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
handler: function( event ) {
var notAsync, result,
saved = dataPriv.get( this, type );
if ( ( event.isTrigger & 1 ) && this[ type ] ) {
Function pushReqCmds
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function pushReqCmds(reqInf: AuRequestInfo, response: AuResponse): boolean {
var dt = reqInf.dt,
rt = response.responseText;
if (!rt) {
if (zk.pfmeter) zAu._pfdone(dt, zAu.pfGetIds(response));
Function onURLChange
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
onURLChange(): void { //called by mount.js
try {
const ifr = window.frameElement as HTMLIFrameElement;
if (!parent || parent == window || !ifr) //not iframe
return;
Function _keyDataKey
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
_keyDataKey(this: JQuery.KeyboardEventBase): string {
// Ref: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values
var key = this.originalEvent!.key;
switch (key) {
case 'Scroll': return 'ScrollLock';
Function _cmOffset
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _cmOffset(el: HTMLElement): zk.Offset {
var t = 0, l = 0, operaBug;
//Fix gecko difference, the offset of gecko excludes its border-width when its CSS position is relative or absolute
if (zk.gecko) {
var p = el.parentElement;
Function create
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
create(context) {
function checkBooleanTypeSyntax(node: TSESTree.TSTypeAnnotation | TSESTree.TSTypeAssertion | TSESTree.TSAsExpression) {
if (node.typeAnnotation.type === AST_NODE_TYPES.TSUnionType) {
let booleanType: TSESTree.TSBooleanKeyword | null | undefined;
for (const t of node.typeAnnotation.types) {
Function create
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
create(context) {
return {
CallExpression(node) {
const { callee } = node;
if (callee.type !== AST_NODE_TYPES.MemberExpression ||
Method indexOfUnderline
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static int indexOfUnderline(String s, int j) {
int k, last = s.length() - 2;
for (;(k = s.indexOf('_', j)) >= 0 && k < last; j = k + 1) {
char cc = s.charAt(k + 1);
if (cc < 'a' || cc > 'z') continue; //not found
- 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 equals
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof Map.Entry))
return false;
Map.Entry e = (Map.Entry)o;
- 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 getContentType
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static final String getContentType(String format) {
if (format == null)
return null;
format = format.trim().toLowerCase(java.util.Locale.ENGLISH);
- 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 valueOf
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static final String valueOf(Node node) {
if (node instanceof Item) {
String v = ((Item)node).getText();
return v != null ? v: "";
}
- 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 defaultResolveEntity
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected InputSource defaultResolveEntity(String publicId, String systemId)
throws SAXException {
if (systemId == null)
return 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 setContent
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public final Object setContent(String path, Object obj) {
Element e = this;
int j = 0;
while (true) {
int k = path.indexOf('/', 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 set
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings({ "unchecked", "rawtypes" })
public static final void set(Object obj, String name, Object val,
boolean autoCoerce) throws NoSuchMethodException {
try {
AccessibleObject acs;
- 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 toAttributeName
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static final String toAttributeName(String methodName) {
int len = methodName.length();
if (len < 2)
return 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 checkAdd
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private void checkAdd(Attribute newItem, Attribute other, boolean replace) {
//first, remove any existent with the same uri and name
if (newItem.getOwner() != null)
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR,
"Attribute, "+newItem.toString()+", owned by other; detach or clone it", getLocator());
- 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"