Showing 7,767 of 7,767 total issues
ListModelListProxy
has 70 methods (exceeds 20 allowed). Consider refactoring. Open
public class ListModelListProxy<E> extends ListModelList<E> implements Proxy, FormProxyObject, Serializable {
private static final long serialVersionUID = 20210608113022L;
private ListModelList<E> _cache;
private ListModelList<E> _origin;
private boolean _dirty;
Function ajax
has 257 lines of code (exceeds 25 allowed). Consider refactoring. Open
ajax: function( url, options ) {
// If url is an object, simulate pre-1.5 signature
if ( typeof url === "object" ) {
options = url;
File Chart.java
has 592 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Chart.java
Purpose:
Description:
ExecutionImpl
has 69 methods (exceeds 20 allowed). Consider refactoring. Open
public class ExecutionImpl extends AbstractExecution {
private final ServletContext _ctx;
private final HttpServletRequest _request;
private final HttpServletResponse _response;
private final RequestContext _xelctx;
File KeyFactory.java
has 589 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright 2004 Brian S O'Neill
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Method addTracking
has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring. Open
protected void addTracking(List<String> series) {
final Binding binding = _ctx.getBinding();
final boolean dotracker = !_ctx.ignoreTracker();
if (binding != null && series != null && !series.isEmpty()) {
- 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 parseDate
has 252 lines of code (exceeds 25 allowed). Consider refactoring. Open
parseDate(
txt: string,
fmt: string,
nonLenient?: boolean,
refval?: DateImpl,
Similar blocks of code found in 3 locations. Consider refactoring. Open
function bcsub(a, b, c) {
"undefined" == typeof c && (c = libbcmath.scale);
c = 0 > c ? 0 : c;
libbcmath.bc_init_num();
libbcmath.bc_init_num();
- 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 235.
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 3 locations. Consider refactoring. Open
function bcadd(a, b, c) {
"undefined" == typeof c && (c = libbcmath.scale);
c = 0 > c ? 0 : c;
libbcmath.bc_init_num();
libbcmath.bc_init_num();
- 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 235.
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 3 locations. Consider refactoring. Open
function bcmul(a, b, c) {
"undefined" == typeof c && (c = libbcmath.scale);
c = 0 > c ? 0 : c;
libbcmath.bc_init_num();
libbcmath.bc_init_num();
- 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 235.
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
File Util.java
has 580 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
Method wireOthers
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
private void wireOthers(Object x) {
//check methods
final Class cls = _controller.getClass();
Method[] mtds = cls.getMethods();
for (int j = 0; j < mtds.length; ++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 syncModel
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
public void syncModel(int offset, int limit) {
int min = offset;
int max = offset + limit - 1;
final ListModel model = _grid.getModel();
- 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 HtmlBasedComponent.java
has 575 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* HtmlBasedComponent.java
Purpose:
Description:
Method Assignment
has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring. Open
final public void Assignment() throws ParseException {
if (jj_2_2(4)) {
LambdaExpression();
} else {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- 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 fillShadowElement
has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring. Open
private JSONObject fillShadowElement(HtmlShadowElement se, AbstractComponent current, ListIterator<AbstractComponent> cit) {
String name = se.toString();
int index = name.lastIndexOf("->");
if (index > 0)
name = name.substring(index + 2);
- 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 getResponses
has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring. Open
public List<AuResponse> getResponses(Collection<Component> renderedComps) throws IOException {
_ending = true; //no more modifying UI (invalidate/addSmartUpdate...)
/* if (log.finerable())
log.finer("ei: "+this+"\nInvalidated: "+_invalidated+"\nSmart Upd: "+_smartUpdated
- 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 BSHInterpreter.java
has 572 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* BSHInterpreter.java
Purpose:
Description:
File Element.java
has 569 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Element.java
Purpose:
Description:
Method parse
has 240 lines of code (exceeds 25 allowed). Consider refactoring. Open
private Object parse(RequestContext reqctx, InputStream is, String path) throws Exception {
final Element root = new SAXBuilder(true, false, true).build(is).getRootElement();
final String name = IDOMs.getRequiredAttributeValue(root, "name");
if (name.length() == 0)
throw new UiException("The name attribute must be specified, " + root.getLocator() + ", " + path);