de.bund.bfr.knime.pmm.common/src/de/bund/bfr/knime/pmm/common/ui/TimeSeriesTable.java
File TimeSeriesTable.java
has 296 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*******************************************************************************
* Copyright (c) 2015 Federal Institute for Risk Assessment (BfR), Germany
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- Create a ticketCreate a ticket
Method performPaste
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
private void performPaste() {
int startRow = getSelectedRows()[0];
int startCol = getSelectedColumns()[0];
Clipboard system = Toolkit.getDefaultToolkit().getSystemClipboard();
String trstring = null;
- Read upRead up
- Create a ticketCreate a ticket
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 performPaste
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void performPaste() {
int startRow = getSelectedRows()[0];
int startCol = getSelectedColumns()[0];
Clipboard system = Toolkit.getDefaultToolkit().getSystemClipboard();
String trstring = null;
- Create a ticketCreate a ticket
Method getTableCellEditorComponent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public Component getTableCellEditorComponent(JTable table,
Object value, boolean isSelected, int row, int column) {
- Create a ticketCreate a ticket
Method performCopy
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
private void performCopy() {
StringBuilder sbf = new StringBuilder();
int numcols = getSelectedColumnCount();
int numrows = getSelectedRowCount();
int[] rowsselected = getSelectedRows();
- Read upRead up
- Create a ticketCreate a ticket
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"