Showing 14,752 of 14,752 total issues
Method okButtonActionPerformed
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
private void okButtonActionPerformed(ActionEvent e) {
String newSA = textField1.getText();
String newPass = String.valueOf(passwordField1.getPassword());
if (newPass.equals(String.valueOf(passwordField2.getPassword()))) {
String ibText = "";
- 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 setVisibleParameters
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public void setVisibleParameters(Set<String> visible) {
if (visible.equals(lastVisibleParameters)) {
return;
}
- 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 updateMetaData
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
private static void updateMetaData(List<KnimeTuple> tuples, Map<KnimeTuple, List<KnimeTuple>> tupleCombinations) {
Map<Integer, Set<String>> organisms = new LinkedHashMap<>();
Map<Integer, Set<String>> matrices = new LinkedHashMap<>();
Map<Integer, Set<String>> organismDetails = new LinkedHashMap<>();
Map<Integer, Set<String>> matrixDetails = 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 getColumnClass
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Class<?> getColumnClass(int column) {
switch (column) {
case 0:
return String.class;
- 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 importCells
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
private static final void importCells(final REXP rexp, final DataCell[] column,
final boolean nonNumbersAsMissing) throws REXPMismatchException {
if (rexp.isLogical()) {
final byte[] bytes = rexp.asBytes();
for (int i = 0; i < bytes.length; ++i) {
- 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
File DateInputDialog.java
has 392 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* ------------------------------------------------------------------------
* Copyright by KNIME GmbH, Konstanz, Germany
* Website: http://www.knime.org; Email: contact@knime.org
*
- Create a ticketCreate a ticket
Method doSwitch
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case MetadataPackage.GENERAL_INFORMATION: {
GeneralInformation generalInformation = (GeneralInformation)theEObject;
- Create a ticketCreate a ticket
Method execute
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected PortObject[] execute(final PortObject[] inData, final ExecutionContext exec)
throws InvalidSettingsException, IOException, CanceledExecutionException,
InvalidFormatException {
- Create a ticketCreate a ticket
Method execute
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected PortObject[] execute(final PortObject[] inData, final ExecutionContext exec)
throws InvalidSettingsException, IOException, CanceledExecutionException,
InvalidFormatException {
- Create a ticketCreate a ticket
Function token
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
token: function (stream, state) {
if (!stream) return;
//check for state changes
if (state.stack.length === 0) {
- Create a ticketCreate a ticket
File RConnectionFactory.java
has 391 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* ------------------------------------------------------------------ Copyright by KNIME GmbH,
* Konstanz, Germany Website: http://www.knime.org; Email: contact@knime.org
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
- Create a ticketCreate a ticket
Method getCharge_Lieferung
has 43 arguments (exceeds 4 allowed). Consider refactoring. Open
private Integer[] getCharge_Lieferung(String id, String name, String street, String streetNumber, String zip, String city, String county, String country, String kind,
String vat, String article, String articleNumber, String prodTreatment, String charge, String dayMHD, String monthMHD, String yearMHD, String dayP, String monthP,
String yearP, String originCountry, String dayD, String monthD, String yearD, String amountKG, String typePU, String numPU, String idTo, String nameTo,
String streetTo, String streetNumberTo, String zipTo, String cityTo, String countyTo, String countryTo, String kindTo, String vatTo, String serial, String cqr,
String EndChain, String Explanation_EndChain, String Further_Traceback, String MicrobiologicalSample) {
- Create a ticketCreate a ticket
Function _create
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
var n, i, handle, axis, hname,
that = this,
o = this.options;
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
function mapDomain(string, fn) {
var parts = string.split('@');
var result = '';
if (parts.length > 1) {
// In email addresses, only the domain name should be punycoded. Leave
- 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 142.
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
function mapDomain(string, fn) {
var parts = string.split('@');
var result = '';
if (parts.length > 1) {
// In email addresses, only the domain name should be punycoded. Leave
- 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 142.
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 MyChartDialog.java
has 389 lines of code (exceeds 250 allowed). Consider refactoring. 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
GeneralInformationImpl
has 40 methods (exceeds 20 allowed). Consider refactoring. Open
public class GeneralInformationImpl extends MinimalEObjectImpl.Container implements GeneralInformation {
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- Create a ticketCreate a ticket
PredictiveModelScopeProduct
has 40 methods (exceeds 20 allowed). Consider refactoring. Open
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-07-02T16:22:48.194+02:00")
public class PredictiveModelScopeProduct {
@SerializedName("name")
private String name = null;
- Create a ticketCreate a ticket
Product
has 40 methods (exceeds 20 allowed). Consider refactoring. Open
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-07-02T16:22:48.194+02:00")
public class Product {
@SerializedName("name")
private String name = null;
- Create a ticketCreate a ticket
JoinerNodeModel
has 40 methods (exceeds 20 allowed). Consider refactoring. Open
public final class JoinerNodeModel extends
AbstractWizardNodeModel<JoinerViewRepresentation, JoinerViewValue> implements PortObjectHolder {
private final JoinerNodeSettings m_config = new JoinerNodeSettings();
- Create a ticketCreate a ticket