Showing 7,767 of 7,767 total issues
AbstractExecution
has 74 methods (exceeds 20 allowed). Consider refactoring. Open
public abstract class AbstractExecution implements Execution, ExecutionCtrl {
private static final Logger _zklog = LoggerFactory.getLogger("org.zkoss.zk.log");
private Desktop _desktop;
private Page _curpage;
File WeakIdentityMap.java
has 619 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* WeakIdentityMap.java
Purpose:
Description:
File InputElement.java
has 619 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* InputElement.java
Purpose:
Description:
HtmlShadowElement
has 73 methods (exceeds 20 allowed). Consider refactoring. Open
public abstract class HtmlShadowElement extends AbstractComponent implements ShadowElement, ShadowElementCtrl {
private static final Logger log = LoggerFactory.getLogger(HtmlShadowElement.class);
private static final long serialVersionUID = 20141022145906L;
private Component _firstInsertion;
private Component _lastInsertion;
Chart
has 73 methods (exceeds 20 allowed). Consider refactoring. Open
public class Chart extends Imagemap {
private static final long serialVersionUID = 20091008183601L;
//chart type
public static final String PIE = "pie";
public static final String FUNNEL = "funnel";
Method parse
has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring. Open
public void parse(Element root, Configuration config, Locator locator) throws Exception {
l_out: for (Iterator it = root.getElements().iterator(); it.hasNext();) {
final Element el = (Element) it.next();
final String elnm = el.getName();
// B65-ZK-1671: ThemeProvider specified in metainfo/zk/zk.xml may get overridden by default
- 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 execCreate0
has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring. Open
private static final Component[] execCreate0(CreateInfo ci, NodeInfo parentInfo, Component parent,
Component insertBefore) {
final List<Component> created = new LinkedList<Component>();
final Page page = ci.page;
final PageDefinition pagedef = parentInfo.getPageDefinition();
- 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 processItem
has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring. Open
private static final Media processItem(Desktop desktop, FileItem fi, boolean alwaysNative,
org.zkoss.zk.ui.sys.DiskFileItemFactory factory) throws IOException {
String name = getBaseName(fi);
if (name != null) {
//Not sure whether a name might contain ;jsessionid or similar
- 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
Identical blocks of code found in 2 locations. Consider refactoring. Open
private static class WorkingThread extends Thread {
private static Color colors[] = { Color.blue, Color.cyan, Color.green,
Color.magenta, Color.orange, Color.pink, Color.red,
Color.yellow, Color.lightGray, Color.white };
- 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 652.
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
private static class WorkingThread extends Thread {
private static Color colors[] = { Color.blue, Color.cyan, Color.green,
Color.magenta, Color.orange, Color.pink, Color.red,
Color.yellow, Color.lightGray, Color.white };
- 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 652.
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
d3.max = function(array, f) {
var i = -1,
n = array.length,
a,
b;
- 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 248.
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
d3.min = function(array, f) {
var i = -1,
n = array.length,
a,
b;
- 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 248.
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 onEvent
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
public void onEvent(Event event) {
if (inPagingMold() && event instanceof PagingEvent) {
PagingEvent pe = (PagingEvent) event;
if (_model instanceof Pageable) {
((Pageable) _model).setPageSize(pe.getPageable().getPageSize());
- 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 sendNow
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
export function sendNow(dt: zk.Desktop): boolean {
if (zAu.disabledRequest) {
if (zk.processing)
zk.endProcessing();
return false;
- 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
Input
has 71 methods (exceeds 20 allowed). Consider refactoring. Open
public class Input extends AbstractTag {
private transient boolean _byClient;
static {
addClientEvent(Input.class, Events.ON_CHANGE, 0);
AbstractTreeModel
has 71 methods (exceeds 20 allowed). Consider refactoring. Open
public abstract class AbstractTreeModel<E> implements TreeModel<E>, TreeSelectableModel, TreeOpenableModel,
Selectable<E>, Openable<E>, java.io.Serializable, PageableModel {
private static final Logger log = LoggerFactory.getLogger(AbstractTreeModel.class);
Window
has 71 methods (exceeds 20 allowed). Consider refactoring. Open
public class Window extends XulElement implements Framable, IdSpace {
private static final Logger log = LoggerFactory.getLogger(Window.class);
private static final long serialVersionUID = 20100721L;
private transient Caption _caption;
File Datebox.java
has 604 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Datebox.java
Purpose:
Description:
Method toNumberOnly
has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring. Open
protected Object[] toNumberOnly(String val) {
if (val == null)
return new Object[] { null, null };
final DecimalFormatSymbols symbols = new DecimalFormatSymbols(getDefaultLocale());
- 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 WScroll.ts
has 600 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* WScroll.ts
Purpose:
Description: