Showing 7,775 of 7,775 total issues
Method remove
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public V remove(Object key) {
if (key == null) {
key = KeyFactory.NULL;
}
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 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 _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 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 _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 _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 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 ||
Identical blocks of code found in 2 locations. Consider refactoring. Open
public void submitToOrigin(BindContext ctx) {
Collection<E> origin = ((Collection<E>) getOriginObject());
origin.clear();
for (E e : _cache) {
if (e instanceof FormProxyObject) {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 86.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
public void submitToOrigin(BindContext ctx) {
Collection<E> origin = ((Collection<E>) getOriginObject());
origin.clear();
for (E e : _cache) {
if (e instanceof FormProxyObject) {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 86.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
try {
if (_log.isDebugEnabled()) {
_log.debug(getSaveBindingDebugInfo("doSaveFormBinding", comp, binding, command, evt, notifys));
}
doPrePhase(Phase.SAVE_BINDING, ctx);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 86.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
try {
if (_log.isDebugEnabled()) {
_log.debug(getSaveBindingDebugInfo("doSavePropertyBinding", comp, binding, command, evt, notifys));
}
doPrePhase(Phase.SAVE_BINDING, ctx);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 86.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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 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 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"