Showing 14,752 of 14,752 total issues
Method getTableCellRendererComponent
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Component getTableCellRendererComponent(JTable table,
Object value, boolean isSelected, boolean hasFocus, int row,
int column) {
int statusColumn = -1;
- 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 getMiscUnits
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public static Map<String, String> getMiscUnits(List<KnimeTuple> tuples) {
Map<String, Map<String, Integer>> occurences = new LinkedHashMap<>();
Map<String, String> map = new LinkedHashMap<>();
for (KnimeTuple tuple : tuples) {
- 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 createCategory
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private Category createCategory(Map<Integer, UnitsFromDB> units, String categoryName) {
DJep parser = MathUtilities.createParser();
Map<String, Node> fromFormulas = new LinkedHashMap<>();
Map<String, Node> toFormulas = new LinkedHashMap<>();
Map<String, String> fromFormulaStrings = new LinkedHashMap<>();
- 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 getColor
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private Color getColor(String param, Color lastBG, String lastParam) {
Color bg = Color.WHITE;
@SuppressWarnings("unused")
Color fg = Color.BLACK;
if (JCheckboxWithObject.isTemperature(param)) {
- 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 release
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public synchronized void release() throws RException {
if (!m_available) {
// Either m_pendingDestructionTask is null, which means
// this resource is being held, or the resource is available
// and has destruction pending.
- 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
Function createForm
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
var createForm = (prop, value, port) => {
let isMandatory = prop.required ? prop.required : false;
if (prop.type === "text" || prop.type === "number" || prop.type === "url" ||
prop.type === "date" || prop.type === "email" || prop.type === "year_date")
- 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
Identical blocks of code found in 2 locations. Consider refactoring. Open
@Override
public JSSimulatorViewValue getViewValue() {
JSSimulatorViewValue val;
synchronized (getLock()) {
val = super.getViewValue();
- Read upRead up
- Create a ticketCreate a ticket
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 135.
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
@Override
public JSSimulatorViewValue getViewValue() {
JSSimulatorViewValue val;
synchronized (getLock()) {
val = super.getViewValue();
- Read upRead up
- Create a ticketCreate a ticket
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 135.
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 int[] getAllFilter(TableModel tm, Vector<Integer> vv) {
if (vv == null) {
int numRows = tm.getRowCount();
int arr[] = new int[numRows];
for (int row = 0; row < numRows; row++) {
- Read upRead up
- Create a ticketCreate a ticket
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 135.
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 int[] getAllFilter(TableModel tm, Vector<Integer> vv) {
if (vv == null) {
int numRows = tm.getRowCount();
int arr[] = new int[numRows];
for (int row = 0; row < numRows; row++) {
- Read upRead up
- Create a ticketCreate a ticket
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 135.
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 convertParameter
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
static Parameter convertParameter(JsonNode node) {
Parameter parameter = new Parameter();
if (node.has("parameterID")) {
- Create a ticketCreate a ticket
Method eSet
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case MetadataPackage.POPULATION_GROUP__POPULATION_NAME:
- Create a ticketCreate a ticket
Method loadSettingsFrom
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected void loadSettingsFrom(final NodeSettingsRO settings, final DataTableSpec[] specs)
throws NotConfigurableException {
set = new SettingsHelper();
set.loadSettings(settings);
- Create a ticketCreate a ticket
Method checkForeignWindow2Open
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void checkForeignWindow2Open(final int row, final int col) {
MyTable[] myTs = actualTable.getForeignFields();
//System.out.println(lastClickedRow + "\t" + lastClickedCol + "\t" + myTs.length);
if (col > 0 && col <= myTs.length && myTs[col-1] != null &&
!myTs[col-1].getTablename().equals("DoubleKennzahlen")) {
- Create a ticketCreate a ticket
Method dbBackup
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static void dbBackup(final JFrame frame, final File backupFile, final boolean silent) {
if (backupFile != null && backupFile.getParentFile().exists() && DBKernel.DBFilesDa(DBKernel.HSHDB_PATH, DBKernel.dbKennung)) {
try {
if (backupFile.exists()) {
backupFile.delete();
- Create a ticketCreate a ticket
Method execute
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected PortObject[] execute(final PortObject[] inData, final ExecutionContext exec)
throws Exception {
try {
FskPortObject portObj = new FskPortObject();
- Create a ticketCreate a ticket
Method getPoints
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
public double[][] getPoints(String paramX, String paramY, String unitX,
String unitY, String transformX, String transformY,
Map<String, Integer> choice) throws ConvertException {
List<Double> xList = valueLists.get(paramX);
List<Double> yList = valueLists.get(paramY);
- Create a ticketCreate a ticket
Method createPcData
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void createPcData(PCMLDocument pcmlDoc, final PortObject[] inObjects) {
PCML pcml = pcmlDoc.getPCML();
ProcessChain pChain = pcml.addNewProcessChain();
// Fetches model metadata from the 1st table (metadata table)
- Create a ticketCreate a ticket
Function formatStringFactory
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function formatStringFactory(delimiter, tokenOuter) {
while ("rubf".indexOf(delimiter.charAt(0).toLowerCase()) >= 0)
delimiter = delimiter.substr(1);
var singleline = delimiter.length == 1;
- Create a ticketCreate a ticket
Function Display
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Display(place, doc, input, options) {
var d = this;
this.input = input;
// Covers bottom-right square when both scrollbars are present.
- Create a ticketCreate a ticket