Showing 14,752 of 14,752 total issues
Method getParamsFromCategory
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private List<String> getParamsFromCategory(String category) {
List<String> params = new ArrayList<>();
for (String param : parameterCategories.keySet()) {
String paramCat = parameterCategories.get(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
Avoid deeply nested control flow statements. Open
if (!tuplesByPrimID.containsKey(modelXml.id)) {
tuplesByPrimID.put(modelXml.id,
new ArrayList<KnimeTuple>());
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
for (String var : oldIndepVars) {
String unit = independentVariableUnits.get(model)
.get(var);
String newVar = replace.get(var);
- Create a ticketCreate a ticket
Method parse
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private static TwoStepSecondaryModel parse(List<KnimeTuple> tuples, boolean isPMFX, int modelNum, String mdName,
Metadata metadata, String notes) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (!Double.isNaN(guess.x)) {
minGuessValues.add(guess.x);
} else {
minGuessValues.add(null);
}
- Create a ticketCreate a ticket
Method getKnimeTuples
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static List<KnimeTuple> getKnimeTuples(Bfrdb db, Connection conn, KnimeSchema schema, int level, boolean withoutMdData, EstimatedModelReaderNodeModel emrnm) throws SQLException {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (param.equals(element2.name)) {
String unit = miscUnits.get(modelXml.id).get(
element2.name);
Category category = Categories
.getCategoryByUnit(unit);
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (resRowOther[fieldnames.length+1] == null || resRowOther[fieldnames.length+1].isEmpty()) resRowOther[fieldnames.length+1] = rs3.getInt("ID")+"";
else resRowOther[fieldnames.length+1] += "," + rs3.getInt("ID")+"";
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
for (int i=0;i<otherTableDesires.length;i++) {
result += "\t" + rs3.getString(otherTableDesires[i]);
if (resRowOther[fieldnames.length+2+i] == null || resRowOther[fieldnames.length+2+i].isEmpty()) resRowOther[fieldnames.length+2+i] = rs3.getString(otherTableDesires[i]);
else resRowOther[fieldnames.length+2+i] += "," + rs3.getString(otherTableDesires[i]);
}
- Create a ticketCreate a ticket
Method refreshHashbox
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
void refreshHashbox() {
MyTable[] foreignFields = actualTable.getForeignFields();
String[] mnTable = actualTable.getMNTable();
if (foreignFields != null) {
DBKernel.refreshHashTables();
- 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 sorterChanged
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void sorterChanged(final RowSorterEvent e) {
if (e == null || e.getType() == RowSorterEvent.Type.SORT_ORDER_CHANGED) {
if (this.getTable().getCellEditor() != null) {
this.getTable().getCellEditor().stopCellEditing();
- 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
Avoid deeply nested control flow statements. Open
for (MyTable myFT : ffTs) {
if (myFT != null && myFT.getTablename().equals(tablename)) {
tname = myT.getForeignFields()[i].getFieldNames()[ii];
break;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (sorter != null) {
sorter.setComparator(i+2, new MyOtherSorter());
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (foreignHashs[i] != null) {
c = this.getColumn(i+1);
c.setUserCellEditor(new MyComboBoxEditor(foreignHashs[i], false)); c.setUserCellRenderer(new MyComboBoxEditor(foreignHashs[i], true));
}
- Create a ticketCreate a ticket
Method gotoFind
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void gotoFind(int increment) {
if (isFormVisible()) {
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 go4Table
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private void go4Table(final String tn, final Vector<String> result, final int id1, final int id2, final MyTable myT, final boolean showOnlyDataFromCurrentUser) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (selectedFile != null) {
doTheImport(mi, selectedFile, false);
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (DBKernel.myDBi != null && DBKernel.myDBi.getConn() != null) DBKernel.myDBi.establishDBConnection(newSA, newPass);
else DBKernel.mainFrame.getMyList().getMyDBTable().initConn(newSA, newPass);
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
if (comboBox11.getItemAt(i).equals(comboVal)) {
comboBox11.setSelectedIndex(i);
break;
}
- Create a ticketCreate a ticket
Method initCs
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void initCs() {
componentMap = new HashMap<>();
componentMap.put("ID", textField1);
componentMap.put("Referenz", textField2);
componentMap.put("Agens", textField3);
- 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"