Showing 4,841 of 7,782 total issues
Function _deconstructPacket
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function _deconstructPacket(data: ArrayBufferView | unknown & { buffer?} | undefined, buffers: unknown[]): unknown {
if (!data) return data;
if (_isBinary(data)) {
const placeholder = { _placeholder: true, num: buffers.length };
Function _swipeEnd
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
_swipeEnd(devt: JQuery.TriggeredEvent): void {
jq(this.node).off(moveEvt, this.proxy(this._swipeMove));
if (start && stop && this.opts) {
var dispX: number | undefined, dispY: number | undefined,
dispT = stop.time - start.time, dir: 'left' | 'right' | 'up' | 'down' | undefined;
Function snap
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function snap(dg: zk.Draggable, pointer: zk.Offset): zk.Offset {
var x = pointer[0],
y = pointer[1];
if (dg._isVer) {
var move = y;
Function CallExpression
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
CallExpression(node) {
const { callee } = node;
if (callee.type !== AST_NODE_TYPES.MemberExpression ||
callee.object.type !== AST_NODE_TYPES.Identifier ||
callee.object.name !== 'zk' ||
Function isParameter
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
isParameter: function (node: TSESTree.Node, expr: TSESTree.Node) {
if (expr.type === 'CallExpression') {
// Check whether any of the call arguments equals the node.
Function AssignmentExpression
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
AssignmentExpression: function (node) {
const left = node.left as TSESTree.Expression & {property?: {name: string}, object: {name: string, property?: TSESTree.Identifier}};
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
const isHref: boolean = left.property?.name === 'href';
if (!isHref) {
Method filterStyle
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private String filterStyle(String style) {
if (style != null) {
final int j = HTMLs.getSubstyleIndex(style, "display");
if (j >= 0) { // display is specified
super.setVisible(!"none".equals(HTMLs.getSubstyleValue(style, 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 getLocale
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static final Locale getLocale(String localeString, char separator) {
if (localeString == null)
return null;
if (separator == (char)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 getEvaluatorClass
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
public static final Class<? extends ExpressionFactory> getEvaluatorClass(String name) {
if (name == null || name.length() == 0)
throw new IllegalArgumentException("empty or 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 locate
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static final String locate(String flnm) {
int j = flnm.indexOf('*');
if (j < 0) return flnm;
final String postfix = flnm.substring(j + 1);
- 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 getOutputStream
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private OutputStream getOutputStream() {
if (_out == null)
return _nobuf ? null: (_out = new ByteArrayOutputStream());
//it is possible _membufsz <= 0, but OK to use memory first
- 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 normalize
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static final String normalize(String parentPath, String childPath) {
if (childPath == null || childPath.length() == 0)
return normalize(parentPath);
if ((parentPath == null || parentPath.length() == 0)
|| childPath.charAt(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 getDateFormat
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static
String getDateFormat(int style, Locale locale, String defaultFormat) {
if (locale == null)
locale = Locales.getCurrent();
- 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 getWriter
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private Writer getWriter() throws IOException {
if (_out == null)
return _nobuf ? null: (_out = new StringWriter());
//it is possible _membufsz <= 0, but OK to use memory first
- 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 copyFile
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private static final void copyFile(File dst, File src, int flags)
throws IOException {
if (dst.equals(src))
throw new IOException("Copy to the same file, "+src);
- 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 hasContent
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public final boolean hasContent(String path) {
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 getAnyMethod
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static final Method
getAnyMethod(Class<?> cls, String name, Class<?>[] argTypes)
throws NoSuchMethodException {
try {
return cls.getDeclaredMethod(name, argTypes);
- 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 substring
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static final
Result substring(String src, int from, char until, boolean escBackslash) {
final int len = src.length();
final StringBuilder sb = new StringBuilder(len);
for (boolean quoted = false; from < len; ++from) {
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object obj) {
if (!(obj instanceof CachedMethodInfo))
return false;
if (!((CachedMethodInfo) obj).getMethodName().equals(this._methodName))
- 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 jjMoveStringLiteralDfa2_1
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private int jjMoveStringLiteralDfa2_1(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_1(0, old0);
try { curChar = input_stream.readChar(); }
- 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"